This commit is contained in:
tunde 2017-09-05 18:11:58 +01:00
parent e0cec4ef05
commit e5973e45f1

View File

@ -275,8 +275,8 @@ def get_due_date(posting_date, party_type, party):
if party_type == "Supplier":
supplier_type = frappe.db.get_value(party_type, party, fieldname="supplier_type")
template_name = frappe.db.get_value("Supplier Type", supplier_type, fieldname="payment_terms")
print("template name:", template_name)
due_date = get_due_date_from_template(template_name, posting_date).strftime("%Y-%m-%d")
if template_name:
due_date = get_due_date_from_template(template_name, posting_date).strftime("%Y-%m-%d")
return due_date