GnuCash  5.6-150-g038405b370+
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 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
80 void gnc_set_abort_scrub (gboolean abort);
81 gboolean gnc_get_abort_scrub (void);
82 
85 gboolean gnc_get_ongoing_scrub (void);
86 
90 void xaccTransScrubOrphans (Transaction *trans);
91 
95 void xaccAccountScrubOrphans (Account *acc, QofPercentageFunc percentagefunc);
96 
100 void xaccAccountTreeScrubOrphans (Account *acc, QofPercentageFunc percentagefunc);
101 
109 void xaccSplitScrub (Split *split);
110 
115 void xaccTransScrubSplits (Transaction *trans);
116 void xaccAccountScrubSplits (Account *account);
117 void xaccAccountTreeScrubSplits (Account *account);
118 
124 void xaccTransScrubImbalance (Transaction *trans, Account *root,
125  Account *parent);
126 void xaccAccountScrubImbalance (Account *acc, QofPercentageFunc percentagefunc);
127 void xaccAccountTreeScrubImbalance (Account *acc, QofPercentageFunc percentagefunc);
128 
134 void xaccTransScrubCurrency (Transaction *trans);
135 
138 void xaccAccountScrubCommodity (Account *account);
139 
144 
158 void xaccAccountTreeScrubQuoteSources (Account *root, gnc_commodity_table *table);
159 
161 void xaccAccountScrubKvp (Account *account);
162 
166 void xaccAccountScrubColorNotSet (QofBook *book);
167 
175 void xaccTransScrubPostedDate (Transaction *trans);
176 
177 #ifdef __cplusplus
178 }
179 #endif
180 
181 #endif /* XACC_SCRUB_H */
182 
void xaccAccountScrubKvp(Account *account)
Removes empty "notes", "placeholder", and "hbci" KVP slots from Accounts.
Definition: Scrub.cpp:1374
void xaccTransScrubCurrency(Transaction *trans)
The xaccTransScrubCurrency method fixes transactions without a common_currency by looking for the mos...
Definition: Scrub.cpp:1111
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.cpp:1293
gboolean gnc_get_ongoing_scrub(void)
The gnc_get_ongoing_scrub () method returns TRUE if a scrub operation is ongoing. ...
Definition: Scrub.cpp:86
void xaccAccountScrubCommodity(Account *account)
The xaccAccountScrubCommodity method fixed accounts without a commodity by using the old account curr...
Definition: Scrub.cpp:1228
STRUCTS.
void xaccTransScrubPostedDate(Transaction *trans)
Changes Transaction date_posted timestamps from 00:00 local to 11:00 UTC.
Definition: Scrub.cpp:1533
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.cpp:74
void xaccAccountTreeScrubOrphans(Account *acc, QofPercentageFunc percentagefunc)
The xaccAccountTreeScrubOrphans() method performs this scrub for the indicated account and its childr...
Definition: Scrub.cpp:178
void xaccTransScrubImbalance(Transaction *trans, Account *root, Account *parent)
The xaccScrubImbalance() method searches for transactions that do not balance to zero.
Definition: Scrub.cpp:835
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.cpp:430
void xaccTransScrubSplits(Transaction *trans)
The xacc*ScrubSplits() calls xaccSplitScrub() on each split in the respective structure: transaction...
Definition: Scrub.cpp:401
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.cpp:172
void xaccTransScrubOrphans(Transaction *trans)
The xaccTransScrubOrphans() method scrubs only the splits in the given transaction.
Definition: Scrub.cpp:184
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.cpp:1405
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.cpp:1351