mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 06:36:55 +01:00
Move canonical knowledge for Microsoft-owned review domains into the Microsoft layer and document the skill/knowledge co-location policy. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Copilot-Session: 2a6ea875-d38e-4f30-aadb-0d606f9be231
20 lines
776 B
AL
20 lines
776 B
AL
codeunit 50100 "Batch NoSeries Insert Good"
|
|
{
|
|
procedure InsertDraftOrders(var Customer: Record Customer)
|
|
var
|
|
SalesHeader: Record "Sales Header";
|
|
SalesSetup: Record "Sales & Receivables Setup";
|
|
NoSeriesBatch: Codeunit "No. Series - Batch";
|
|
begin
|
|
SalesSetup.Get();
|
|
if Customer.FindSet() then
|
|
repeat
|
|
SalesHeader.Init();
|
|
SalesHeader."Document Type" := SalesHeader."Document Type"::Order;
|
|
SalesHeader."No." := NoSeriesBatch.GetNextNo(SalesSetup."Order Nos.", WorkDate());
|
|
SalesHeader."Sell-to Customer No." := Customer."No.";
|
|
SalesHeader.Insert(true);
|
|
until Customer.Next() = 0;
|
|
NoSeriesBatch.SaveState();
|
|
end;
|
|
}
|