GnuCash  4.8a-80-g9825132ea+
Scrub.h
Go to the documentation of this file.
1 /********************************************************************\
2  * Scrub.h -- convert single-entry accounts to clean double-entry *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation; either version 2 of *
7  * the License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License*
15  * along with this program; if not, contact: *
16  * *
17  * Free Software Foundation Voice: +1-617-542-5942 *
18  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19  * Boston, MA 02110-1301, USA gnu@gnu.org *
20  * *
21 \********************************************************************/
22 
50 #ifndef XACC_SCRUB_H
51 #define XACC_SCRUB_H
52 
53 #include "gnc-engine.h"
54 
76 void gnc_set_abort_scrub (gboolean abort);
77 gboolean gnc_get_abort_scrub (void);
78 
81 gboolean gnc_get_ongoing_scrub (void);
82 
86 void xaccTransScrubOrphans (Transaction *trans);
87 
91 void xaccAccountScrubOrphans (Account *acc, QofPercentageFunc percentagefunc);
92 
96 void xaccAccountTreeScrubOrphans (Account *acc, QofPercentageFunc percentagefunc);
97 
105 void xaccSplitScrub (Split *split);
106 
111 void xaccTransScrubSplits (Transaction *trans);
112 void xaccAccountScrubSplits (Account *account);
113 void xaccAccountTreeScrubSplits (Account *account);
114 
120 void xaccTransScrubImbalance (Transaction *trans, Account *root,
121  Account *parent);
122 void xaccAccountScrubImbalance (Account *acc, QofPercentageFunc percentagefunc);
123 void xaccAccountTreeScrubImbalance (Account *acc, QofPercentageFunc percentagefunc);
124 
130 void xaccTransScrubCurrency (Transaction *trans);
131 
134 void xaccAccountScrubCommodity (Account *account);
135 
140 
154 void xaccAccountTreeScrubQuoteSources (Account *root, gnc_commodity_table *table);
155 
157 void xaccAccountScrubKvp (Account *account);
158 
162 void xaccAccountScrubColorNotSet (QofBook *book);
163 
171 void xaccTransScrubPostedDate (Transaction *trans);
172 
173 #endif /* XACC_SCRUB_H */
174 
void xaccAccountScrubKvp(Account *account)
Removes empty "notes", "placeholder", and "hbci" KVP slots from Accounts.
Definition: Scrub.c:1322
void xaccTransScrubCurrency(Transaction *trans)
The xaccTransScrubCurrency method fixes transactions without a common_currency by looking for the mos...
Definition: Scrub.c:1059
void(* QofPercentageFunc)(const char *message, double percent)
The qof_session_load() method causes the QofBook to be made ready to to use with this URL/datastore...
Definition: qofsession.h:199
void xaccAccountTreeScrubCommodities(Account *acc)
The xaccAccountTreeScrubCommodities will scrub the currency/commodity of all accounts & transactions ...
Definition: Scrub.c:1241
gboolean gnc_get_ongoing_scrub(void)
The gnc_get_ongoing_scrub () method returns TRUE if a scrub operation is ongoing. ...
Definition: Scrub.c:84
void xaccAccountScrubCommodity(Account *account)
The xaccAccountScrubCommodity method fixed accounts without a commodity by using the old account curr...
Definition: Scrub.c:1176
void xaccTransScrubPostedDate(Transaction *trans)
Changes Transaction date_posted timestamps from 00:00 local to 11:00 UTC.
Definition: Scrub.c:1480
void gnc_set_abort_scrub(gboolean abort)
The gnc_set_abort_scrub () method causes a currently running scrub operation to stop, if abort is TRUE; gnc_set_abort_scrub(FALSE) must be called before any scrubbing operation.
Definition: Scrub.c:72
void xaccAccountTreeScrubOrphans(Account *acc, QofPercentageFunc percentagefunc)
The xaccAccountTreeScrubOrphans() method performs this scrub for the indicated account and its childr...
Definition: Scrub.c:92
void xaccTransScrubImbalance(Transaction *trans, Account *root, Account *parent)
The xaccScrubImbalance() method searches for transactions that do not balance to zero.
Definition: Scrub.c:783
void xaccSplitScrub(Split *split)
The xaccSplitScrub method ensures that if this split has the same commodity and currency, then it will have the same amount and value.
Definition: Scrub.c:235
void xaccTransScrubSplits(Transaction *trans)
The xacc*ScrubSplits() calls xaccSplitScrub() on each split in the respective structure: transaction...
Definition: Transaction.c:2924
void xaccAccountScrubOrphans(Account *acc, QofPercentageFunc percentagefunc)
The xaccAccountScrubOrphans() method performs this scrub only for the indicated account, and not for any of its children.
Definition: Scrub.c:140
void xaccTransScrubOrphans(Transaction *trans)
The xaccTransScrubOrphans() method scrubs only the splits in the given transaction.
Definition: Scrub.c:178
All type declarations for the whole Gnucash engine.
void xaccAccountScrubColorNotSet(QofBook *book)
Remove color slots that have a "Not Set" value, since 2.4.0, fixed in 3.4 This should only be run onc...
Definition: Scrub.c:1353
void xaccAccountTreeScrubQuoteSources(Account *root, gnc_commodity_table *table)
This routine will migrate the information about price quote sources from the account data structures ...
Definition: Scrub.c:1299