get exchange rate on change of date

This commit is contained in:
Nabin Hait
2016-12-08 14:43:11 +05:30
parent 1cc55fbbcb
commit 87d70279c6
2 changed files with 85 additions and 75 deletions

View File

@@ -413,6 +413,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
transaction_date: function() {
if (this.frm.doc.transaction_date) {
this.frm.transaction_date = this.frm.doc.transaction_date;
frappe.ui.form.trigger(me.frm.doc.doctype, "currency");
}
},
@@ -434,9 +435,12 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
callback: function(r, rt) {
if(r.message) {
me.frm.set_value("due_date", r.message);
frappe.ui.form.trigger(me.frm.doc.doctype, "currency");
}
}
})
} else {
frappe.ui.form.trigger(me.frm.doc.doctype, "currency");
}
}
},