mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Change gncOwnerGetBalanceInCurrency to only cosider lots that contain an invoice.
This function is currently only used in the owner tree code and this change will cause payments not properly linked to invoices to be ignored when computing owner balances.
This commit is contained in:
parent
a028ae0f98
commit
67f84774e9
@ -1133,8 +1133,10 @@ gncOwnerGetBalanceInCurrency (const GncOwner *owner,
|
||||
{
|
||||
GNCLot *lot = lot_node->data;
|
||||
gnc_numeric lot_balance = gnc_lot_get_balance (lot);
|
||||
balance = gnc_numeric_add (balance, lot_balance,
|
||||
gnc_commodity_get_fraction (owner_currency), GNC_HOW_RND_ROUND_HALF_UP);
|
||||
GncInvoice *invoice = gncInvoiceGetInvoiceFromLot(lot);
|
||||
if (invoice)
|
||||
balance = gnc_numeric_add (balance, lot_balance,
|
||||
gnc_commodity_get_fraction (owner_currency), GNC_HOW_RND_ROUND_HALF_UP);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user