[fix] [pos] refresh party field, fixes #4789

This commit is contained in:
Rushabh Mehta 2016-02-11 18:35:59 +05:30
parent 6f574cd60f
commit eab1671214

View File

@ -238,6 +238,10 @@ erpnext.pos.PointOfSale = Class.extend({
}, },
refresh_fields: function() { refresh_fields: function() {
this.party_field.set_input(this.frm.doc[this.party.toLowerCase()]); this.party_field.set_input(this.frm.doc[this.party.toLowerCase()]);
this.party_field.frm = this.frm;
this.party_field.doctype = this.frm.doctype;
this.party_field.docname = this.frm.docname;
this.wrapper.find('input.discount-percentage').val(this.frm.doc.additional_discount_percentage); this.wrapper.find('input.discount-percentage').val(this.frm.doc.additional_discount_percentage);
this.wrapper.find('input.discount-amount').val(this.frm.doc.discount_amount); this.wrapper.find('input.discount-amount').val(this.frm.doc.discount_amount);