Get exchange rate only if date and currency is present (#8712)
* Get exchange rate only if date and currency is present * Update transaction.js
This commit is contained in:
parent
b7e740ff45
commit
6e7407962f
@ -204,7 +204,7 @@ class PurchaseInvoice(BuyingController):
|
||||
if frappe.db.get_value("Buying Settings", None, "po_required") == 'Yes':
|
||||
for d in self.get('items'):
|
||||
if not d.purchase_order:
|
||||
throw(_("Purchse Order number required for Item {0}").format(d.item_code))
|
||||
throw(_("Purchase Order number required for Item {0}").format(d.item_code))
|
||||
|
||||
def pr_required(self):
|
||||
stock_items = self.get_stock_items()
|
||||
|
@ -500,6 +500,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
},
|
||||
|
||||
get_exchange_rate: function(transaction_date, from_currency, to_currency, callback) {
|
||||
if !(transaction_date && from_currency && to_currency) return;
|
||||
return frappe.call({
|
||||
method: "erpnext.setup.utils.get_exchange_rate",
|
||||
args: {
|
||||
@ -762,7 +763,6 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
if(calculate_taxes_and_totals) me.calculate_taxes_and_totals();
|
||||
return;
|
||||
}
|
||||
|
||||
return this.frm.call({
|
||||
method: "erpnext.accounts.doctype.pricing_rule.pricing_rule.apply_pricing_rule",
|
||||
args: { args: args },
|
||||
@ -1117,4 +1117,4 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
|
||||
return method
|
||||
},
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user