To implement this hotfix, you must have a developer license.
You do not have to have rights to the data stores unless you have to perform data repair.
WITH Rec DO BEGIN
IF STRPOS("Applies-to ID",'CHSNZCNF') = 0 THEN
BEGIN
IF NOT CONFIRM(Text1130000,FALSE,"Document Type","Document No.") THEN
EXIT;
IF STRPOS("Applies-to ID",'CHCNCNF') = 0 THEN
PostApplication.SetValues("Document No.","Posting Date")
ELSE
PostApplication.SetValues("Document No.",WORKDATE);
IF NOT PaymentToleracenMgt.PmtTolCust(Rec) THEN
EXIT;
GET("Entry No.");
//Delete the following lines.
ApplicationDate := 0D;
EntriesToApply.SETCURRENTKEY("Customer No.","Applies-to ID");
EntriesToApply.SETRANGE("Customer No.","Customer No.");
EntriesToApply.SETRANGE("Applies-to ID","Applies-to ID");
EntriesToApply.FIND('-');
REPEAT
IF EntriesToApply."Posting Date" > ApplicationDate THEN
ApplicationDate := EntriesToApply."Posting Date";
UNTIL EntriesToApply.NEXT = 0;
//End of the lines.
PostApplication.SetValues("Document No.",ApplicationDate);
PostApplication.LOOKUPMODE(TRUE);
IF ACTION::LookupOK = PostApplication.RUNMODAL THEN BEGIN
GenJnlLine.INIT;
PostApplication.GetValues(GenJnlLine."Document No.",GenJnlLine."Posting Date");
IF GenJnlLine."Posting Date" < ApplicationDate THEN
ERROR(
Text003,
GenJnlLine.FIELDCAPTION("Posting Date"),FIELDCAPTION("Posting Date"),TABLECAPTION);
END ELSE
EXIT;
END ELSE BEGIN
GenJnlLine.INIT;
//Delete the following line.
GenJnlLine."Posting Date" := WORKDATE;
GenJnlLine."Document No." := "Document No.";
END;
Window.OPEN(Text001);
...
WITH Rec DO BEGIN
//Add the following lines.
ApplicationDate := 0D;
EntriesToApply.SETCURRENTKEY("Customer No.","Applies-to ID");
EntriesToApply.SETRANGE("Customer No.","Customer No.");
EntriesToApply.SETRANGE("Applies-to ID","Applies-to ID");
IF EntriesToApply.FINDSET THEN
REPEAT
IF EntriesToApply."Posting Date" > ApplicationDate THEN
ApplicationDate := EntriesToApply."Posting Date";
UNTIL EntriesToApply.NEXT = 0;
//End of the lines.
IF STRPOS("Applies-to ID",'CHSNZCNF') = 0 THEN
BEGIN
IF NOT CONFIRM(Text1130000,FALSE,"Document Type","Document No.") THEN
EXIT;
IF STRPOS("Applies-to ID",'CHCNCNF') = 0 THEN
PostApplication.SetValues("Document No.","Posting Date")
ELSE
PostApplication.SetValues("Document No.",WORKDATE);
IF NOT PaymentToleracenMgt.PmtTolCust(Rec) THEN
EXIT;
GET("Entry No.");
PostApplication.SetValues("Document No.",ApplicationDate);
PostApplication.LOOKUPMODE(TRUE);
IF ACTION::LookupOK = PostApplication.RUNMODAL THEN BEGIN
GenJnlLine.INIT;
PostApplication.GetValues(GenJnlLine."Document No.",GenJnlLine."Posting Date");
IF GenJnlLine."Posting Date" < ApplicationDate THEN
ERROR(
Text003,
GenJnlLine.FIELDCAPTION("Posting Date"),FIELDCAPTION("Posting Date"),TABLECAPTION);
END ELSE
EXIT;
END ELSE BEGIN
GenJnlLine.INIT;
//Add the following line.
GenJnlLine."Posting Date" := ApplicationDate;
GenJnlLine."Document No." := "Document No.";
END;
Window.OPEN(Text001);
...