From 6f61e2c4262549521d96650085b12f9d9614dfaf Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 16 Jul 2013 18:47:06 +0530 Subject: [PATCH] [fix] [minor] net_total on sales/purchase register --- accounts/report/purchase_register/purchase_register.py | 4 ++-- accounts/report/sales_register/sales_register.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/accounts/report/purchase_register/purchase_register.py b/accounts/report/purchase_register/purchase_register.py index 09705413a6..aa55a3b076 100644 --- a/accounts/report/purchase_register/purchase_register.py +++ b/accounts/report/purchase_register/purchase_register.py @@ -54,7 +54,7 @@ def execute(filters=None): row.append(expense_amount) # net total - row.append(net_total) + row.append(net_total or inv.net_total) # tax account total_tax = 0 @@ -121,7 +121,7 @@ def get_conditions(filters): def get_invoices(filters): conditions = get_conditions(filters) return webnotes.conn.sql("""select name, posting_date, credit_to, supplier, supplier_name, - bill_no, bill_date, remarks, grand_total, outstanding_amount + bill_no, bill_date, remarks, net_total, grand_total, outstanding_amount from `tabPurchase Invoice` where docstatus = 1 %s order by posting_date desc, name desc""" % conditions, filters, as_dict=1) diff --git a/accounts/report/sales_register/sales_register.py b/accounts/report/sales_register/sales_register.py index 91ad1c282f..653b5e65a0 100644 --- a/accounts/report/sales_register/sales_register.py +++ b/accounts/report/sales_register/sales_register.py @@ -54,7 +54,7 @@ def execute(filters=None): row.append(income_amount) # net total - row.append(net_total) + row.append(net_total or inv.net_total) # tax account total_tax = 0 @@ -120,7 +120,7 @@ def get_conditions(filters): def get_invoices(filters): conditions = get_conditions(filters) return webnotes.conn.sql("""select name, posting_date, debit_to, project_name, customer, - customer_name, remarks, grand_total, rounded_total, outstanding_amount + customer_name, remarks, net_total, grand_total, rounded_total, outstanding_amount from `tabSales Invoice` where docstatus = 1 %s order by posting_date desc, name desc""" % conditions, filters, as_dict=1)