[Fix] Allow to change exchange rate in the payment entry if allow stale is enabled (#12128)

This commit is contained in:
rohitwaghchaure 2017-12-22 10:59:01 +05:30 committed by Nabin Hait
parent 174900506e
commit 443691aaf8

View File

@ -408,7 +408,7 @@ frappe.ui.form.on('Payment Entry', {
}
// Make read only if Accounts Settings doesn't allow stale rates
frm.set_df_property("source_exchange_rate", "read_only", erpnext.stale_rate_allowed());
frm.set_df_property("source_exchange_rate", "read_only", erpnext.stale_rate_allowed() ? 0 : 1);
},
target_exchange_rate: function(frm) {
@ -429,7 +429,7 @@ frappe.ui.form.on('Payment Entry', {
frm.set_paid_amount_based_on_received_amount = false;
// Make read only if Accounts Settings doesn't allow stale rates
frm.set_df_property("target_exchange_rate", "read_only", erpnext.stale_rate_allowed());
frm.set_df_property("target_exchange_rate", "read_only", erpnext.stale_rate_allowed() ? 0 : 1);
},
paid_amount: function(frm) {