[Fix] Onload pull pos profile data for IS POS invoice

This commit is contained in:
Rohit Waghchaure 2016-11-17 17:27:57 +05:30
parent d79cca3ba7
commit 2ef7c7ae5c

View File

@ -20,6 +20,13 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
erpnext.queries.setup_queries(this.frm, "Warehouse", function() {
return erpnext.queries.warehouse(me.frm.doc);
});
if(this.frm.doc.__islocal && this.frm.doc.is_pos) {
//Load pos profile data on the invoice if the default value of Is POS is 1
me.frm.script_manager.trigger("is_pos");
me.frm.refresh_fields();
}
},
refresh: function(doc, dt, dn) {