|
|
|
@ -41,11 +41,12 @@ public class ABAFile {
|
|
|
|
|
|
|
|
|
|
StringWriter out = new StringWriter();
|
|
|
|
|
PrintWriter writer = new PrintWriter(out);
|
|
|
|
|
writer.println(generateTopLine());
|
|
|
|
|
writer.print(generateTopLine() + "\r\n");
|
|
|
|
|
for (SettleMerchantInfo info : settlements) {
|
|
|
|
|
writer.println(info.settleLine());
|
|
|
|
|
String line = info.settleLine();
|
|
|
|
|
writer.print(line + "\r\n");
|
|
|
|
|
}
|
|
|
|
|
writer.println(generateBalanceLine());
|
|
|
|
|
writer.print(generateBalanceLine() + "\r\n");
|
|
|
|
|
writer.print(generateFinalLine());
|
|
|
|
|
writer.flush();
|
|
|
|
|
return out.toString().getBytes();
|
|
|
|
@ -125,7 +126,7 @@ public class ABAFile {
|
|
|
|
|
lineBuilder.replace(62, 80, StringUtils.rightPad("RoyalPay" + DateFormatUtils.format(settleDate, "yyyyMMdd"), 18));
|
|
|
|
|
lineBuilder.replace(80, 87, bsbNo(selfBSB));
|
|
|
|
|
lineBuilder.replace(87, 96, StringUtils.leftPad(selfAccountNo, 9));
|
|
|
|
|
lineBuilder.replace(96, 112, StringUtils.rightPad(company, 16));
|
|
|
|
|
lineBuilder.replace(96, 112, StringUtils.left(StringUtils.rightPad(company, 16), 16));
|
|
|
|
|
lineBuilder.replace(112, 120, StringUtils.leftPad("0", 8, "0"));
|
|
|
|
|
return lineBuilder.toString();
|
|
|
|
|
}
|
|
|
|
|