[Fix] Validation issue for online POS profile (#12276)

This commit is contained in:
rohitwaghchaure 2018-01-01 16:15:41 +05:30 committed by Nabin Hait
parent da82674b47
commit 2640c7eec5

View File

@ -63,7 +63,11 @@ class POSProfile(Document):
if len(default_mode_of_payment) > 1:
frappe.throw(_("Multiple default mode of payment is not allowed"))
def validate_customer_territory_group(self):
if not frappe.db.get_single_value('POS Settings', 'use_pos_in_offline_mode'):
return
if not self.territory:
frappe.throw(_("Territory is Required in POS Profile"), title="Mandatory Field")