details:   https://code.openbravo.com/erp/devel/pi/rev/3aaaf391b34d
changeset: 23873:3aaaf391b34d
user:      Sandra Huguet <sandra.huguet <at> openbravo.com>
date:      Wed Jun 25 11:33:43 2014 +0200
summary:   Fixed issue 26937 Payments against GLItems are not automatically 
deposited in the FA

diffstat:

 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
 |  10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diffs (29 lines):

diff -r 4d20bc9176a9 -r 3aaaf391b34d 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
--- 
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
     Tue Jun 24 16:59:15 2014 +0200
+++ 
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
     Wed Jun 25 11:33:43 2014 +0200
@@ -186,11 +186,8 @@
             try {
               OBContext.setAdminMode(true);
               for (FIN_PaymentDetail pd : payment.getFINPaymentDetailList()) {
-                if (pd.getGLItem() != null) {
-                  continue;
-                }
                 for (FIN_PaymentScheduleDetail psd : 
pd.getFINPaymentScheduleDetailList()) {
-                  if (psd.isInvoicePaid()
+                  if ((pd.getGLItem() != null || psd.isInvoicePaid())
                       && 
FIN_Utility.isAutomaticDepositWithdrawn(paymentRunPayment.getPayment())
                       && 
paymentRunPayment.getPayment().getAmount().compareTo(BigDecimal.ZERO) != 0) {
                     FIN_FinaccTransaction transaction = TransactionsDao
@@ -215,11 +212,8 @@
           try {
             OBContext.setAdminMode(true);
             for (FIN_PaymentDetail pd : payment.getFINPaymentDetailList()) {
-              if (pd.getGLItem() != null) {
-                continue;
-              }
               for (FIN_PaymentScheduleDetail psd : 
pd.getFINPaymentScheduleDetailList()) {
-                if (psd.isInvoicePaid()) {
+                if (pd.getGLItem() != null || psd.isInvoicePaid()) {
                   updatePaymentAmounts(paymentRunPayment.getPayment());
                 }
               }

------------------------------------------------------------------------------
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