details: https://code.openbravo.com/erp/devel/pi/rev/aaf4e4439bf8 changeset: 29394:aaf4e4439bf8 user: Mark <m.molina <at> nectus.com> date: Fri Apr 29 12:36:06 2016 -0400 summary: Fixes issue 32713: Allow add payment with invoice org when exist a void payment The new payment plan details are created for the invoice's organization instead of the payment's organization. Similar for Payments created from orders: the new payment plan details are created for the order's organization instead of the payment's organization.
diffstat: modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diffs (23 lines): diff -r 8bb50118e525 -r aaf4e4439bf8 modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java --- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java Mon May 02 17:13:23 2016 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java Fri Apr 29 12:36:06 2016 -0400 @@ -1057,7 +1057,8 @@ // Create merged Payment Schedule Detail with the pending to be paid amount if (outStandingAmt.compareTo(BigDecimal.ZERO) != 0) { final FIN_PaymentScheduleDetail mergedScheduleDetail = dao - .getNewPaymentScheduleDetail(payment.getOrganization(), outStandingAmt); + .getNewPaymentScheduleDetail(paymentScheduleDetail.getInvoicePaymentSchedule() + .getInvoice().getOrganization(), outStandingAmt); mergedScheduleDetail.setInvoicePaymentSchedule(paymentScheduleDetail .getInvoicePaymentSchedule()); mergedScheduleDetail.setOrderPaymentSchedule(paymentScheduleDetail @@ -1085,7 +1086,8 @@ // Create merged Payment Schedule Detail with the pending to be paid amount if (outStandingAmt.compareTo(BigDecimal.ZERO) != 0) { final FIN_PaymentScheduleDetail mergedScheduleDetail = dao - .getNewPaymentScheduleDetail(payment.getOrganization(), outStandingAmt); + .getNewPaymentScheduleDetail(paymentScheduleDetail.getOrderPaymentSchedule() + .getOrder().getOrganization(), outStandingAmt); mergedScheduleDetail.setOrderPaymentSchedule(paymentScheduleDetail .getOrderPaymentSchedule()); OBDal.getInstance().save(mergedScheduleDetail); ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits