details: https://code.openbravo.com/erp/devel/pi/rev/b06cf6616ecc changeset: 32409:b06cf6616ecc user: Prakash M <prakash <at> qualiantech.com> date: Wed Jul 05 18:57:28 2017 +0530 summary: Fixed Issue 36308: Wrong Payment Schedule Details Amount in cancel and replace
diffstat: src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (21 lines): diff -r a24ae7e02b62 -r b06cf6616ecc src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java --- a/src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java Tue Jul 04 12:09:05 2017 +0200 +++ b/src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java Wed Jul 05 18:57:28 2017 +0530 @@ -1134,7 +1134,8 @@ HashMap<String, BigDecimal> paymentScheduleDetailAmount = new HashMap<String, BigDecimal>(); FIN_PaymentScheduleDetail paymentScheduleDetail = null; - if (paymentScheduleDetailList.size() != 0) { + if (paymentScheduleDetailList.size() != 0 + && paymentScheduleDetailList.get(0).getAmount().compareTo(amount) == 0) { paymentScheduleDetail = paymentScheduleDetailList.get(0); paymentScheduleDetailAmount.put(paymentScheduleDetail.getId(), amount); } else { @@ -1144,6 +1145,7 @@ // null payment detail is missing // Lets assume that in this point the payment was created trough Web POS // Create missing payment schedule detail + paymentScheduleDetailList.clear(); paymentScheduleDetail = OBProvider.getInstance().get(FIN_PaymentScheduleDetail.class); paymentScheduleDetail.setOrganization(order.getOrganization()); paymentScheduleDetail.setOrderPaymentSchedule(paymentSchedule); ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits