removed extra spaces
This commit is contained in:
parent
097a98cc10
commit
f9cb7ea611
@ -105,8 +105,7 @@ def update_pos_profile_data(doc, pos_profile, company_data):
|
|||||||
doc.apply_discount_on = pos_profile.get('apply_discount_on') or 'Grand Total'
|
doc.apply_discount_on = pos_profile.get('apply_discount_on') or 'Grand Total'
|
||||||
doc.customer_group = pos_profile.get('customer_group') or get_root('Customer Group')
|
doc.customer_group = pos_profile.get('customer_group') or get_root('Customer Group')
|
||||||
doc.territory = pos_profile.get('territory') or get_root('Territory')
|
doc.territory = pos_profile.get('territory') or get_root('Territory')
|
||||||
doc.terms = frappe.db.get_value('Terms and Conditions', pos_profile.get(
|
doc.terms = frappe.db.get_value('Terms and Conditions', pos_profile.get('tc_name'), 'terms') or doc.terms or ''
|
||||||
'tc_name'), 'terms') or doc.terms or ''
|
|
||||||
doc.offline_pos_name = ''
|
doc.offline_pos_name = ''
|
||||||
|
|
||||||
|
|
||||||
@ -396,8 +395,7 @@ def validate_records(doc):
|
|||||||
def get_customer_id(doc, customer=None):
|
def get_customer_id(doc, customer=None):
|
||||||
cust_id = None
|
cust_id = None
|
||||||
if doc.get('customer_pos_id'):
|
if doc.get('customer_pos_id'):
|
||||||
cust_id = frappe.db.get_value('Customer',
|
cust_id = frappe.db.get_value('Customer',{'customer_pos_id': doc.get('customer_pos_id')}, 'name')
|
||||||
{'customer_pos_id': doc.get('customer_pos_id')}, 'name')
|
|
||||||
|
|
||||||
if not cust_id:
|
if not cust_id:
|
||||||
customer = customer or doc.get('customer')
|
customer = customer or doc.get('customer')
|
||||||
@ -443,16 +441,14 @@ def get_territory(data):
|
|||||||
if data.get('territory'):
|
if data.get('territory'):
|
||||||
return data.get('territory')
|
return data.get('territory')
|
||||||
|
|
||||||
return frappe.db.get_single_value('Selling Settings',
|
return frappe.db.get_single_value('Selling Settings','territory') or _('All Territories')
|
||||||
'territory') or _('All Territories')
|
|
||||||
|
|
||||||
|
|
||||||
def get_customer_group(data):
|
def get_customer_group(data):
|
||||||
if data.get('customer_group'):
|
if data.get('customer_group'):
|
||||||
return data.get('customer_group')
|
return data.get('customer_group')
|
||||||
|
|
||||||
return frappe.db.get_single_value('Selling Settings',
|
return frappe.db.get_single_value('Selling Settings', 'customer_group') or frappe.db.get_value('Customer Group', {'is_group': 0}, 'name')
|
||||||
'customer_group') or frappe.db.get_value('Customer Group', {'is_group': 0}, 'name')
|
|
||||||
|
|
||||||
|
|
||||||
def make_contact(args, customer):
|
def make_contact(args, customer):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user