Merge branch 'develop' into pos-refactor

This commit is contained in:
Faris Ansari
2017-09-05 17:18:04 +05:30
committed by GitHub
316 changed files with 47649 additions and 38389 deletions

View File

@@ -531,12 +531,23 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if(this.frm.doc.ignore_pricing_rule) {
this.calculate_taxes_and_totals();
} else if (!this.in_apply_price_list){
this.set_actual_charges_based_on_currency();
this.apply_price_list();
}
}
},
set_actual_charges_based_on_currency: function() {
var me = this;
$.each(this.frm.doc.taxes || [], function(i, d) {
if(d.charge_type == "Actual") {
frappe.model.set_value(d.doctype, d.name, "tax_amount",
flt(d.tax_amount) / flt(me.frm.doc.conversion_rate));
}
});
},
get_exchange_rate: function(transaction_date, from_currency, to_currency, callback) {
if (!transaction_date || !from_currency || !to_currency) return;
return frappe.call({