From 033e4e84f5c91ef1e6a36ffb9ff66cd41a1fd108 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Wed, 14 Jun 2023 14:20:42 +0530 Subject: [PATCH] fix: modify voucher details for liability entries --- .../doctype/payment_entry/payment_entry.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 7c813eb329..40dcc8cc68 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -924,8 +924,8 @@ class PaymentEntry(AccountsController): self.make_invoice_liability_entry(gl_entries, d) gle.update( { - "voucher_type": "Payment Entry", - "voucher_no": self.name, + "against_voucher_type": "Payment Entry", + "against_voucher": self.name, } ) @@ -973,14 +973,20 @@ class PaymentEntry(AccountsController): "party": self.party, "account_currency": self.party_account_currency, "cost_center": self.cost_center, - "voucher_type": invoice.reference_doctype, - "voucher_no": invoice.reference_name, + "voucher_type": "Payment Entry", + "voucher_no": self.name, } dr_or_cr = "credit" if invoice.reference_doctype == "Sales Invoice" else "debit" args_dict["account"] = invoice.account args_dict[dr_or_cr] = invoice.allocated_amount args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount + args_dict.update( + { + "against_voucher_type": invoice.reference_doctype, + "against_voucher": invoice.reference_name, + } + ) gle = self.get_gl_dict( args_dict, item=self,