From 0c9945e0bf97bf8802bb458dc183c0797f048325 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Mon, 4 Mar 2019 16:14:53 +0530 Subject: [PATCH] Minor fixes --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 2 +- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 +- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 2 +- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- .../bank_and_cash_payment_voucher.html | 4 ++-- .../journal_auditing_voucher/journal_auditing_voucher.html | 4 ++-- .../purchase_auditing_voucher/purchase_auditing_voucher.html | 2 +- .../sales_auditing_voucher/sales_auditing_voucher.html | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 27c946ddc1..7c48b5c4f8 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -53,7 +53,7 @@ class JournalEntry(AccountsController): self.update_inter_company_jv() def before_print(self): - self.gl = frappe.get_list("GL Entry",filters={"voucher_type": "Journal Entry", + self.gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Journal Entry", "voucher_no": self.name} , fields=["account", "party_type", "party", "debit", "credit", "remarks"] ) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 00ffd17234..2f56a51a73 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -71,7 +71,7 @@ class PaymentEntry(AccountsController): self.update_expense_claim() def before_print(self): - self.gl = frappe.get_list("GL Entry",filters={"voucher_type": "Payment Entry", + self.gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Payment Entry", "voucher_no": self.name} , fields=["account", "party_type", "party", "debit", "credit", "remarks"] ) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index cbade186ad..c3978d78db 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -54,7 +54,7 @@ class PurchaseInvoice(BuyingController): self.release_date = '' def before_print(self): - self.gl = frappe.get_list("GL Entry",filters={"voucher_type": "Purchase Invoice", + self.gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Purchase Invoice", "voucher_no": self.name} , fields=["account", "party_type", "party", "debit", "credit"] ) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 5bc127239a..6eea8ad764 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -206,7 +206,7 @@ class SalesInvoice(SellingController): self.update_time_sheet(None) def before_print(self): - self.gl = frappe.get_list("GL Entry",filters={"voucher_type": "Sales Invoice", + self.gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Sales Invoice", "voucher_no": self.name} , fields=["account", "party_type", "party", "debit", "credit"] ) diff --git a/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html b/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html index 7b1a8a2a1c..2eadb2a92a 100644 --- a/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html +++ b/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html @@ -34,7 +34,7 @@ Credit {% set total_credit = 0 -%} - {% for entries in doc.gl %} + {% for entries in doc.gl_entries %} {% if entries.debit == 0.0 %} {{ entries.account }} @@ -59,7 +59,7 @@ Debit {% set total_debit = 0 -%} - {% for entries in doc.gl %} + {% for entries in doc.gl_entries %} {% if entries.credit == 0.0 %} {{ entries.account }} diff --git a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html index cacb5f2a57..4565559084 100644 --- a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html +++ b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html @@ -34,7 +34,7 @@ Credit {% set total_credit = 0 -%} - {% for entries in doc.gl %} + {% for entries in doc.gl_entries %} {% if entries.debit == 0.0 %} {{ entries.account }} @@ -56,7 +56,7 @@ Debit {% set total_debit = 0 -%} - {% for entries in doc.gl %} + {% for entries in doc.gl_entries %} {% if entries.credit == 0.0 %} {{ entries.account }} diff --git a/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html b/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html index c8bd5c21ec..35852e1e1c 100644 --- a/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html +++ b/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html @@ -79,7 +79,7 @@ Credit Amount Debit Amount - {% for entries in doc.gl %} + {% for entries in doc.gl_entries %} {{ loop.index }} {{ entries.account }} diff --git a/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html b/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html index b3ce888fa5..04de83de70 100644 --- a/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html +++ b/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html @@ -73,7 +73,7 @@ Credit Amount Debit Amount - {% for entries in doc.gl %} + {% for entries in doc.gl_entries %} {{ loop.index }} {{ entries.account }}