Error in Purchase Return where journal amounts do not match due to rounding fixed.

This commit is contained in:
Tanshu 2013-05-18 12:13:06 +05:30
parent 867935306d
commit 6e6113436b
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ def purchase_return_create_journals(inventories, ledgerID):
ledger = Product.by_id(item.product_id).ledger
amount += round(item.amount, 2)
if ledger.id in journals:
journals[ledger.id].amount += item.amount
journals[ledger.id].amount += amount
else:
journals[ledger.id] = Journal(debit=-1, cost_center_id=ledger.costcenter_id, ledger_id=ledger.id,
amount=item.amount)