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

@@ -672,13 +672,14 @@ class Item(WebsiteGenerator):
if not records: return
document = _("Stock Reconciliation") if len(records) == 1 else _("Stock Reconciliations")
msg = _("The items {0} and {1} are present in the following {2} : <br>"
.format(frappe.bold(old_name), frappe.bold(new_name), document))
msg = _("The items {0} and {1} are present in the following {2} : ").format(
frappe.bold(old_name), frappe.bold(new_name), document)
msg += '<br>'
msg += ', '.join([get_link_to_form("Stock Reconciliation", d.parent) for d in records]) + "<br><br>"
msg += _("Note: To merge the items, create a separate Stock Reconciliation for the old item {0}"
.format(frappe.bold(old_name)))
msg += _("Note: To merge the items, create a separate Stock Reconciliation for the old item {0}").format(
frappe.bold(old_name))
frappe.throw(_(msg), title=_("Merge not allowed"))
@@ -971,7 +972,7 @@ class Item(WebsiteGenerator):
frappe.throw(_("As there are existing transactions against item {0}, you can not change the value of {1}").format(self.name, frappe.bold(self.meta.get_label(field))))
def check_if_linked_document_exists(self, field):
linked_doctypes = ["Delivery Note Item", "Sales Invoice Item", "Purchase Receipt Item",
linked_doctypes = ["Delivery Note Item", "Sales Invoice Item", "POS Invoice Item", "Purchase Receipt Item",
"Purchase Invoice Item", "Stock Entry Detail", "Stock Reconciliation Item"]
# For "Is Stock Item", following doctypes is important

View File

@@ -19,7 +19,7 @@ from erpnext.stock.doctype.item_manufacturer.item_manufacturer import get_item_m
from six import string_types, iteritems
sales_doctypes = ['Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice']
sales_doctypes = ['Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice', 'POS Invoice']
purchase_doctypes = ['Material Request', 'Supplier Quotation', 'Purchase Order', 'Purchase Receipt', 'Purchase Invoice']
@frappe.whitelist()