mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
move xaccTransScrubSplits to Scrub.c
it's defined in Scrub.h anyway
This commit is contained in:
parent
d214b2f05d
commit
872e20c555
@ -331,6 +331,28 @@ xaccSplitScrub (Split *split)
|
||||
|
||||
/* ================================================================ */
|
||||
|
||||
void
|
||||
xaccTransScrubSplits (Transaction *trans)
|
||||
{
|
||||
if (!trans) return;
|
||||
|
||||
gnc_commodity *currency = xaccTransGetCurrency (trans);
|
||||
if (!currency)
|
||||
PERR ("Transaction doesn't have a currency!");
|
||||
|
||||
xaccTransBeginEdit(trans);
|
||||
/* The split scrub expects the transaction to have a currency! */
|
||||
|
||||
for (GList *n = xaccTransGetSplitList (trans); n; n = g_list_next (n))
|
||||
xaccSplitScrub (n->data);
|
||||
|
||||
xaccTransCommitEdit(trans);
|
||||
}
|
||||
|
||||
|
||||
/* ================================================================ */
|
||||
|
||||
|
||||
void
|
||||
xaccAccountTreeScrubImbalance (Account *acc, QofPercentageFunc percentagefunc)
|
||||
{
|
||||
|
@ -2868,23 +2868,6 @@ xaccTransGetReversedBy(const Transaction *trans)
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
xaccTransScrubSplits (Transaction *trans)
|
||||
{
|
||||
gnc_commodity *currency;
|
||||
|
||||
if (!trans) return;
|
||||
|
||||
xaccTransBeginEdit(trans);
|
||||
/* The split scrub expects the transaction to have a currency! */
|
||||
currency = xaccTransGetCurrency (trans);
|
||||
if (!currency)
|
||||
PERR ("Transaction doesn't have a currency!");
|
||||
|
||||
FOR_EACH_SPLIT(trans, xaccSplitScrub(s));
|
||||
xaccTransCommitEdit(trans);
|
||||
}
|
||||
|
||||
/* ============================================================== */
|
||||
/** The xaccTransScrubGainsDate() routine is used to keep the posted date
|
||||
* of gains splits in sync with the posted date of the transaction
|
||||
|
Loading…
Reference in New Issue
Block a user