[fix] [minor] net_total on sales/purchase register
diff --git a/accounts/report/purchase_register/purchase_register.py b/accounts/report/purchase_register/purchase_register.py
index 0970541..aa55a3b 100644
--- a/accounts/report/purchase_register/purchase_register.py
+++ b/accounts/report/purchase_register/purchase_register.py
@@ -54,7 +54,7 @@
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_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 91ad1c2..653b5e6 100644
--- a/accounts/report/sales_register/sales_register.py
+++ b/accounts/report/sales_register/sales_register.py
@@ -54,7 +54,7 @@
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_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)