fix: pos error pop up (#24237)

This commit is contained in:
Afshan
2021-01-02 10:30:22 +05:30
committed by GitHub
parent ffca52a348
commit a245f667d0

View File

@@ -267,6 +267,8 @@ class POSInvoice(SalesInvoice):
from erpnext.stock.get_item_details import get_pos_profile_item_details, get_pos_profile
if not self.pos_profile:
pos_profile = get_pos_profile(self.company) or {}
if not pos_profile:
frappe.throw(_("No POS Profile found. Please create a New POS Profile first"))
self.pos_profile = pos_profile.get('name')
profile = {}