File tree Expand file tree Collapse file tree
erpnext/accounts/doctype/payment_entry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -839,7 +839,7 @@ frappe.ui.form.on("Payment Entry", {
839839 paid_amount : function ( frm ) {
840840 frm . set_value ( "base_paid_amount" , flt ( frm . doc . paid_amount ) * flt ( frm . doc . source_exchange_rate ) ) ;
841841 let company_currency = frappe . get_doc ( ":Company" , frm . doc . company ) . default_currency ;
842- if ( frm . doc . paid_amount ) {
842+ if ( ! frm . doc . received_amount ) {
843843 if ( frm . doc . paid_from_account_currency == frm . doc . paid_to_account_currency ) {
844844 frm . set_value ( "received_amount" , frm . doc . paid_amount ) ;
845845 } else if ( company_currency == frm . doc . paid_to_account_currency ) {
@@ -860,7 +860,7 @@ frappe.ui.form.on("Payment Entry", {
860860 flt ( frm . doc . received_amount ) * flt ( frm . doc . target_exchange_rate )
861861 ) ;
862862
863- if ( frm . doc . received_amount ) {
863+ if ( ! frm . doc . paid_amount ) {
864864 if ( frm . doc . paid_from_account_currency == frm . doc . paid_to_account_currency ) {
865865 frm . set_value ( "paid_amount" , frm . doc . received_amount ) ;
866866 if ( frm . doc . target_exchange_rate ) {
You can’t perform that action at this time.
0 commit comments