Is frozen and Disabled Columns added to Customer Credit Report (#15560)

This commit is contained in:
Sharath C 2018-10-03 10:41:11 +05:30 committed by Rushabh Mehta
parent c0b684dc30
commit 1c44d93b93

View File

@ -29,9 +29,11 @@ def execute(filters=None):
if customer_naming_type == "Naming Series":
row = [d.name, d.customer_name, credit_limit, outstanding_amt, bal,
d.bypass_credit_limit_check_at_sales_order]
d.bypass_credit_limit_check_at_sales_order, d.is_frozen,
d.disabled]
else:
row = [d.name, credit_limit, outstanding_amt, bal, d.bypass_credit_limit_check_at_sales_order]
row = [d.name, credit_limit, outstanding_amt, bal,
d.bypass_credit_limit_check_at_sales_order, d.is_frozen, d.disabled]
if credit_limit:
data.append(row)
@ -44,7 +46,9 @@ def get_columns(customer_naming_type):
_("Credit Limit") + ":Currency:120",
_("Outstanding Amt") + ":Currency:100",
_("Credit Balance") + ":Currency:120",
_("Bypass credit check at Sales Order ") + ":Check:240"
_("Bypass credit check at Sales Order ") + ":Check:80",
_("Is Frozen") + ":Check:80",
_("Disabled") + ":Check:80",
]
if customer_naming_type == "Naming Series":
@ -59,5 +63,5 @@ def get_details(filters):
conditions += " where name = %(customer)s"
return frappe.db.sql("""select name, customer_name,
bypass_credit_limit_check_at_sales_order from `tabCustomer` %s
""" % conditions, filters, as_dict=1)
bypass_credit_limit_check_at_sales_order, is_frozen, disabled from `tabCustomer` %s
""" % conditions, filters, as_dict=1)