|
|
|
@ -29,8 +29,8 @@ public class ABAFile {
|
|
|
|
|
totalSettleAmount = BigDecimal.ZERO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void addSettleMerchant(String bsbNo, String accountNo, String accountName, BigDecimal settleAmount) {
|
|
|
|
|
settlements.add(new SettleMerchantInfo(bsbNo, accountNo, accountName, settleAmount));
|
|
|
|
|
public void addSettleMerchant(String clientMoniker, String bsbNo, String accountNo, String accountName, BigDecimal settleAmount) {
|
|
|
|
|
settlements.add(new SettleMerchantInfo(clientMoniker, bsbNo, accountNo, accountName, settleAmount));
|
|
|
|
|
totalSettleAmount = totalSettleAmount.add(settleAmount);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -129,12 +129,14 @@ public class ABAFile {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private class SettleMerchantInfo {
|
|
|
|
|
private final String clientMoniker;
|
|
|
|
|
private final String bsbNo;
|
|
|
|
|
private final String accountNo;
|
|
|
|
|
private final String accountName;
|
|
|
|
|
private final BigDecimal settleAmount;
|
|
|
|
|
|
|
|
|
|
public SettleMerchantInfo(String bsbNo, String accountNo, String accountName, BigDecimal settleAmount) {
|
|
|
|
|
public SettleMerchantInfo(String clientMoniker, String bsbNo, String accountNo, String accountName, BigDecimal settleAmount) {
|
|
|
|
|
this.clientMoniker = clientMoniker;
|
|
|
|
|
this.bsbNo = bsbNo;
|
|
|
|
|
this.accountNo = accountNo.replaceAll("\\D", "");
|
|
|
|
|
this.accountName = accountName;
|
|
|
|
@ -149,7 +151,7 @@ public class ABAFile {
|
|
|
|
|
lineBuilder.replace(18, 20, "50");
|
|
|
|
|
lineBuilder.replace(20, 30, getSettleAmount());
|
|
|
|
|
lineBuilder.replace(30, 62, getAccountName());
|
|
|
|
|
lineBuilder.replace(62, 80, StringUtils.rightPad("RoyalPay" + DateFormatUtils.format(settleDate, "yyyyMMdd"), 18));
|
|
|
|
|
lineBuilder.replace(62, 80, StringUtils.rightPad("RoyalPay" + DateFormatUtils.format(settleDate, "MMdd") + clientMoniker, 18));
|
|
|
|
|
lineBuilder.replace(80, 87, bsbNo(base.getBsb()));
|
|
|
|
|
lineBuilder.replace(87, 96, StringUtils.leftPad(base.getAccountNo(), 9));
|
|
|
|
|
lineBuilder.replace(96, 112, StringUtils.left(StringUtils.rightPad(base.getAccountName(), 16), 16));
|
|
|
|
|