From b40d3b0a057da7d9e333db8a1a1836e10a303225 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 14 Jan 2024 11:09:18 +0530 Subject: [PATCH] Revert "fix: purchase receipt tests" This reverts commit fcfdb9b5667755b2846e834d70d3f9b444743d2b. --- erpnext/controllers/stock_controller.py | 1 - .../purchase_receipt/purchase_receipt.py | 21 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 3480683204..4eef7cf4f0 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -832,7 +832,6 @@ class StockController(AccountsController): credit, remarks, against_account, - against_type="Account", debit_in_account_currency=None, credit_in_account_currency=None, account_currency=None, diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 326ef9be88..a0cf7e74f0 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -832,17 +832,16 @@ class PurchaseReceipt(BuyingController): ) amount_including_divisional_loss -= applicable_amount - for against in against_accounts: - self.add_gl_entry( - gl_entries=gl_entries, - account=account, - cost_center=tax.cost_center, - debit=0.0, - credit=flt(applicable_amount) / len(against_accounts), - remarks=self.remarks or _("Accounting Entry for Stock"), - against_account=against, - item=tax, - ) + self.add_gl_entry( + gl_entries=gl_entries, + account=account, + cost_center=tax.cost_center, + debit=0.0, + credit=applicable_amount, + remarks=self.remarks or _("Accounting Entry for Stock"), + against_account=against_accounts, + item=tax, + ) i += 1