[Cancel and Replace] Fix issue that affects reversing payments
authorUnai Martirena <unai.martirena@openbravo.com>
Fri, 12 Aug 2016 10:42:27 +0200
changeset 30071 740a0c8c782c
parent 30070 c43ecd09a55f
child 30072 f90ca2639fbb
[Cancel and Replace] Fix issue that affects reversing payments
src/org/openbravo/event/FINPaymentEventHandler.java
--- a/src/org/openbravo/event/FINPaymentEventHandler.java	Thu Aug 11 09:54:07 2016 +0200
+++ b/src/org/openbravo/event/FINPaymentEventHandler.java	Fri Aug 12 10:42:27 2016 +0200
@@ -36,7 +36,7 @@
       event.setCurrentState(paymentDocumentNoProperty, payment.getDocumentNo() + "*R*");
     } else {
       int index = payment.getDocumentNo().indexOf("*R*");
-      if (index != -1) {
+      if (index > 0) {
         final Entity paymentEntity = ModelProvider.getInstance().getEntity(FIN_Payment.ENTITY_NAME);
         final Property paymentDocumentNoProperty = paymentEntity
             .getProperty(FIN_Payment.PROPERTY_DOCUMENTNO);