Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions erpnext/accounts/doctype/pos_invoice/pos_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ def validate_stock_availablility(self):
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)
Expand Down
6 changes: 3 additions & 3 deletions erpnext/selling/page/point_of_sale/pos_payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down