Minor fixes

This commit is contained in:
Anurag Mishra 2019-03-04 12:36:51 +05:30
parent 879e5fd8bb
commit 1e4e61bd94
4 changed files with 4 additions and 8 deletions

View File

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

View File

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

View File

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

View File

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