Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
1.2 kB
2
Indexable
Never
local procedure ConsolidateMaksekeskusLines(var GenJournalLineTemplate: Record "Gen. Journal Line")
    var
        GenJournalLine: Record "Gen. Journal Line";
        OptimeraSetup: Record "Optimera Setup";
        OptimeraSetup2: Record "Optimera Setup 2";
        DocNo: Code[20];
        LineNo: Integer;
        MaxLineNo: Integer;
        GenJournalLineToConsolidateTMP: Record "Gen. Journal Line" temporary;
        GenJournalLineToDeleteTMP: Record "Gen. Journal Line" temporary;
        GenJournalLineIncomeTMP: Record "Gen. Journal Line" temporary;
        SalesDocumentNo: Code[20];
        SalesDocumentType: Option Quote,"Order",Invoice,"Credit Memo","Blanket Order","Return Order";
        SalesDocDate: Date;
    begin
        //59955,62086
        OptimeraSetup.GET;
        OptimeraSetup2.GET;

        GenJournalLine.SETRANGE("Journal Template Name", GenJournalLineTemplate."Journal Template Name");
        GenJournalLine.SETRANGE("Journal Batch Name", GenJournalLineTemplate."Journal Batch Name");

        IF GenJournalLine.FINDFIRST THEN
            DocNo := GenJournalLine."Document No.";

        LineNo := 10000;
Leave a Comment