Merge pull request #12617 from saurabh6790/ux_fix

parse value before setting it to dissable_rounded_total on Purchase Invoice
This commit is contained in:
rohitwaghchaure 2018-01-23 17:35:16 +05:30 committed by GitHub
commit f3a452850e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
this.frm.set_df_property("credit_to", "print_hide", 0);
}
} else {
this.frm.set_value("disable_rounded_total", frappe.sys_defaults.disable_rounded_total);
this.frm.set_value("disable_rounded_total", cint(frappe.sys_defaults.disable_rounded_total));
}
// formatter for material request item

View File

@ -539,7 +539,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
// due_date is to be changed, payment terms template and/or payment schedule must
// be removed as due_date is automatically changed based on payment terms
if (this.frm.doc.due_date) {
if (this.frm.doc.payment_terms_template || this.frm.doc.payment_schedule.length) {
if (this.frm.doc.payment_terms_template ||
(this.frm.doc.payment_schedule && this.frm.doc.payment_schedule.length)) {
var message1 = "";
var message2 = "";
var final_message = "Please clear the ";