| Docs Hilfe
  AppSource  
Docs  /  NCGLA Sachpostenausgleich  /  Anhang

Informationen für Entwickler


2023/04/25 • 2 Min. Lesedauer

Zusätzliche Buch.-Blätter

Standardmäßig ist der NCGLA Sachpostenausgleich über pageextensions bereits in einige Buch.-Blätter integriert. Der Code ist in allen Buch.-Blättern identisch. Somit kann der NCGLA Sachpostenausgleich über eine Individualprogrammierung auch in anderen Buch.-Blättern mit wenig Aufwand zur Verfügung gestellt werden. Nachfolgend der Code für die Integration am Beispiel der Fibu Buch.-Blätter.
pageextension 70714681 "NVXGLA General Journal" extends "General Journal"
{
    ContextSensitiveHelpPage = 'Journal';

    layout
    {
        modify("Account Type")
        {
            trigger OnAfterValidate();
            begin
                NVXGLAEnableApplyGLEntriesAction();
            end;
        }
        modify("Bal. Account Type")
        {
            trigger OnAfterValidate();
            begin
                NVXGLAEnableApplyGLEntriesAction();
            end;
        }
        addafter("Applies-to ID")
        {
            field("NVXGLA Applies-to Doc. Type"; Rec."NVXGLA Applies-to Doc. Type")
            {
                ApplicationArea = All;
                ToolTip = 'Specifies the type of the posted document that this document or journal line will be applied to when you post.';
                Visible = false;
            }
            field("NVXGLA Applies-to Doc. No."; Rec."NVXGLA Applies-to Doc. No.")
            {
                ApplicationArea = All;
                ToolTip = 'Specifies the number of the posted document that this document or journal line will be applied to when you post.';
                Visible = false;
            }
            field("NVXGLA Applies-to ID"; Rec."NVXGLA Applies-to ID")
            {
                ApplicationArea = All;
                ToolTip = 'Specifies the ID of entries that will be applied to when you choose the ''NCGLA Apply G/L Entries'' action.';
                Visible = false;
            }
        }
    }

    actions
    {
        addafter("Apply Entries")
        {
            action(NVXGLAApplyEntriesAction)
            {
                ApplicationArea = All;
                Caption = 'NCGLA Apply G/L Entries';
                Ellipsis = true;
                Enabled = NVXGLAApplyGLEntriesActionEnabled;
                Image = ApplyEntries;
                RunObject = Codeunit "NVXGLA Gen. Jnl.-Apply";
                ShortCutKey = 'Alt+F11';
                ToolTip = 'Apply the amount on a journal line to one or multiple G/L Entries.';
            }
        }
        addafter("Apply Entries_Promoted")
        {
            actionref(NVXGLAApplyEntriesAction_Promoted; NVXGLAApplyEntriesAction)
            {
            }
        }
    }

    var
        NVXGLAApplyGLEntriesActionEnabled: Boolean;

    trigger OnAfterGetRecord()
    begin
        NVXGLAEnableApplyGLEntriesAction();
    end;

    trigger OnAfterGetCurrRecord();
    begin
        NVXGLAEnableApplyGLEntriesAction();
    end;

    trigger OnNewRecord(BelowxRec: Boolean);
    begin
        NVXGLAEnableApplyGLEntriesAction();
    end;

    local procedure NVXGLAEnableApplyGLEntriesAction()
    begin
        NVXGLAApplyGLEntriesActionEnabled :=
            (Rec."Account Type" = Rec."Account Type"::"G/L Account") or
            (Rec."Bal. Account Type" = Rec."Bal. Account Type"::"G/L Account");
    end;
}


Feedback senden für
DE|EN Impressum
<>