Fixes bug 29913: Correct trx status assigned while deleting from reconciliation
authorUnai Martirena <unai.martirena@openbravo.com>
Tue, 19 May 2015 13:26:52 +0200
changeset 26737 0fd6131c786a
parent 26736 c702e1364264
child 26738 8cc85f698754
child 26764 ac68a43ce656
Fixes bug 29913: Correct trx status assigned while deleting from reconciliation

while checking or unchecking lines in Reconcile popup 'updateTransactionStatus' method is called to assign the proper status to the transaction. While unchecking 'Withdrawn not Cleared' or 'Deposited not Cleared' statuses has to be assigned to the transactions. This part is was wrong. When the transaction was of BP Deposit 'Withdrawn not Cleared' was being assigned and when the transaction was BP Withdrawal 'Deposited not Cleared' was being assigned.
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Sun May 24 12:10:22 2015 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Tue May 19 13:26:52 2015 +0200
@@ -141,8 +141,8 @@
             strSelectedTransId);
         String newStatus = "RPPC";
         if (!isChecked) {
-          newStatus = (trans.getPaymentAmount().compareTo(trans.getDepositAmount()) >= 0) ? "RDNC"
-              : "PWNC";
+          newStatus = (trans.getPaymentAmount().compareTo(trans.getDepositAmount()) >= 0) ? "PWNC"
+              : "RDNC";
           trans.setReconciliation(null);
           if (trans.getFinPayment() != null) {
             trans.getFinPayment().setStatus((trans.getFinPayment().isReceipt()) ? "RDNC" : "PWNC");