mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Charge back net value of bill entries in invoices
When charging entries from bills we need to exclude taxes since the tax rate of the invoice might be different than that of the bill. This fixes Bug 776380 - Gross value of bills charged back instead of net value (https://bugzilla.gnome.org/show_bug.cgi?id=776380)
This commit is contained in:
parent
80e64a1296
commit
4949499bd4
@ -1465,7 +1465,11 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
|
||||
|
||||
/* If this is a bill, and the entry came from an invoice originally, copy the price */
|
||||
if (gncEntryGetBillable (entry))
|
||||
gncEntrySetInvPrice (entry, gncEntryGetBillPrice (entry));
|
||||
{
|
||||
/* We need to set the net price since it may be another tax rate for invoices than bills */
|
||||
gncEntrySetInvPrice (entry, gncEntryGetPrice (entry, FALSE, TRUE));
|
||||
gncEntrySetInvTaxIncluded (entry, FALSE);
|
||||
}
|
||||
}
|
||||
gncEntryCommitEdit (entry);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user