We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add new event
procedure FromPlanningSalesLineToJnlLine(JobPlanningLine: Record "Job Planning Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var JobJnlLine: Record "Job Journal Line"; EntryType: Enum "Job Journal Line Entry Type") var SourceCodeSetup: Record "Source Code Setup"; JobTask: Record "Job Task"; //-----------------------------------------------------------OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts:BEGIN IsHandled: Boolean; //-----------------------------------------------------------OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts:END begin OnBeforeFromPlanningSalesLineToJnlLine(JobPlanningLine, SalesHeader, SalesLine, JobJnlLine, EntryType); JobJnlLine."Line No." := SalesLine."Line No."; JobJnlLine."Job No." := JobPlanningLine."Job No."; JobJnlLine."Job Task No." := JobPlanningLine."Job Task No."; JobJnlLine.Type := JobPlanningLine.Type; JobTask.SetLoadFields("Job No.", "Job Task No."); JobTask.Get(JobPlanningLine."Job No.", JobPlanningLine."Job Task No."); JobJnlLine."Posting Date" := SalesHeader."Posting Date"; JobJnlLine."Document Date" := SalesHeader."Document Date"; JobJnlLine."Document No." := SalesLine."Document No."; JobJnlLine."Entry Type" := EntryType; JobJnlLine."Posting Group" := SalesLine."Posting Group"; JobJnlLine."Gen. Bus. Posting Group" := SalesLine."Gen. Bus. Posting Group"; JobJnlLine."Gen. Prod. Posting Group" := SalesLine."Gen. Prod. Posting Group"; JobJnlLine.CopyTrackingFromJobPlanningLine(JobPlanningLine); JobJnlLine."No." := JobPlanningLine."No."; JobJnlLine.Description := SalesLine.Description; JobJnlLine."Description 2" := SalesLine."Description 2"; JobJnlLine."Unit of Measure Code" := JobPlanningLine."Unit of Measure Code"; JobJnlLine.Validate("Qty. per Unit of Measure", SalesLine."Qty. per Unit of Measure"); JobJnlLine."Work Type Code" := JobPlanningLine."Work Type Code"; JobJnlLine."Variant Code" := JobPlanningLine."Variant Code"; JobJnlLine."Line Type" := JobPlanningLine.ConvertToJobLineType(); JobJnlLine."Currency Code" := JobPlanningLine."Currency Code"; JobJnlLine."Currency Factor" := JobPlanningLine."Currency Factor"; JobJnlLine."Resource Group No." := JobPlanningLine."Resource Group No."; JobJnlLine."Customer Price Group" := JobPlanningLine."Customer Price Group"; JobJnlLine."Location Code" := SalesLine."Location Code"; JobJnlLine."Bin Code" := SalesLine."Bin Code"; SourceCodeSetup.Get(); JobJnlLine."Source Code" := SourceCodeSetup.Sales; JobJnlLine."Reason Code" := SalesHeader."Reason Code"; JobJnlLine."External Document No." := SalesHeader."External Document No."; JobJnlLine."Transport Method" := SalesLine."Transport Method"; JobJnlLine."Transaction Type" := SalesLine."Transaction Type"; JobJnlLine."Transaction Specification" := SalesLine."Transaction Specification"; JobJnlLine."Entry/Exit Point" := SalesLine."Exit Point"; JobJnlLine.Area := SalesLine.Area; JobJnlLine."Country/Region Code" := JobPlanningLine."Country/Region Code"; JobJnlLine."Shortcut Dimension 1 Code" := SalesLine."Shortcut Dimension 1 Code"; JobJnlLine."Shortcut Dimension 2 Code" := SalesLine."Shortcut Dimension 2 Code"; JobJnlLine."Dimension Set ID" := SalesLine."Dimension Set ID"; case SalesHeader."Document Type" of SalesHeader."Document Type"::Invoice: JobJnlLine.Validate(Quantity, SalesLine.Quantity); SalesHeader."Document Type"::"Credit Memo": JobJnlLine.Validate(Quantity, -SalesLine.Quantity); end; //-----------------------------------------------------------OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts:BEGIN //OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts(JobJnlLine, SalesLine, SalesHeader); IsHandled := false; OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts(JobJnlLine, SalesLine, SalesHeader, JobPlanningLine, IsHandled); if not IsHandled then begin //-----------------------------------------------------------OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts:END JobJnlLine."Direct Unit Cost (LCY)" := JobPlanningLine."Direct Unit Cost (LCY)"; if (JobPlanningLine."Currency Code" = '') and (SalesHeader."Currency Factor" <> 0) then begin GetCurrencyRounding(SalesHeader."Currency Code"); ValidateUnitCostAndPrice( JobJnlLine, SalesLine, SalesLine."Unit Cost (LCY)", JobPlanningLine."Unit Price"); end else ValidateUnitCostAndPrice(JobJnlLine, SalesLine, SalesLine."Unit Cost", JobPlanningLine."Unit Price"); JobJnlLine.Validate("Line Discount %", SalesLine."Line Discount %"); //-----------------------------------------------------------OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts:BEGIN end; //-----------------------------------------------------------OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts:END OnAfterFromPlanningSalesLineToJnlLine(JobJnlLine, JobPlanningLine, SalesHeader, SalesLine, EntryType); end; //-----------------------------------------------------------OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts:BEGIN //[IntegrationEvent(false, false)] [IntegrationEvent(true, false)] //local procedure OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts(var JobJournalLine: Record "Job Journal Line"; var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") local procedure OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts(var JobJournalLine: Record "Job Journal Line"; var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var JobPlanningLine: Record "Job Planning Line"; var IsHandled: Boolean) begin end; //-----------------------------------------------------------OnFromPlanningSalesLineToJnlLineOnBeforeInitAmounts:END
we need option how to init values different way then standard. Internal work item: AB#562607
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the request
Please add new event
Additional context
we need option how to init values different way then standard.
Internal work item: AB#562607
The text was updated successfully, but these errors were encountered: