fix: Only fetch default Payment Terms Template if present
This commit is contained in:
parent
5b33e75c65
commit
e247e3a4b2
@ -2,6 +2,7 @@
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from re import template
|
||||
|
||||
import frappe, erpnext
|
||||
from frappe import _, msgprint, scrub
|
||||
@ -59,7 +60,10 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
|
||||
billing_address=party_address, shipping_address=shipping_address)
|
||||
|
||||
if fetch_payment_terms_template:
|
||||
party_details["payment_terms_template"] = get_payment_terms_template(party.name, party_type, company)
|
||||
payment_terms_template = get_payment_terms_template(party.name, party_type, company)
|
||||
|
||||
if payment_terms_template:
|
||||
party_details["payment_terms_template"] = payment_terms_template
|
||||
|
||||
if not party_details.get("currency"):
|
||||
party_details["currency"] = currency
|
||||
|
Loading…
x
Reference in New Issue
Block a user