d.CLOSE;
IF NoOfLinesInserted > 0 THEN BEGIN
MESSAGE(Text007,NoOfLinesInserted,LsvSetup."LSV Currency Code",TotalAmt);
IF LsvJournal."LSV Journal Description" = '' THEN BEGIN
LsvJournal."LSV Journal Description" :=
FORMAT(STRSUBSTNO(Text021,LsvSetup."LSV Currency Code",FromDueDate,ToDueDate,Customer.GETFILTERS)
,-MAXSTRLEN(LsvJournal."LSV Journal Description"));
END;
LsvJournal."Credit Date" := CollectionDate;
LsvJournal.MODIFY;
// CH2813.BEGIN
IF NoOfCustWithCreditMemo > 0 THEN
IF NOT CONFIRM(Text009 + Text010 + Text012 + Text013,TRUE,NoOfCustWithCreditMemo,CustCreditMemoTxt) THEN
ERROR(Text014);
// CH2813.END
END ELSE
MESSAGE(Text015,FromDueDate,ToDueDate);
d.CLOSE;
IF TempCustLedgEntry.ISEMPTY THEN BEGIN // CH0001
IF NoOfLinesInserted > 0 THEN BEGIN
MESSAGE(Text007,NoOfLinesInserted,LsvSetup."LSV Currency Code",TotalAmt);
IF LsvJournal."LSV Journal Description" = '' THEN BEGIN
LsvJournal."LSV Journal Description" :=
FORMAT(STRSUBSTNO(Text021,LsvSetup."LSV Currency Code",FromDueDate,ToDueDate,Customer.GETFILTERS)
,-MAXSTRLEN(LsvJournal."LSV Journal Description"));
END;
LsvJournal."Credit Date" := CollectionDate;
LsvJournal.MODIFY;
// CH2813.BEGIN
IF NoOfCustWithCreditMemo > 0 THEN
IF NOT CONFIRM(Text009 + Text010 + Text012 + Text013,TRUE,NoOfCustWithCreditMemo,CustCreditMemoTxt) THEN
ERROR(Text014);
// CH2813.END
END ELSE
MESSAGE(Text015,FromDueDate,ToDueDate);
END;