mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-07-30 08:08:15 -05:00
Properly accumulate splits (bug #165053).
* src/business/business-core/gncInvoice.c: Properly accumulate splits (bug #165053). Also fixes a (related) memory leak (caused by the same lack-of-reference to accumulated splits). git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10424 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2005-01-23 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
* src/business/business-core/gncInvoice.c: Properly accumulate
|
||||
splits (bug #165053). Also fixes a (related) memory leak
|
||||
(caused by the same lack-of-reference to accumulated splits).
|
||||
|
||||
2005-01-16 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/app-utils/gnc-ui-util.c: Modify tax option code to load
|
||||
|
||||
@@ -855,23 +855,23 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
|
||||
if (this_acc) {
|
||||
if (gnc_numeric_check (value) == GNC_ERROR_OK) {
|
||||
if (accumulatesplits) {
|
||||
gncAccountValueAdd (splitinfo, this_acc, value);
|
||||
splitinfo = gncAccountValueAdd (splitinfo, this_acc, value);
|
||||
} else {
|
||||
Split *split;
|
||||
Split *split;
|
||||
|
||||
split = xaccMallocSplit (invoice->inst.book);
|
||||
/* set action and memo? */
|
||||
split = xaccMallocSplit (invoice->inst.book);
|
||||
/* set action and memo? */
|
||||
|
||||
xaccSplitSetMemo (split, gncEntryGetDescription (entry));
|
||||
xaccSplitSetAction (split, type);
|
||||
xaccSplitSetMemo (split, gncEntryGetDescription (entry));
|
||||
xaccSplitSetAction (split, type);
|
||||
|
||||
xaccSplitSetBaseValue (split, (reverse ? gnc_numeric_neg (value)
|
||||
: value),
|
||||
xaccSplitSetBaseValue (split, (reverse ? gnc_numeric_neg (value)
|
||||
: value),
|
||||
invoice->currency);
|
||||
xaccAccountBeginEdit (this_acc);
|
||||
xaccAccountInsertSplit (this_acc, split);
|
||||
xaccAccountCommitEdit (this_acc);
|
||||
xaccTransAppendSplit (txn, split);
|
||||
xaccAccountBeginEdit (this_acc);
|
||||
xaccAccountInsertSplit (this_acc, split);
|
||||
xaccAccountCommitEdit (this_acc);
|
||||
xaccTransAppendSplit (txn, split);
|
||||
}
|
||||
|
||||
/* If there is a credit-card account, and this is a CCard
|
||||
|
||||
Reference in New Issue
Block a user