mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 12:55:10 +00:00
This commit is contained in:
@@ -222,9 +222,6 @@ class POSInvoice(SalesInvoice):
|
|||||||
allow_negative_stock = frappe.db.get_single_value("Stock Settings", "allow_negative_stock")
|
allow_negative_stock = frappe.db.get_single_value("Stock Settings", "allow_negative_stock")
|
||||||
|
|
||||||
for d in self.get("items"):
|
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:
|
if d.serial_no:
|
||||||
self.validate_pos_reserved_serial_nos(d)
|
self.validate_pos_reserved_serial_nos(d)
|
||||||
self.validate_delivered_serial_nos(d)
|
self.validate_delivered_serial_nos(d)
|
||||||
|
|||||||
@@ -161,13 +161,14 @@ erpnext.PointOfSale.Payment = class {
|
|||||||
|
|
||||||
frappe.ui.form.on('POS Invoice', 'contact_mobile', (frm) => {
|
frappe.ui.form.on('POS Invoice', 'contact_mobile', (frm) => {
|
||||||
const contact = frm.doc.contact_mobile;
|
const contact = frm.doc.contact_mobile;
|
||||||
|
if (!this.request_for_payment_field) return;
|
||||||
const request_button = $(this.request_for_payment_field.$input[0]);
|
const request_button = $(this.request_for_payment_field.$input[0]);
|
||||||
if (contact) {
|
if (contact) {
|
||||||
request_button.removeClass('btn-default').addClass('btn-primary');
|
request_button.removeClass('btn-default').addClass('btn-primary');
|
||||||
} else {
|
} else {
|
||||||
request_button.removeClass('btn-primary').addClass('btn-default');
|
request_button.removeClass('btn-primary').addClass('btn-default');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on('POS Invoice', 'coupon_code', (frm) => {
|
frappe.ui.form.on('POS Invoice', 'coupon_code', (frm) => {
|
||||||
if (frm.doc.coupon_code && !frm.applying_pos_coupon_code) {
|
if (frm.doc.coupon_code && !frm.applying_pos_coupon_code) {
|
||||||
|
|||||||
Reference in New Issue
Block a user