minor fixes for pos trigger
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index fcb4728..d3acb75 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -129,7 +129,7 @@
this.get_terms();
},
- is_pos: function(callback_fn) {
+ is_pos: function(doc, dt, dn, callback_fn) {
cur_frm.cscript.hide_fields(this.frm.doc);
if(cint(this.frm.doc.is_pos)) {
if(!this.frm.doc.company) {
@@ -143,10 +143,9 @@
callback: function(r) {
if(!r.exc) {
me.frm.script_manager.trigger("update_stock");
- me.set_default_values();
+ frappe.model.set_default_values(me.frm.doc);
me.set_dynamic_labels();
me.calculate_taxes_and_totals();
-
if(callback_fn) callback_fn();
}
}