From 1e4e61bd948463caac12f302a0896753421f6517 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Mon, 4 Mar 2019 12:36:51 +0530 Subject: [PATCH] Minor fixes --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 3 +-- erpnext/accounts/doctype/payment_entry/payment_entry.py | 3 +-- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 3 +-- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 9813ba4ef5..27c946ddc1 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -53,11 +53,10 @@ class JournalEntry(AccountsController): self.update_inter_company_jv() def before_print(self): - gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Journal Entry", + self.gl = frappe.get_list("GL Entry",filters={"voucher_type": "Journal Entry", "voucher_no": self.name} , fields=["account", "party_type", "party", "debit", "credit", "remarks"] ) - self.gl = gl_entries def get_title(self): return self.pay_to_recd_from or self.accounts[0].account diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index ef4cd3d31d..00ffd17234 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -71,11 +71,10 @@ class PaymentEntry(AccountsController): self.update_expense_claim() def before_print(self): - gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Payment Entry", + self.gl = frappe.get_list("GL Entry",filters={"voucher_type": "Payment Entry", "voucher_no": self.name} , fields=["account", "party_type", "party", "debit", "credit", "remarks"] ) - self.gl = gl_entries def on_cancel(self): self.setup_party_account_field() diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 9ac532dd69..cbade186ad 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -54,11 +54,10 @@ class PurchaseInvoice(BuyingController): self.release_date = '' def before_print(self): - gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Purchase Invoice", + self.gl = frappe.get_list("GL Entry",filters={"voucher_type": "Purchase Invoice", "voucher_no": self.name} , fields=["account", "party_type", "party", "debit", "credit"] ) - self.gl = gl_entries def invoice_is_blocked(self): return self.on_hold and (not self.release_date or self.release_date > getdate(nowdate())) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 5e747b3523..5bc127239a 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -206,11 +206,10 @@ class SalesInvoice(SellingController): self.update_time_sheet(None) def before_print(self): - gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Sales Invoice", + self.gl = frappe.get_list("GL Entry",filters={"voucher_type": "Sales Invoice", "voucher_no": self.name} , fields=["account", "party_type", "party", "debit", "credit"] ) - self.gl = gl_entries def on_cancel(self): self.check_close_sales_order("sales_order")