details:   https://code.openbravo.com/erp/devel/pi/rev/4e896f3e4b17
changeset: 34468:4e896f3e4b17
user:      Armaignac <collazoandy4 <at> gmail.com>
date:      Wed Jul 18 23:32:49 2018 -0400
summary:   Fixes issue 38864: Problems in 'Add Details' (Payment In) when 
autodistribute
amount property is disabled

When 'Add Payment: Automatically distribute amounts' property is set to 'N' or
there are more than 100 shown invoices, if you have many selected invoices and
you change the 'Actual Payment' value to the same as 'Expected Payment',
'There is a difference of' doesn't refresh automatically (it should be 0) and
therefore, 'Overpayment Action' combo box doesn't dissapear. Both fields should
be refreshed in real time when 'Actual Payment' is modified.

Now the fields are properly updated even if the amount doesn't distribute
automatically

diffstat:

 
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
 |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r bbdfc89a0802 -r 4e896f3e4b17 
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
--- 
a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
    Wed Jul 25 11:34:31 2018 +0200
+++ 
b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
    Wed Jul 18 23:32:49 2018 -0400
@@ -386,6 +386,7 @@
       if (showMessage) {
         
orderInvoice.contentView.messageBar.setMessage(isc.OBMessageBar.TYPE_INFO, 
'<div><div class="' + OB.Styles.MessageBar.leftMsgContainerStyle + '">' + 
OB.I18N.getLabel('APRM_NoDistributeMsg') + '</div><div class="' + 
OB.Styles.MessageBar.rightMsgContainerStyle + '"><a href="#" class="' + 
OB.Styles.MessageBar.rightMsgTextStyle + '" onclick="' + 'window[\'' + 
orderInvoice.contentView.messageBar.ID + '\'].hide(); 
OB.PropertyStore.set(\'APRM_ShowNoDistributeMsg\', \'N\');">' + 
OB.I18N.getLabel('OBUIAPP_NeverShowMessageAgain') + '</a></div></div>', ' ');
       }
+      OB.APRM.AddPayment.updateInvOrderTotal(form, orderInvoice);
       return;
     } else {
       // hide the message bar if it is still showing the APRM_NoDistributeMsg 
message and the distribution is about to be done
@@ -470,8 +471,8 @@
       }
     }
     OB.APRM.AddPayment.updateActualExpected(form);
-    OB.APRM.AddPayment.updateInvOrderTotal(form, orderInvoice);
   }
+  OB.APRM.AddPayment.updateInvOrderTotal(form, orderInvoice);
 };
 
 OB.APRM.AddPayment.updateTotal = function (form) {

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to