Merge pull request #6956 from rohitwaghchaure/payment_entry_issue
[Fix] Payment entry, exchange rate is not set properly
This commit is contained in:
commit
e346a499c7
@ -406,7 +406,10 @@ frappe.ui.form.on('Payment Entry', {
|
||||
|
||||
if(!frm.doc.paid_amount && frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency) {
|
||||
frm.set_value("paid_amount", frm.doc.received_amount);
|
||||
frm.set_value("source_exchange_rate", frm.doc.target_exchange_rate);
|
||||
|
||||
if(frm.doc.target_exchange_rate) {
|
||||
frm.set_value("source_exchange_rate", frm.doc.target_exchange_rate);
|
||||
}
|
||||
frm.set_value("base_paid_amount", frm.doc.base_received_amount);
|
||||
}
|
||||
|
||||
@ -426,7 +429,10 @@ frappe.ui.form.on('Payment Entry', {
|
||||
(frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency)) {
|
||||
|
||||
frm.set_value("received_amount", frm.doc.paid_amount);
|
||||
frm.set_value("target_exchange_rate", frm.doc.source_exchange_rate);
|
||||
|
||||
if(frm.doc.source_exchange_rate) {
|
||||
frm.set_value("target_exchange_rate", frm.doc.source_exchange_rate);
|
||||
}
|
||||
frm.set_value("base_received_amount", frm.doc.base_paid_amount);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user