[Fix] Resolved issues suggested by Codacy

This commit is contained in:
deepak-mnt 2018-01-06 19:32:45 +05:30 committed by Saurabh
parent 8f3d394485
commit d7da89bf5a
2 changed files with 5 additions and 5 deletions

View File

@ -480,17 +480,17 @@ erpnext.pos.PointOfSale = class PointOfSale {
me.frm.doc["allow_print_before_pay"] = 0; me.frm.doc["allow_print_before_pay"] = 0;
return new Promise(resolve => { return new Promise(resolve => {
return this.frm.call({ return this.frm.call({
method: "erpnext.selling.page.point_of_sale.point_of_sale.fetch_pos_profile_detail", method:"erpnext.selling.page.point_of_sale.point_of_sale.fetch_pos_profile_detail",
args:{ args:{
pos_profile : me.frm.doc.pos_profile pos_profile:me.frm.doc.pos_profile
} }
}).then((r) => { }).then((r) => {
me.frm.doc["allow_print_before_pay"] = r.message; me.frm.doc["allow_print_before_pay"] = r.message;
this.set_form_action(); this.set_form_action();
resolve(); resolve();
}); });
}); });
} }
prepare_menu() { prepare_menu() {
var me = this; var me = this;

View File

@ -96,7 +96,7 @@ def submit_invoice(doc,islocal_dummy):
doc = frappe.get_doc('Sales Invoice',args["name"]) doc = frappe.get_doc('Sales Invoice',args["name"])
else: else:
doc = frappe.new_doc('Sales Invoice') doc = frappe.new_doc('Sales Invoice')
doc.update(args) doc.update(args)
doc.run_method("set_missing_values") doc.run_method("set_missing_values")
doc.run_method("calculate_taxes_and_totals") doc.run_method("calculate_taxes_and_totals")