[fix] [patch] fixed paid_amount & patch for default pos view check in features setup

This commit is contained in:
Akhilesh Darjee
2013-09-05 12:59:33 +05:30
parent 734b2aab5c
commit 38e8f989fa
5 changed files with 25 additions and 10 deletions

View File

@@ -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);
});

View File

@@ -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() {