From f292a0cc4c89814607fec0bb66d1c458d6624750 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Mon, 25 Sep 2023 19:58:12 +0530 Subject: [PATCH] fix: set against type in utils --- .../accounts/doctype/invoice_discounting/invoice_discounting.py | 2 ++ erpnext/regional/united_arab_emirates/utils.py | 1 + erpnext/stock/doctype/stock_entry/stock_entry.py | 2 ++ 3 files changed, 5 insertions(+) diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py index 5bd4585a9a..744dff4670 100644 --- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py +++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py @@ -125,6 +125,7 @@ class InvoiceDiscounting(AccountsController): "account": inv.debit_to, "party_type": "Customer", "party": d.customer, + "against_type": "Account", "against": self.accounts_receivable_credit, "credit": outstanding_in_company_currency, "credit_in_account_currency": outstanding_in_company_currency @@ -145,6 +146,7 @@ class InvoiceDiscounting(AccountsController): "account": self.accounts_receivable_credit, "party_type": "Customer", "party": d.customer, + "against_type": "Account", "against": inv.debit_to, "debit": outstanding_in_company_currency, "debit_in_account_currency": outstanding_in_company_currency diff --git a/erpnext/regional/united_arab_emirates/utils.py b/erpnext/regional/united_arab_emirates/utils.py index a910af6a1d..d70d5466e0 100644 --- a/erpnext/regional/united_arab_emirates/utils.py +++ b/erpnext/regional/united_arab_emirates/utils.py @@ -153,6 +153,7 @@ def make_gl_entry(tax, gl_entries, doc, tax_accounts): "account": tax.account_head, "cost_center": tax.cost_center, "posting_date": doc.posting_date, + "against_type": "Supplier", "against": doc.supplier, dr_or_cr: tax.base_tax_amount_after_discount_amount, dr_or_cr + "_in_account_currency": tax.base_tax_amount_after_discount_amount diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index a2cae7ff8d..2124168b62 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1360,6 +1360,7 @@ class StockEntry(StockController): self.get_gl_dict( { "account": account, + "against_type": "Account", "against": d.expense_account, "cost_center": d.cost_center, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), @@ -1374,6 +1375,7 @@ class StockEntry(StockController): self.get_gl_dict( { "account": d.expense_account, + "against_type": "Account", "against": account, "cost_center": d.cost_center, "remarks": self.get("remarks") or _("Accounting Entry for Stock"),