Minor fixes

This commit is contained in:
Nabin Hait 2018-01-02 11:50:29 +05:30
parent 2ac1835f7d
commit 96b264b314
2 changed files with 3 additions and 3 deletions

View File

@ -107,7 +107,7 @@ def get_item_groups(pos_profile):
if pos_profile.get('item_groups'):
# Get items based on the item groups defined in the POS profile
for data in pos_profile.get('item_groups'):
item_groups.extend(["'%s'"%d.name for d in get_child_nodes('Item Group', data.item_group)])
item_groups.extend(["'%s'" % frappe.db.escape(d.name) for d in get_child_nodes('Item Group', data.item_group)])
return list(set(item_groups))

View File

@ -431,7 +431,7 @@ class BuyingController(StockController):
d.schedule_date = self.schedule_date
if d.schedule_date and getdate(d.schedule_date) < getdate(self.transaction_date):
frappe.throw(_("Expected Date cannot be before Transaction Date"))
frappe.throw(_("Row #{0}: Reqd by Date cannot be before Transaction Date").format(d.idx))
else:
frappe.throw(_("Please enter Schedule Date"))
frappe.throw(_("Please enter Reqd by Date"))