fix: set against type in utils

This commit is contained in:
Gursheen Anand 2023-09-25 19:58:12 +05:30
parent 4c5a83d6cf
commit f292a0cc4c
3 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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"),