Cheque report changes our custom design, ACH , NACHA classes, And file name changes with DateTime
// Cheque Controller
[ExtensionOf(Classstr(ChequeController))]
Final class CMCChequeController1_Extension
{
protected str determineReportMenuOutput(ChequeFormType _chequeFormType, BankChequeLayout _bankChequeLayout)
{
SrsCatalogItemName chequeReport = next determineReportMenuOutput( _chequeFormType, _bankChequeLayout);
if (chequeReport && _chequeFormType == ChequeFormType::USStyle)
{
chequeReport = ssrsReportStr(CMCCheque_US, Report);
}
return chequeReport;
}
}
// Cheque DP
[ExtensionOf(Classstr(ChequeDP))]
final class CMCChequeDP_Extension
{
protected void populateChequeTmp()
{
next populateChequeTmp();
chequeTmp.DateStr = date2str(tmpChequePrintout.MaturityDate, 213, DateDay::Digits2,
DateSeparator::Slash, // separator1
DateMonth::Digits2,
DateSeparator::Slash, // separator2
DateYear::Digits4);
}
}
// Cheque text calculator to change cheque stub portion
[ExtensionOf(classStr(CustVendChequeSlipTextCalculator))]
final class CMCCustVendChequeSlipTextCalculator_Extension
{
public container determineSlipTextTitleAndEndLinesAdjustmentForChequeFormType(
BankChequeTable _bankChequeTable,
ChequeFormType _chequeFormType)
{
ChequeSlipTxt chequeSlipText;
Counter endLines;
[chequeSlipText, endLines] = next determineSlipTextTitleAndEndLinesAdjustmentForChequeFormType(_bankChequeTable,_chequeFormType) ;
switch (_chequeFormType)
{
case ChequeFormType::USStyle,
ChequeFormType::ESStyle,
ChequeFormType::MXStyle,
ChequeFormType::CAStyle:
chequeSlipText = " "+"@SYS22495" + ' ' + _bankChequeTable.ChequeNum + '\n';
endLines = -1;
break;
}
return [chequeSlipText, endLines];
}
}
// For ACH class customizations
[ExtensionOf(classstr(VendOutPaym_NACHA))]
Final class HIGVendOutPaym_NACHA_Extension
{
protected container createBatchHeaderRecord()
{
#define.DateDay(2)
#define.DateMonth(2)
#define.DateYear(2)
#define.DateYear(2)
container headerBatch = conNull();
str 10 companyEntryDescription = "TRADE PAY ";
headerBatch = next createBatchHeaderRecord();
str headerBatchData = conPeek(headerBatch,1);
str headerBatchDel = headerBatchData;
str 6 companyDescriptiveDate = date2str(DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()),321, #DateDay, 0, #DateMonth, 0, #DateYear, DateFlags::None); // MMDDYy
str 20 emptyStr20 = strRep(" ",20);
headerBatchData = strDel(headerBatchData,21,20);
headerBatchData = strIns(headerBatchData,emptyStr20,21);
headerBatchData = strDel(headerBatchData,54,10);
headerBatchData = strIns(headerBatchData,companyEntryDescription,54);
headerBatchData = strDel(headerBatchData,64,6);
headerBatchData = strIns(headerBatchData,companyDescriptiveDate,64);
headerBatch = conDel(headerBatch,1,strLen(headerBatchDel));
headerBatch = conIns(headerBatch,1,headerBatchData);
return headerBatch;
}
public Filename parmFilename(Filename _filename )
{
Filename firstName;
firstName = next parmFileName();
filename = firstName;
if (_filename)
{
str currentDateTime = date2Str(today(),213,
DateDay::Digits2,
DateSeparator::Dot, // separator1
DateMonth::Digits2,
DateSeparator::Dot, // separator2
DateYear::Digits2);
Filename generatedFilename = strFmt('HM ACH %1.txt', currentDateTime);
filename = generatedFilename;
}
return filename;
}
}
Comments
Post a Comment