mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
[fix] [patch] fixed paid_amount & patch for default pos view check in features setup
This commit is contained in:
@@ -339,7 +339,7 @@ erpnext.POS = Class.extend({
|
||||
}
|
||||
|
||||
// if form is submitted & cancelled then disable all input box & buttons
|
||||
if (cur_frm.doc.docstatus>=1) {
|
||||
if (cur_frm.doc.docstatus>=1 && cint(cur_frm.doc.is_pos)) {
|
||||
me.wrapper.find('input, button').each(function () {
|
||||
$(this).prop('disabled', true);
|
||||
});
|
||||
|
||||
@@ -27,10 +27,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
}
|
||||
|
||||
// toggle to pos view if is_pos is 1 in user_defaults
|
||||
if (cint(wn.defaults.get_user_defaults("is_pos"))===1 || cur_frm.doc.is_pos) {
|
||||
this.frm.set_value("is_pos", 1);
|
||||
this.is_pos();
|
||||
cur_frm.cscript.toggle_pos(true);
|
||||
if ((cint(wn.defaults.get_user_defaults("is_pos"))===1 || cur_frm.doc.is_pos) &&
|
||||
cint(wn.defaults.get_user_defaults("fs_pos_view"))===1) {
|
||||
this.frm.set_value("is_pos", 1);
|
||||
this.is_pos();
|
||||
cur_frm.cscript.toggle_pos(true);
|
||||
}
|
||||
|
||||
// if document is POS then change default print format to "POS Invoice"
|
||||
@@ -192,7 +193,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount), precision("write_off_amount"));
|
||||
}
|
||||
|
||||
this.frm.runclientscript("write_off_amount");
|
||||
this.frm.script_manager.trigger("write_off_amount");
|
||||
},
|
||||
|
||||
write_off_amount: function() {
|
||||
|
||||
Reference in New Issue
Block a user