added flag to function get_customer_outstanding and removed names in comments
This commit is contained in:
parent
a20c8dbd5c
commit
604eb9d689
@ -19,11 +19,11 @@ def execute(filters=None):
|
||||
|
||||
for d in customer_list:
|
||||
row = []
|
||||
#PR : 10861, Author : ashish-greycube & jigneshpshah, Email:mr.ashish.shah@gmail.com. 3rd arg is added
|
||||
outstanding_amt = get_customer_outstanding(d.name, filters.get("company"),'customer_credit_balance_report')
|
||||
credit_limit = get_credit_limit(d.name, filters.get("company"))
|
||||
#3rd argument has flag
|
||||
outstanding_amt = get_customer_outstanding(d.name, filters.get("company"),False)
|
||||
credit_limit = get_credit_limit(d.name, filters.get("company"))
|
||||
bal = flt(credit_limit) - flt(outstanding_amt)
|
||||
#PR : 10861, Author : ashish-greycube & jigneshpshah, Email:mr.ashish.shah@gmail.com. Value of new col is passed
|
||||
#Value of new col is passed
|
||||
if customer_naming_type == "Naming Series":
|
||||
row = [d.name, d.customer_name, d.bypass_credit_limit_check_at_sales_order, credit_limit, outstanding_amt, bal]
|
||||
else:
|
||||
@ -36,9 +36,8 @@ def execute(filters=None):
|
||||
|
||||
def get_columns(customer_naming_type):
|
||||
columns = [
|
||||
#PR : 10861, Author : ashish-greycube & jigneshpshah, Email:mr.ashish.shah@gmail.com
|
||||
# New column is added to reflect status of bypass credit limit check flag of sales order
|
||||
_("Customer") + ":Link/Customer:120",_("Bypass credit check at Sales Order ") + ":Check:30", _("Credit Limit") + ":Currency:120",
|
||||
_("Customer") + ":Link/Customer:120", _("Bypass credit check at Sales Order ") + ":Check:30", _("Credit Limit") + ":Currency:120",
|
||||
_("Outstanding Amt") + ":Currency:100", _("Credit Balance") + ":Currency:120"
|
||||
]
|
||||
|
||||
@ -52,7 +51,7 @@ def get_details(filters):
|
||||
|
||||
if filters.get("customer"):
|
||||
conditions += " where name = %(customer)s"
|
||||
#PR : 10861, Author : ashish-greycube & jigneshpshah, Email:mr.ashish.shah@gmail.com
|
||||
|
||||
# Return column bypass credit limit check at sales order level
|
||||
return frappe.db.sql("""select name, customer_name,bypass_credit_limit_check_at_sales_order from `tabCustomer` %s"""
|
||||
% conditions, filters, as_dict=1)
|
||||
return frappe.db.sql("""select name, customer_name, bypass_credit_limit_check_at_sales_order from `tabCustomer` %s"""
|
||||
% conditions, filters, as_dict=1)
|
Loading…
Reference in New Issue
Block a user