LOCAL PROCEDURE CheckReport@1420000(VAR SalesHeader@1420000 : Record 36);
BEGIN
WITH SalesHeader DO BEGIN
CASE "Document Type" OF
"Document Type"::Order:
BEGIN
IF Ship AND NOT Invoice THEN
CheckReportSelection(ReportSelection.Usage::"S.Shipment","Shipping No. Series");
IF Invoice THEN
CheckReportSelection(ReportSelection.Usage::"S.Invoice","Posting No. Series");
END;
"Document Type"::Invoice:
CheckReportSelection(ReportSelection.Usage::"S.Invoice","Posting No. Series");
"Document Type"::"Return Order":
BEGIN
IF Receive AND NOT Invoice THEN
CheckReportSelection(ReportSelection.Usage::"S.Ret.Rcpt.","Posting No. Series");
IF Invoice THEN
CheckReportSelection(ReportSelection.Usage::"S.Cr.Memo","Posting No. Series");
END;
"Document Type"::"Credit Memo":
CheckReportSelection(ReportSelection.Usage::"S.Cr.Memo","Posting No. Series");
END;
END;
END;