minor fix

This commit is contained in:
nabinhait 2014-07-10 15:27:00 +05:30
parent d5fb5d91e9
commit ee8b6f28b8

View File

@ -55,12 +55,12 @@ class CForm(Document):
def get_invoice_details(self, invoice_no): def get_invoice_details(self, invoice_no):
""" Pull details from invoices for referrence """ """ Pull details from invoices for referrence """
if invoice_no:
inv = frappe.db.get_value("Sales Invoice", invoice_no, inv = frappe.db.get_value("Sales Invoice", invoice_no,
["posting_date", "territory", "net_total", "grand_total"], as_dict=True) ["posting_date", "territory", "net_total", "grand_total"], as_dict=True)
return { return {
'invoice_date' : inv.posting_date, 'invoice_date' : inv.posting_date,
'territory' : inv.territory, 'territory' : inv.territory,
'net_total' : inv.net_total, 'net_total' : inv.net_total,
'grand_total' : inv.grand_total 'grand_total' : inv.grand_total
} }