Fixes issue
30095: BP current balance not properly updated
Change condition in FIN_PaymentProcess to take into account when the paymend does not have order nor invoice related (when it only has a g/l item, when we are genereting credit or when we are refunding amount).
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java Tue Jun 09 08:07:43 2015 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java Thu Jun 04 17:47:14 2015 +0200
@@ -394,6 +394,8 @@
// Payment = 0 when the payment is generated by a invoice that consume credit
if ((invoicePaidAmounts && paymentScheduleDetail.getInvoicePaymentSchedule() != null)
|| (paymentScheduleDetail.getOrderPaymentSchedule() != null)
+ || (paymentScheduleDetail.getInvoicePaymentSchedule() == null && paymentScheduleDetail
+ .getOrderPaymentSchedule() == null)
|| (payment.getAmount().compareTo(new BigDecimal("0.00")) == 0)) {
if (paymentScheduleDetail.getInvoicePaymentSchedule() != null) {
// BP SO_CreditUsed