Merge pull request #26712 from ankush/against_acc_pr

fix: empty "against account" in Purchase Receipt GLE
This commit is contained in:
Deepesh Garg 2021-07-29 19:10:38 +05:30 committed by GitHub
commit 8b7e3775c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -966,7 +966,7 @@ def compare_existing_and_expected_gle(existing_gle, expected_gle, precision):
for e in existing_gle:
if entry.account == e.account:
account_existed = True
if (entry.account == e.account and entry.against_account == e.against_account
if (entry.account == e.account
and (not entry.cost_center or not e.cost_center or entry.cost_center == e.cost_center)
and ( flt(entry.debit, precision) != flt(e.debit, precision) or
flt(entry.credit, precision) != flt(e.credit, precision))):

View File

@ -436,7 +436,7 @@ class PurchaseReceipt(BuyingController):
"cost_center": cost_center,
"debit": debit,
"credit": credit,
"against_account": against_account,
"against": against_account,
"remarks": remarks,
}