Change the code in the CreateRecords function in the SEPA Management codeunit (5001911)as follows:
Existing code 1...
CountryCodeL := PaymLine.GetCountryCode();
IF "AVIS Letter" THEN BEGINSetuptext := PaymentSetup."Avis Proposal";
IF CountryCodeL <> '' THENSetuptext := PaymentSetup."AZV Avis Proposal";
CLEAR(TempRmtInfo);
END ELSE BEGIN
...
Replacement code 1...
CountryCodeL := PaymLine.GetCountryCode();
// Add the following line.
CLEAR(PDate);
IF "AVIS Letter" THEN BEGINSetuptext := PaymentSetup."Avis Proposal";
IF CountryCodeL <> '' THENSetuptext := PaymentSetup."AZV Avis Proposal";
CLEAR(TempRmtInfo);
// Add the following line.
PDate := PaymLedgEntry."Posting Date";
END ELSE BEGIN
...
Existing code 2...
CustLedgEntry.GET("Ledg.Entry No.");
CustLedgEntry.GET("Ledg.Entry No.");
CustLedgEntry.CALCFIELDS("Original Amount");
TempRmtInfo := TempRmtInfo +
...
Replacement code 2...
CustLedgEntry.GET("Ledg.Entry No.");
CustLedgEntry.GET("Ledg.Entry No.");
CustLedgEntry.CALCFIELDS("Original Amount");
// Add the following lines.
IF PDate = 0D THEN
PDate := CustLedgEntry."Posting Date";
// End of the lines.
TempRmtInfo := TempRmtInfo +
...
Existing code 3...
DELCHR(FORMAT(ABS("Pmt. Discount"),8,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(CustLedgEntry."Original Amount"),12,'<Sign><Integer><Decimals,3>')),
// Delete the following line.
FORMAT(CustLedgEntry."Posting Date",8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(CurrCode)),
COPYSTR(FORMAT(CustLedgEntry."Document Type"),1,2));
...
Replacement code 3...
DELCHR(FORMAT(ABS("Pmt. Discount"),8,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(CustLedgEntry."Original Amount"),12,'<Sign><Integer><Decimals,3>')),
// Add the following line.
FORMAT(PDate,8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(CurrCode)),
COPYSTR(FORMAT(CustLedgEntry."Document Type"),1,2));
...
Existing code 4...
VendLedgEntry.GET("Ledg.Entry No.");
VendLedgEntry.CALCFIELDS("Original Amount");
TempRmtInfo := TempRmtInfo +
...
Replacement code 4...
VendLedgEntry.GET("Ledg.Entry No.");
VendLedgEntry.CALCFIELDS("Original Amount");
// Add the following lines.
IF PDate = 0D THEN
PDate := VendLedgEntry."Posting Date";
// End of the lines.
TempRmtInfo := TempRmtInfo +
...
Existing code 5...
DELCHR(FORMAT(ABS("Pmt. Discount"),8,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(VendLedgEntry."Original Amount"),12,'<Sign><Integer><Decimals,3>')),
// Delete the following line.
FORMAT(VendLedgEntry."Posting Date",8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(CurrCode)),
COPYSTR(FORMAT(VendLedgEntry."Document Type"),1,2));
...
Replacement code 5...
DELCHR(FORMAT(ABS("Pmt. Discount"),8,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(VendLedgEntry."Original Amount"),12,'<Sign><Integer><Decimals,3>')),
// Add the following line.
FORMAT(PDate,8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(CurrCode)),
COPYSTR(FORMAT(VendLedgEntry."Document Type"),1,2));
...
Change the code in the CreateEinzugRecords function in the SEPA Management codeunit (5001911) as follows:
Existing code 1
...
CountryCodeL := PaymLine.GetCountryCode();
PaymentSetup.GET;
IF "AVIS Letter" THEN BEGIN
Setuptext := PaymentSetup."Avis Proposal";
IF CountryCodeL <> '' THEN
Setuptext := PaymentSetup."AZV Avis Proposal";
CLEAR(TempRmtInfo);
END ELSE BEGIN
...
Replacement code 1...
CountryCodeL := PaymLine.GetCountryCode();
// Add the following line.
CLEAR(PDate);
PaymentSetup.GET;
IF "AVIS Letter" THEN BEGIN
Setuptext := PaymentSetup."Avis Proposal";
IF CountryCodeL <> '' THEN
Setuptext := PaymentSetup."AZV Avis Proposal";
CLEAR(TempRmtInfo);
// Add the following line.
PDate := PaymLedgEntry."Posting Date";
END ELSE BEGIN
...
Existing code 2...
CustLedgEntry.GET("Ledg.Entry No.");
CustLedgEntry.CALCFIELDS("Original Amount");
TempRmtInfo := TempRmtInfo +
...
Replacement code 2...
CustLedgEntry.GET("Ledg.Entry No.");
CustLedgEntry.CALCFIELDS("Original Amount");
// Add the following lines.
IF PDate = 0D THEN
PDate := CustLedgEntry."Posting Date";
// End of the lines.
TempRmtInfo := TempRmtInfo +
...
Existing code 3...
DELCHR(FORMAT(ABS("Pmt. Discount"),8,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(CustLedgEntry."Original Amount"),12,'<Sign><Integer><Decimals,3>')),
// Delete the following line.
FORMAT(CustLedgEntry."Posting Date",8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(CurrCode)),
COPYSTR(FORMAT(CustLedgEntry."Document Type"),1,2));
...
Replacement code 3...
DELCHR(FORMAT(ABS("Pmt. Discount"),8,'<Sign><Integer><Decimals,3>')),
DELCHR(FORMAT(ABS(CustLedgEntry."Original Amount"),12,'<Sign><Integer><Decimals,3>')),
// Add the following line.
FORMAT(PDate,8,'<day,2>.<month,2>.<year,2>'),
DELCHR(FORMAT(CurrCode)),
COPYSTR(FORMAT(CustLedgEntry."Document Type"),1,2));
...