[fix] [minor] conversion rate fix

This commit is contained in:
Akhilesh Darjee 2013-10-17 11:31:11 +05:30
parent 61b5c59e70
commit 564c621c3e

View File

@ -26,7 +26,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
me.frm.set_value(fieldname, value);
});
}
if(this.other_fname) {
this[this.other_fname + "_remove"] = this.calculate_taxes_and_totals;
}
@ -46,6 +46,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
freeze: true,
callback: function(r) {
// remove this call when using client side mapper
me.frm.script_manager.trigger("company");
me.set_default_values();
me.set_dynamic_labels();
me.calculate_taxes_and_totals()
@ -226,7 +227,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
plc_conversion_rate: function() {
if(this.frm.doc.price_list_currency === this.get_company_currency()) {
this.frm.set_value("plc_conversion_rate", 1.0);
} else if(this.frm.doc.price_list_currency === this.frm.doc.currency) {
}
if(this.frm.doc.price_list_currency === this.frm.doc.currency) {
this.frm.set_value("conversion_rate", this.frm.doc.plc_conversion_rate);
this.calculate_taxes_and_totals();
}