fix(pos): validate product bundles while submitting pos invoice (#31615)

This commit is contained in:
Saqib Ansari 2022-07-21 12:17:58 +05:30 committed by GitHub
parent 5a3999e236
commit 2eaa8b17bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -222,9 +222,6 @@ class POSInvoice(SalesInvoice):
from erpnext.stock.stock_ledger import is_negative_stock_allowed
for d in self.get("items"):
is_service_item = not (frappe.db.get_value("Item", d.get("item_code"), "is_stock_item"))
if is_service_item:
return
if d.serial_no:
self.validate_pos_reserved_serial_nos(d)
self.validate_delivered_serial_nos(d)

View File

@ -161,13 +161,13 @@ erpnext.PointOfSale.Payment = class {
frappe.ui.form.on('POS Invoice', 'contact_mobile', (frm) => {
const contact = frm.doc.contact_mobile;
const request_button = $(this.request_for_payment_field.$input[0]);
const request_button = $(this.request_for_payment_field?.$input[0]);
if (contact) {
request_button.removeClass('btn-default').addClass('btn-primary');
} else {
request_button.removeClass('btn-primary').addClass('btn-default');
}
});
}
});
frappe.ui.form.on('POS Invoice', 'coupon_code', (frm) => {
if (frm.doc.coupon_code && !frm.applying_pos_coupon_code) {