diff --git a/src/org/openbravo/erpCommon/ad_process/PaymentMonitor.java b/src/org/openbravo/erpCommon/ad_process/PaymentMonitor.java
--- a/src/org/openbravo/erpCommon/ad_process/PaymentMonitor.java
+++ b/src/org/openbravo/erpCommon/ad_process/PaymentMonitor.java
@@ -190,6 +190,15 @@
               cancelledPayment.getClient().getId(), cancelledPayment.getOrganization().getId()));
         }
       }
+
+      if (cancelledNotPaidAmount.setScale(0).equals(BigDecimal.ZERO))
+        // The sum of all canceled not paid payments in the settlement is zero. This means that the
+        // payment has been paid completely, as it was canceled with some other pending payments
+        // (for example, the ones comming from a credit memo)
+        return getConvertedAmt(payment.getAmount().multiply(multiplier), payment.getCurrency()
+            .getId(), strCurrencyTo, conversionDate, payment.getClient().getId(), payment
+            .getOrganization().getId());
+
       List<DebtPayment> generatedPayments = payment.getSettlementCancelled()
           .getFinancialMgmtDebtPaymentCSettlementGenerateIDList();
       // Add the write-off amount
@@ -242,6 +251,13 @@
               cancelledPayment.getClient().getId(), cancelledPayment.getOrganization().getId()));
         }
       }
+      if (cancelledNotPaidAmount.setScale(0).equals(BigDecimal.ZERO))
+        // The sum of all canceled not paid payments in the settlement is zero. This means that the
+        // payment has been paid completely, as it was canceled with some other pending payments
+        // (for example, the ones comming from a credit memo)
+        return getConvertedAmt(payment.getAmount().multiply(multiplier), payment.getCurrency()
+            .getId(), strCurrencyTo, conversionDate, payment.getClient().getId(), payment
+            .getOrganization().getId());
       List<DebtPayment> generatedPayments = payment.getSettlementCancelled()
           .getFinancialMgmtDebtPaymentCSettlementGenerateIDList();
       if (generatedPayments == null || generatedPayments.size() == 0)
