Improvement for Auto Allocation process - this modification allow the auto allocation process to allocate the remanent portion of partially allocated payments
This commit is contained in:
parent
b69f03010b
commit
d442d2fe55
|
@ -650,6 +650,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
.add(payment.getDiscountAmt())
|
.add(payment.getDiscountAmt())
|
||||||
.add(payment.getWriteOffAmt())
|
.add(payment.getWriteOffAmt())
|
||||||
.add(payment.getOverUnderAmt());
|
.add(payment.getOverUnderAmt());
|
||||||
|
availableAmt = availableAmt.subtract(allocatedAmt);
|
||||||
if (!payment.isReceipt())
|
if (!payment.isReceipt())
|
||||||
availableAmt = availableAmt.negate();
|
availableAmt = availableAmt.negate();
|
||||||
log.fine("Available=" + availableAmt);
|
log.fine("Available=" + availableAmt);
|
||||||
|
@ -704,12 +705,14 @@ public class AllocationAuto extends SvrProcess
|
||||||
if (payment.getC_Currency_ID() != C_Currency_ID)
|
if (payment.getC_Currency_ID() != C_Currency_ID)
|
||||||
continue;
|
continue;
|
||||||
BigDecimal allocatedAmt = payment.getAllocatedAmt();
|
BigDecimal allocatedAmt = payment.getAllocatedAmt();
|
||||||
if (allocatedAmt != null && allocatedAmt.signum() != 0)
|
// comment following lines to allow partial allocation
|
||||||
continue;
|
// if (allocatedAmt != null && allocatedAmt.signum() != 0)
|
||||||
|
// continue;
|
||||||
BigDecimal availableAmt = payment.getPayAmt()
|
BigDecimal availableAmt = payment.getPayAmt()
|
||||||
.add(payment.getDiscountAmt())
|
.add(payment.getDiscountAmt())
|
||||||
.add(payment.getWriteOffAmt())
|
.add(payment.getWriteOffAmt())
|
||||||
.add(payment.getOverUnderAmt());
|
.add(payment.getOverUnderAmt());
|
||||||
|
availableAmt = availableAmt.subtract(allocatedAmt);
|
||||||
if (!payment.isReceipt())
|
if (!payment.isReceipt())
|
||||||
availableAmt = availableAmt.negate();
|
availableAmt = availableAmt.negate();
|
||||||
allocatedPayments = allocatedPayments.add(availableAmt);
|
allocatedPayments = allocatedPayments.add(availableAmt);
|
||||||
|
|
Loading…
Reference in New Issue