frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.92k stars 7.35k forks source link

POS should not allow to submit without full settlement #42125

Open thida-bcn opened 4 months ago

thida-bcn commented 4 months ago

Information about bug

Total Sales Amount 1000 User Paid Amount 500 Currently System allow user to Submit for Point of Sales, we should not allow user to made credit sales POS didn’t allow user to settle outstanding payment image

after fixing the code, it was working well apps/erpnext/erpnext/selling/page/point_of_sale/pos_payment.js this.$component.on('click', '.submit-order-btn', () => { const doc = this.events.get_frm().doc; const paid_amount = doc.paid_amount; const items = doc.items; const out_stand = doc.outstanding_amount if (paid_amount == 0 || !items.length) { const message = items.length ? ("You cannot submit the order without payment.") : ("You cannot submit empty order."); frappe.show_alert({ message, indicator: "orange" }); frappe.utils.play_sound("error"); return; } if (out_stand > 0){ const message = __("You cannot submit the order with Outstanding payment.") frappe.show_alert({ message, indicator: "red" }); frappe.utils.play_sound("error"); return; }

        this.events.submit_invoice();
    });

Module

selling

Version

ERPNext: v15.27.1 (version-15)

Frappe Framework: v15.29.1 (version-15)

Frappe HR: v15.22.1 (version-15)

Payments: v0.0.1 (version-15)

Webshop: v0.0.1 (version-15)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

No response

uc77 commented 4 weeks ago

@thida-bcn Has this been resolved please?

Navin-S-R commented 2 weeks ago

Raised PR for this issue #43966

uc77 commented 2 weeks ago

Thank you!

JeansReal commented 2 weeks ago

Thanks!

The ERPNext POS has been forgotten :(

uc77 commented 1 week ago

In which release will this be rectified ?