fix(pos): multiple pos fixes and additions (#24227)

* fix: make custom fields in pos invoice similar to sales invoice

* feat: allow/disallow rate & discount change

* fix: any pos profile can be selected while creating pos opening

* fix: cannot add item to cart

* fix: validate phone payment only if payment request exists

* fix: replace pos payment method patch

* chore: rearrange item & customer group filter

* fix: allow/disallow invoice level discount

* fix: updating qty of item with uom having space char

* fix: move configuration checbox to config section

* fix: invalid item rate trigger

* fix: cannot remove item from draft invoices

* fix: customer currency not set in pos invoice

* fix: duplicate item error message

* fix: sales uom not fetched in pos invoice

* fix: cannot add taxes to pos invoice for uae region

* fix: cannot merge pos invoice into credit note

* fix: tax calculation while merging pos invoices

* feat: delete draft orders from order list

* fix: merging of pos invoice with pricing rules
This commit is contained in:
Saqib
2021-01-28 17:58:55 +05:30
committed by GitHub
parent 0d9a8ae4d2
commit ac9e6ff704
22 changed files with 194 additions and 65 deletions

View File

@@ -469,13 +469,19 @@ class SellingController(StockController):
non_stock_items = [d.item_code, d.description]
if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1:
duplicate_items_msg = _("Item {0} entered multiple times.").format(frappe.bold(d.item_code))
duplicate_items_msg += "<br><br>"
duplicate_items_msg += _("Please enable {} in {} to allow same item in multiple rows").format(
frappe.bold("Allow Item to Be Added Multiple Times in a Transaction"),
get_link_to_form("Selling Settings", "Selling Settings")
)
if stock_items in check_list:
frappe.throw(_("Note: Item {0} entered multiple times").format(d.item_code))
frappe.throw(duplicate_items_msg)
else:
check_list.append(stock_items)
else:
if non_stock_items in chk_dupl_itm:
frappe.throw(_("Note: Item {0} entered multiple times").format(d.item_code))
frappe.throw(duplicate_items_msg)
else:
chk_dupl_itm.append(non_stock_items)