details:   https://code.openbravo.com/erp/devel/pi/rev/e234b596f98d
changeset: 23883:e234b596f98d
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Wed Jun 25 18:38:21 2014 +0200
summary:   Fixed bug 26940: Amount on InvoicesOrders is blank when the payment 
is reactivated

details:   https://code.openbravo.com/erp/devel/pi/rev/8b67739e1199
changeset: 23884:8b67739e1199
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Thu Jun 26 09:45:56 2014 +0200
summary:   Related to issue 26940 beautify js

diffstat:

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

diffs (18 lines):

diff -r a1adb25955a1 -r 8b67739e1199 
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
    Thu Jun 26 06:21:22 2014 +0000
+++ 
b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
    Thu Jun 26 09:45:56 2014 +0200
@@ -218,10 +218,11 @@
   var issotrx = this.view.theForm.getItem('issotrx').getValue(),
       payment = this.view.theForm.getItem('fin_payment_id').getValue();
   grid.isReady = true;
-  if (!issotrx && payment) {
+
+  if ((issotrx || !payment) && (grid.selectedIds.length === 0)) {
+    OB.APRM.AddPayment.distributeAmount(this.view, this.view.theForm, false);
+  } else {
     OB.APRM.AddPayment.updateInvOrderTotal(this.view.theForm, grid);
-  } else if (grid.selectedIds.length === 0) {
-    OB.APRM.AddPayment.distributeAmount(this.view, this.view.theForm, false);
   }
   OB.APRM.AddPayment.tryToUpdateActualExpected(this.view.theForm);
 };

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to