mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't require fixed-point addition; we'll round at the end. Just let
gnc-numeric do the math for us. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6922 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
8bd744d6d0
commit
01189152f3
@ -477,8 +477,9 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
|
||||
GET_OR_ADD_ACCVAL (splitinfo, this_acc, acc_val);
|
||||
|
||||
if (gnc_numeric_check (value) == GNC_ERROR_OK) {
|
||||
acc_val->val = gnc_numeric_add_fixed (acc_val->val, value);
|
||||
total = gnc_numeric_add_fixed (total, value);
|
||||
acc_val->val = gnc_numeric_add (acc_val->val, value, GNC_DENOM_AUTO,
|
||||
GNC_DENOM_LCD);
|
||||
total = gnc_numeric_add (total, value, GNC_DENOM_AUTO, GNC_DENOM_LCD);
|
||||
} else
|
||||
g_warning ("bad value in our entry");
|
||||
}
|
||||
@ -490,7 +491,7 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
|
||||
GET_OR_ADD_ACCVAL (splitinfo, this_acc, acc_val);
|
||||
if (gnc_numeric_check (tax) == GNC_ERROR_OK) {
|
||||
acc_val->val = gnc_numeric_add_fixed (acc_val->val, tax);
|
||||
total = gnc_numeric_add_fixed (total, tax);
|
||||
total = gnc_numeric_add (total, tax, GNC_DENOM_AUTO, GNC_DENOM_LCD);
|
||||
} else
|
||||
g_warning ("bad tax in our entry");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user