[fix] correctly choice 'Credit Limit' (#9932)
* [fix] correctly choice 'credit limit' If 'Credit Days Based On' is empty in 'Supplier Type/Customer Group' then value 'Due Date' in 'Purchase/Sales Invoice' doesn't taken from the default settings * Update party.py * [fix] correctly choice 'Credit Limit'
This commit is contained in:
parent
e6c2ae3682
commit
96bb6099d6
@ -284,12 +284,14 @@ def get_credit_days(party_type, party, company):
|
||||
if not credit_days_based_on:
|
||||
if party_type == "Customer":
|
||||
credit_days_based_on, credit_days = \
|
||||
frappe.db.get_value("Customer Group", customer_group, ["credit_days_based_on", "credit_days"]) \
|
||||
or frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"])
|
||||
frappe.db.get_value("Customer Group", customer_group, ["credit_days_based_on", "credit_days"])
|
||||
else:
|
||||
credit_days_based_on, credit_days = \
|
||||
frappe.db.get_value("Supplier Type", supplier_type, ["credit_days_based_on", "credit_days"])\
|
||||
or frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"] )
|
||||
frappe.db.get_value("Supplier Type", supplier_type, ["credit_days_based_on", "credit_days"])
|
||||
|
||||
if not (credit_days_based_on and credit_days):
|
||||
credit_days_based_on, credit_days = \
|
||||
frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"])
|
||||
|
||||
return credit_days_based_on, credit_days
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user