...
IF Invoice AND ("Posting No." = '') THEN BEGIN
IF ("No. Series" <> '') OR
("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"])
THEN
TESTFIELD("Posting No. Series");
// Delete the following lines.
IF ("No. Series" <> "Posting No. Series") OR
("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"])
THEN BEGIN
"Posting No." := NoSeriesMgt.GetNextNo("Posting No. Series","Posting Date",TRUE);
ModifyHeader := TRUE;
END;
END;
// CH1070.begin
IF ("Posting Description" = FORMAT("Document Type") + ' ' + "No.") OR
(("Posting No." <> '') AND NOT ModifyHeader) THEN BEGIN
// End of the deleted lines.
// CH0003.BEGIN
// IF "Document Type" <> "Document Type"::Order THEN
IF NOT ("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"]) THEN
// CH0003.END
"Posting Description" :=
...
...
IF Invoice AND ("Posting No." = '') THEN BEGIN
IF ("No. Series" <> '') OR
("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"])
THEN
TESTFIELD("Posting No. Series");
// Add the following lines.
IF ("No. Series" <> "Posting No. Series") OR
("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"]) OR ("No. Series" <> '')
THEN BEGIN
"Posting No." := NoSeriesMgt.GetNextNo("Posting No. Series","Posting Date",TRUE);
ModifyHeader := TRUE;
END;
END;
// CH1070.begin
IF ("Posting Description" = FORMAT("Document Type") + ' ' + "No.") OR
// (("Posting No." <> '') AND NOT ModifyHeader)
("Posting No." <> '')
THEN BEGIN
// End of the added lines.
// CH0003.BEGIN
// IF "Document Type" <> "Document Type"::Order THEN
IF NOT ("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"]) THEN
// CH0003.END
"Posting Description" :=
...
...
"Bill-to Name",1,MAXSTRLEN("Posting Description"));
ModifyHeader := TRUE;
END;
// CH1070.end
// Delete the following line.
IF NOT ItemChargeAssgntOnly THEN BEGIN
// End of the deleted line.
SalesLine.RESET;
SalesLine.SETRANGE("Document Type","Document Type");
SalesLine.SETRANGE("Document No.","No.");
SalesLine.SETFILTER("Purch. Order Line No.",'<>0');
IF NOT SalesLine.ISEMPTY THEN BEGIN
...
...
"Bill-to Name",1,MAXSTRLEN("Posting Description"));
ModifyHeader := TRUE;
END;
// CH1070.end
// Add the following line.
IF NOT ItemChargeAssgntOnly THEN BEGIN
// End of the added line.
SalesLine.RESET;
SalesLine.SETRANGE("Document Type","Document Type");
SalesLine.SETRANGE("Document No.","No.");
SalesLine.SETFILTER("Purch. Order Line No.",'<>0');
IF NOT SalesLine.ISEMPTY THEN BEGIN
...