From 07e5c6a1ef5ee13aaec13100529920baff8806bc Mon Sep 17 00:00:00 2001 From: Alexander Yakunin Date: Wed, 1 Jul 2026 16:45:41 +0200 Subject: [PATCH 01/26] Port NAV Extract-ES-Cartera changes from bugs branch --- .../Purchases/Posting/PurchPost.Codeunit.al | 30 ++++-- .../Sales/Posting/SalesPost.Codeunit.al | 22 +++- .../Receivables/CustLedgerEntry.Table.al | 52 +++++++-- .../Purchases/Posting/PurchPost.Codeunit.al | 30 ++++-- .../Sales/Posting/SalesPost.Codeunit.al | 24 ++++- .../Purchases/Posting/PurchPost.Codeunit.al | 30 ++++-- .../Receivables/CustLedgerEntry.Table.al | 47 +++++++- .../Journal/GenJnlCheckLine.Codeunit.al | 24 ++--- .../Ledger/CRTGLRegisters.PageExt.al | 59 ++++++++++ .../GeneralLedger/Ledger/GLRegisters.Page.al | 43 -------- .../Posting/CRTPurchPost.Codeunit.al | 91 ++++++++++++++++ .../LongTermPurchaseInvoices.Report.al | 2 +- .../Reports/LongTermPurchaseInvoices.rdlc | 0 .../Reports}/PostPaymentOrder.Report.al | 0 .../Reports/VendorDuePayments.Report.al | 2 +- .../Purchases/Reports/VendorDuePayments.rdlc | 0 .../Sales/Posting/CRTSalesPost.Codeunit.al | 96 +++++++++++++++++ .../CRTCustomerLedgerEntries.PageExt.al | 32 ++++++ .../CRTDetailedCustLedgEntry.TableExt.al | 34 ++++++ .../Reports/ClosedBGAnalysisLCYFB.Page.al | 0 .../Reports/ClosedBGAnalysisNonLCYFB.Page.al | 0 .../Reports/CustomerDuePayments.Report.al | 2 +- .../Sales/Reports/CustomerDuePayments.rdlc | 0 .../Reports/LongTermSalesInvoices.Report.al | 2 +- .../Sales/Reports/LongTermSalesInvoices.rdlc | 0 .../SalesPurchBookVATBuffer.Table.al | 95 ++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 101 +++++++----------- .../Sales/Posting/SalesPost.Codeunit.al | 98 +++++++---------- .../Receivables/CustomerLedgerEntries.Page.al | 17 --- .../DetailedCustLedgEntry.Table.al | 17 --- .../Purchases/Posting/PurchPost.Codeunit.al | 28 ++++- .../Sales/Posting/SalesPost.Codeunit.al | 24 ++++- .../Receivables/CustLedgerEntry.Table.al | 52 +++++++-- .../Sales/Posting/SalesPost.Codeunit.al | 22 +++- .../Receivables/CustLedgerEntry.Table.al | 64 ++++++++--- .../Purchases/Posting/PurchPost.Codeunit.al | 49 ++++++--- .../Sales/Posting/SalesPost.Codeunit.al | 33 ++++-- .../Receivables/CustLedgerEntry.Table.al | 50 +++++++-- .../Purchases/Posting/PurchPost.Codeunit.al | 31 ++++-- .../Sales/Posting/SalesPost.Codeunit.al | 24 ++++- .../Receivables/CustLedgerEntry.Table.al | 51 +++++++-- .../Purchases/Posting/PurchPost.Codeunit.al | 31 ++++-- .../Sales/Posting/SalesPost.Codeunit.al | 22 +++- .../Receivables/CustLedgerEntry.Table.al | 53 +++++++-- .../Receivables/CustLedgerEntry.Table.al | 52 +++++++-- .../Sales/Posting/SalesPost.Codeunit.al | 20 ++++ .../Purchases/Posting/PurchPost.Codeunit.al | 33 ++++-- .../Sales/Posting/SalesPost.Codeunit.al | 24 ++++- .../Receivables/CustLedgerEntry.Table.al | 58 +++++++--- .../Journal/GenJnlCheckLine.Codeunit.al | 11 ++ .../Purchases/Posting/PurchPost.Codeunit.al | 24 ++++- .../Sales/Posting/SalesPost.Codeunit.al | 20 ++++ 52 files changed, 1350 insertions(+), 376 deletions(-) create mode 100644 src/Layers/ES/BaseApp/Finance/GeneralLedger/Ledger/CRTGLRegisters.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Posting/CRTPurchPost.Codeunit.al rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Purchases/Reports/LongTermPurchaseInvoices.Report.al (99%) rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Purchases/Reports/LongTermPurchaseInvoices.rdlc (100%) rename src/Layers/ES/BaseApp/Local/{ => Cartera/Purchases/Reports}/PostPaymentOrder.Report.al (100%) rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Purchases/Reports/VendorDuePayments.Report.al (99%) rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Purchases/Reports/VendorDuePayments.rdlc (100%) create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Posting/CRTSalesPost.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustomerLedgerEntries.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTDetailedCustLedgEntry.TableExt.al rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Sales/Reports/ClosedBGAnalysisLCYFB.Page.al (100%) rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Sales/Reports/ClosedBGAnalysisNonLCYFB.Page.al (100%) rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Sales/Reports/CustomerDuePayments.Report.al (99%) rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Sales/Reports/CustomerDuePayments.rdlc (100%) rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Sales/Reports/LongTermSalesInvoices.Report.al (99%) rename src/Layers/ES/BaseApp/Local/{ => Cartera}/Sales/Reports/LongTermSalesInvoices.rdlc (100%) create mode 100644 src/Layers/ES/BaseApp/Local/Finance/VAT/Calculation/SalesPurchBookVATBuffer.Table.al diff --git a/src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 00c48afa64b..1442d2e0a48 100644 --- a/src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -187,10 +187,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -331,6 +328,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -860,6 +861,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -4190,6 +4192,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -11997,12 +12001,26 @@ codeunit 90 "Purch.-Post" end; [IntegrationEvent(false, false)] - local procedure OnBeforePostWHT(var PurchaseHeader: Record "Purchase Header"; var TotalInvAmount: Decimal; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var TempPurchaseLineGlobal: Record "Purchase Line" temporary; var WHTEntry: Record "WHT Entry"; var IsHandled: Boolean) + local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; [IntegrationEvent(false, false)] - local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforePostWHT(var PurchaseHeader: Record "Purchase Header"; var TotalInvAmount: Decimal; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var TempPurchaseLineGlobal: Record "Purchase Line" temporary; var WHTEntry: Record "WHT Entry"; var IsHandled: Boolean) begin end; } diff --git a/src/Layers/APAC/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/APAC/BaseApp/Sales/Posting/SalesPost.Codeunit.al index f196687bca5..fb9686d571d 100644 --- a/src/Layers/APAC/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/APAC/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -360,6 +360,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -548,6 +550,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -6392,6 +6396,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -11976,7 +11982,7 @@ codeunit 80 "Sales-Post" DimensionMgt.GetCombinedDimensionSetID(DimSetID, ItemJnlLine2."Shortcut Dimension 1 Code", ItemJnlLine2."Shortcut Dimension 2 Code"); end; end; - + local procedure UpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; SalesLine: Record "Sales Line") var ItemLedgEntry: Record "Item Ledger Entry"; @@ -14348,4 +14354,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/APAC/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/APAC/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index f6dc18262e8..78d66e94a87 100644 --- a/src/Layers/APAC/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/APAC/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -19,6 +19,7 @@ using Microsoft.FixedAssets.FixedAsset; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.PaymentTerms; using Microsoft.Intercompany.Partner; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -852,6 +853,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -865,6 +873,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1203,11 +1212,6 @@ table 21 "Cust. Ledger Entry" } } - trigger OnInsert() - begin - TestField("G/L Register No."); - end; - var #pragma warning disable AA0074 #pragma warning disable AA0470 @@ -1449,12 +1453,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1468,6 +1472,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1541,6 +1561,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; Adjustment := GenJnlLine.Adjustment; "BAS Adjustment" := GenJnlLine."BAS Adjustment"; "Adjustment Applies-to" := GenJnlLine."Adjustment Applies-to"; @@ -1880,5 +1901,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 8a41903ac26..b7a7d85810c 100644 --- a/src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -184,10 +184,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -328,6 +325,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -748,7 +749,7 @@ codeunit 90 "Purch.-Post" begin OnBeforeCheckAndUpdate(PurchHeader, ModifyHeader); DocumentIsReadyToBeChecked := true; - + CheckPurchDocument(PurchHeader); if GuiAllowed() and not HideProgressWindow then @@ -847,6 +848,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -4099,6 +4101,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -5366,7 +5370,7 @@ codeunit 90 "Purch.-Post" if PurchHeader."Prices Including VAT" then PrepmtVATBaseToDeduct := Round( - (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine."Prepayment VAT %" / 100), + (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine.GetPrepaymentVATPct() / 100), Currency."Amount Rounding Precision") - Round( TotalPrepmtAmtToDeduct / (1 + PurchLine.GetPrepaymentVATPct() / 100), @@ -11576,4 +11580,18 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; } diff --git a/src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 0d34bd616a5..22a4beede61 100644 --- a/src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -352,6 +352,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -540,6 +542,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -929,7 +933,7 @@ codeunit 80 "Sales-Post" repeat ErrorMessageMgt.PushContext(ErrorContextElement, TempSalesLineGlobal.RecordId(), 0, CheckSalesLineMsg); TestSalesLine(SalesHeader, TempSalesLineGlobal); - if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then + if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then NoOfItemLines += 1; until TempSalesLineGlobal.Next() = 0; ErrorMessageMgt.PopContext(ErrorContextElement); @@ -6296,6 +6300,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -11660,7 +11666,7 @@ codeunit 80 "Sales-Post" DimensionMgt.GetCombinedDimensionSetID(DimSetID, ItemJnlLine2."Shortcut Dimension 1 Code", ItemJnlLine2."Shortcut Dimension 2 Code"); end; end; - + local procedure UpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; SalesLine: Record "Sales Line") var ItemLedgEntry: Record "Item Ledger Entry"; @@ -14032,4 +14038,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index defff3ef27b..4fcf0e0c795 100644 --- a/src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -184,10 +184,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -328,6 +325,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -750,7 +751,7 @@ codeunit 90 "Purch.-Post" begin OnBeforeCheckAndUpdate(PurchHeader, ModifyHeader); DocumentIsReadyToBeChecked := true; - + CheckPurchDocument(PurchHeader); if GuiAllowed() and not HideProgressWindow then @@ -851,6 +852,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -4058,6 +4060,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -5327,7 +5331,7 @@ codeunit 90 "Purch.-Post" if PurchHeader."Prices Including VAT" then PrepmtVATBaseToDeduct := Round( - (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine."Prepayment VAT %" / 100), + (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine.GetPrepaymentVATPct() / 100), Currency."Amount Rounding Precision") - Round( TotalPrepmtAmtToDeduct / (1 + PurchLine.GetPrepaymentVATPct() / 100), @@ -11554,4 +11558,18 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; } diff --git a/src/Layers/CH/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/CH/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index 166a03ddf9e..8e1c0dc9c7a 100644 --- a/src/Layers/CH/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/CH/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -20,6 +20,7 @@ using Microsoft.FixedAssets.FixedAsset; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.PaymentTerms; using Microsoft.Intercompany.Partner; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -853,6 +854,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -866,6 +874,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1395,12 +1404,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1414,6 +1423,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1487,6 +1512,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; OnAfterCopyCustLedgerEntryFromGenJnlLine(Rec, GenJnlLine); end; @@ -1828,5 +1854,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al index 60a05af674f..5a0d81b64c5 100644 --- a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al +++ b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al @@ -12,7 +12,6 @@ using Microsoft.Finance.Deferral; using Microsoft.Finance.Dimension; using Microsoft.Finance.GeneralLedger.Account; using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.ReceivablesPayables; using Microsoft.Finance.VAT.Calculation; using Microsoft.Finance.VAT.Setup; using Microsoft.FixedAssets.Journal; @@ -57,12 +56,10 @@ codeunit 11 "Gen. Jnl.-Check Line" GenJnlBatch: Record "Gen. Journal Batch"; CostAccSetup: Record "Cost Accounting Setup"; TempErrorMessage: Record "Error Message" temporary; - CarteraSetup: Record "Cartera Setup"; DimMgt: Codeunit DimensionManagement; CostAccMgt: Codeunit "Cost Account Mgt"; ApplicationAreaMgmt: Codeunit System.Environment.Configuration."Application Area Mgmt."; ErrorMessageMgt: Codeunit "Error Message Management"; - DocPost: Codeunit "Document-Post"; SkipFiscalYearCheck: Boolean; GenJnlTemplateFound: Boolean; OverrideDimErr: Boolean; @@ -112,7 +109,6 @@ codeunit 11 "Gen. Jnl.-Check Line" /// procedure RunCheck(var GenJnlLine: Record "Gen. Journal Line") var - PaymentTerms: Record "Payment Terms"; ICGLAcount: Record "IC G/L Account"; ICBankAccount: Record "IC Bank Account"; ErrorMessageHandler: Codeunit "Error Message Handler"; @@ -142,15 +138,6 @@ codeunit 11 "Gen. Jnl.-Check Line" GenJnlLine.ValidateSalesPersonPurchaserCode(GenJnlLine); TestDocumentNo(GenJnlLine); - if (GenJnlLine."Document Type" = GenJnlLine."Document Type"::Invoice) and (GenJnlLine."Document Date" <> 0D) and (GenJnlLine."Payment Terms Code" <> '') then - if PaymentTerms.Get(GenJnlLine."Payment Terms Code") then - PaymentTerms.VerifyMaxNoDaysTillDueDate(GenJnlLine."Due Date", GenJnlLine."Document Date", GenJnlLine.FieldCaption("Due Date")); - - if ((GenJnlLine."Document Type" in [GenJnlLine."Document Type"::Bill, GenJnlLine."Document Type"::Invoice, GenJnlLine."Document Type"::"Credit Memo"]) or - (GenJnlLine."Applies-to Doc. Type" in [GenJnlLine."Applies-to Doc. Type"::Bill, GenJnlLine."Applies-to Doc. Type"::Invoice])) and - CarteraSetup.ReadPermission - then - DocPost.CheckGenJnlLine(GenJnlLine); TestAccountAndBalAccountType(GenJnlLine); @@ -251,6 +238,8 @@ codeunit 11 "Gen. Jnl.-Check Line" exit; GenJournalLine.TestField("Document No.", ErrorInfo.Create()); + + OnAfterTestDocumentNo(GenJournalLine); end; local procedure TestAccountAndBalAccountType(var GenJnlLine: Record "Gen. Journal Line") @@ -1539,6 +1528,15 @@ codeunit 11 "Gen. Jnl.-Check Line" begin end; + /// + /// Integration event raised after validating document number field requirements for journal lines. + /// + /// Journal line record being validated for document number requirements. + [IntegrationEvent(false, false)] + local procedure OnAfterTestDocumentNo(GenJournalLine: Record "Gen. Journal Line") + begin + end; + /// /// Integration event raised before validating document number field requirements for journal lines. /// Enables custom logic to completely override standard document number validation processing. diff --git a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Ledger/CRTGLRegisters.PageExt.al b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Ledger/CRTGLRegisters.PageExt.al new file mode 100644 index 00000000000..5a3fa113826 --- /dev/null +++ b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Ledger/CRTGLRegisters.PageExt.al @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Ledger; + +using Microsoft.Finance.ReceivablesPayables; + +pageextension 7000010 "CRT G/L Registers" extends "G/L Registers" +{ + actions + { + addlast("&Register") + { + separator(Action1100006) + { + } + action("&Cartera Docs") + { + ApplicationArea = Basic, Suite; + Caption = '&Cartera Docs'; + Image = "Order"; + ToolTip = 'View bills and invoices for customers and vendors. Bills are used by customers to pay invoices. They are sent to customers, who pay them under particular conditions on a specified date. Typically, the total amount of an invoice is divided into parts as bills are generated.'; + + trigger OnAction() + begin + GLRegDocs.Docs(Rec); + end; + } + action("&Posted Cartera Docs.") + { + ApplicationArea = Basic, Suite; + Caption = '&Posted Cartera Docs.'; + Image = PostedOrder; + ToolTip = 'View posted bills and invoices for customers and vendors. Bills are used by customers to pay invoices. They are sent to customers, who pay them under particular conditions on a specified date. Typically, the total amount of an invoice is divided into parts as bills are generated.'; + + trigger OnAction() + begin + GLRegDocs.DocsinPostedBGPO(Rec); + end; + } + action("Cl&osed Cartera Docs.") + { + ApplicationArea = Basic, Suite; + Caption = 'Cl&osed Cartera Docs.'; + Image = Invoice; + ToolTip = 'View completed bills and invoices for customers and vendors. Bills are used by customers to pay invoices. They are sent to customers, who pay them under particular conditions on a specified date. Typically, the total amount of an invoice is divided into parts as bills are generated.'; + + trigger OnAction() + begin + GLRegDocs.ClosedDocs(Rec); + end; + } + } + } + + var + GLRegDocs: Codeunit "G/L Reg.-Docs."; +} diff --git a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Ledger/GLRegisters.Page.al b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Ledger/GLRegisters.Page.al index 498fc7409c1..e61f1c17c87 100644 --- a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Ledger/GLRegisters.Page.al +++ b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Ledger/GLRegisters.Page.al @@ -9,7 +9,6 @@ using Microsoft.Bank.Reconciliation; using Microsoft.Finance.Dimension.Correction; using Microsoft.Finance.GeneralLedger.Reports; using Microsoft.Finance.GeneralLedger.Reversal; -using Microsoft.Finance.ReceivablesPayables; using Microsoft.Finance.VAT.Ledger; using Microsoft.FixedAssets.Ledger; using Microsoft.FixedAssets.Maintenance; @@ -274,45 +273,6 @@ page 116 "G/L Registers" Page.Run(PAGE::"Dimension Correction Draft", DimensionCorrection); end; } - separator(Action1100006) - { - } - action("&Cartera Docs") - { - ApplicationArea = Basic, Suite; - Caption = '&Cartera Docs'; - Image = "Order"; - ToolTip = 'View bills and invoices for customers and vendors. Bills are used by customers to pay invoices. They are sent to customers, who pay them under particular conditions on a specified date. Typically, the total amount of an invoice is divided into parts as bills are generated.'; - - trigger OnAction() - begin - GLRegDocs.Docs(Rec); - end; - } - action("&Posted Cartera Docs.") - { - ApplicationArea = Basic, Suite; - Caption = '&Posted Cartera Docs.'; - Image = PostedOrder; - ToolTip = 'View posted bills and invoices for customers and vendors. Bills are used by customers to pay invoices. They are sent to customers, who pay them under particular conditions on a specified date. Typically, the total amount of an invoice is divided into parts as bills are generated.'; - - trigger OnAction() - begin - GLRegDocs.DocsinPostedBGPO(Rec); - end; - } - action("Cl&osed Cartera Docs.") - { - ApplicationArea = Basic, Suite; - Caption = 'Cl&osed Cartera Docs.'; - Image = Invoice; - ToolTip = 'View completed bills and invoices for customers and vendors. Bills are used by customers to pay invoices. They are sent to customers, who pay them under particular conditions on a specified date. Typically, the total amount of an invoice is divided into parts as bills are generated.'; - - trigger OnAction() - begin - GLRegDocs.ClosedDocs(Rec); - end; - } } } area(processing) @@ -481,9 +441,6 @@ page 116 "G/L Registers" if Rec.FindSet() then; end; - var - GLRegDocs: Codeunit "G/L Reg.-Docs."; - trigger OnAfterGetRecord() begin ReverseRegisterEnabled := GetReverseRegisterEnabled(); diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Posting/CRTPurchPost.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Posting/CRTPurchPost.Codeunit.al new file mode 100644 index 00000000000..c7604bd09fe --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Posting/CRTPurchPost.Codeunit.al @@ -0,0 +1,91 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Posting; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.Document; +using Microsoft.Purchases.Payables; + +codeunit 7000095 "CRT Purch.-Post" +{ + + var + CannotCreateCarteraDocErr: Label 'You do not have permissions to create Documents in Cartera.\Please, change the Payment Method.'; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnAfterProcessPostingLines', '', true, true)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + var + CarteraSetup: Record "Cartera Setup"; + PaymentMethod: Record "Payment Method"; + InvoiceSplitPayment: Codeunit "Invoice-Split Payment"; +#if not CLEAN29 + PurchPost: Codeunit "Purch.-Post"; +#endif + begin + if PaymentMethod.Get(PurchHeader."Payment Method Code") then + if (PaymentMethod."Create Bills" or PaymentMethod."Invoices to Cartera") and + (not CarteraSetup.ReadPermission) and PurchHeader.Invoice + then + Error(CannotCreateCarteraDocErr); + + if PurchHeader.Invoice and (PurchHeader."Bal. Account No." = '') and + not PurchHeader.IsCreditDocType() and CarteraSetup.ReadPermission + then begin + OnBeforeCreateCarteraBills(PurchHeader, VendLedgEntry, TotalPurchLine, SuppressCommit); +#if not CLEAN29 + PurchPost.RunOnBeforeCreateCarteraBills(PurchHeader, VendLedgEntry, TotalPurchLine, SuppressCommit); +#endif + InvoiceSplitPayment.SplitPurchInv( + PurchHeader, VendLedgEntry, Window, InvoicePostingParameters."Source Code", + InvoicePostingParameters."External Document No.", InvoicePostingParameters."Document No.", + -(TotalPurchLine."Amount Including VAT" - TotalPurchLine.Amount)); + end; + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCreateCarteraBills(PurchHeader: Record "Purchase Header"; var VendLedgEntry: Record "Vendor Ledger Entry"; var TotalPurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) + begin + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnAfterCheckPostRestrictions', '', true, true)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + TestPurchEffects(PurchaseHeader); + end; + + internal procedure TestPurchEffects(PurchHeader: Record "Purchase Header") + var + VendLedgEntry: Record "Vendor Ledger Entry"; + ShowError: Boolean; + ClosedDocumentErr: Label 'At least one document of %1 No. %2 is closed or in a Payment Order. This will avoid the document to be settled.\The posting process of %3 No. %4 will not settle any document.\Please remove the lines for the Payment Order before posting.', Comment = '%1 = Document Type, %2 = Document No., %3 = Purchase Document Type, %4 = Purchase No.'; + begin + ShowError := false; + if PurchHeader."Document Type" = PurchHeader."Document Type"::"Credit Memo" then begin + VendLedgEntry.SetCurrentKey("Document No.", "Document Type", "Vendor No."); + VendLedgEntry.SetFilter("Document Type", '%1|%2', VendLedgEntry."Document Type"::Invoice, + VendLedgEntry."Document Type"::Bill); + VendLedgEntry.SetFilter("Document Situation", '<>%1', VendLedgEntry."Document Situation"::" "); + VendLedgEntry.SetRange("Vendor No.", PurchHeader."Pay-to Vendor No."); + VendLedgEntry.SetRange(Open, true); + if VendLedgEntry.FindSet() then + repeat + if VendLedgEntry."Document Situation" <> VendLedgEntry."Document Situation"::Cartera then + if not ((VendLedgEntry."Document Situation" in + [VendLedgEntry."Document Situation"::"Closed Documents", + VendLedgEntry."Document Situation"::"Closed BG/PO"]) and + (VendLedgEntry."Document Status" = VendLedgEntry."Document Status"::Rejected)) + then + ShowError := true; + until VendLedgEntry.Next() = 0; + + if ShowError then + Error( + ClosedDocumentErr, + Format(VendLedgEntry."Document Type"), Format(VendLedgEntry."Document No."), + Format(PurchHeader."Document Type"), Format(PurchHeader."No.")); + end; + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Reports/LongTermPurchaseInvoices.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/LongTermPurchaseInvoices.Report.al similarity index 99% rename from src/Layers/ES/BaseApp/Local/Purchases/Reports/LongTermPurchaseInvoices.Report.al rename to src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/LongTermPurchaseInvoices.Report.al index ceea27a9647..6596f12e7ea 100644 --- a/src/Layers/ES/BaseApp/Local/Purchases/Reports/LongTermPurchaseInvoices.Report.al +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/LongTermPurchaseInvoices.Report.al @@ -12,7 +12,7 @@ using System.Utilities; report 10741 "Long Term Purchase Invoices" { DefaultLayout = RDLC; - RDLCLayout = './Local/Purchases/Reports/LongTermPurchaseInvoices.rdlc'; + RDLCLayout = './Local/Cartera/Purchases/Reports/LongTermPurchaseInvoices.rdlc'; ApplicationArea = Basic, Suite; Caption = 'Long Term Purchase Invoices'; UsageCategory = ReportsAndAnalysis; diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Reports/LongTermPurchaseInvoices.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/LongTermPurchaseInvoices.rdlc similarity index 100% rename from src/Layers/ES/BaseApp/Local/Purchases/Reports/LongTermPurchaseInvoices.rdlc rename to src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/LongTermPurchaseInvoices.rdlc diff --git a/src/Layers/ES/BaseApp/Local/PostPaymentOrder.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/PostPaymentOrder.Report.al similarity index 100% rename from src/Layers/ES/BaseApp/Local/PostPaymentOrder.Report.al rename to src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/PostPaymentOrder.Report.al diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Reports/VendorDuePayments.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/VendorDuePayments.Report.al similarity index 99% rename from src/Layers/ES/BaseApp/Local/Purchases/Reports/VendorDuePayments.Report.al rename to src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/VendorDuePayments.Report.al index 651de149c0f..5ecd94b8e91 100644 --- a/src/Layers/ES/BaseApp/Local/Purchases/Reports/VendorDuePayments.Report.al +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/VendorDuePayments.Report.al @@ -12,7 +12,7 @@ using System.Utilities; report 7000007 "Vendor - Due Payments" { DefaultLayout = RDLC; - RDLCLayout = './Local/Purchases/Reports/VendorDuePayments.rdlc'; + RDLCLayout = './Local/Cartera/Purchases/Reports/VendorDuePayments.rdlc'; ApplicationArea = Basic, Suite; Caption = 'Vendor - Due Payments'; UsageCategory = ReportsAndAnalysis; diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Reports/VendorDuePayments.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/VendorDuePayments.rdlc similarity index 100% rename from src/Layers/ES/BaseApp/Local/Purchases/Reports/VendorDuePayments.rdlc rename to src/Layers/ES/BaseApp/Local/Cartera/Purchases/Reports/VendorDuePayments.rdlc diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Posting/CRTSalesPost.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Posting/CRTSalesPost.Codeunit.al new file mode 100644 index 00000000000..fd66606b7de --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Posting/CRTSalesPost.Codeunit.al @@ -0,0 +1,96 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Posting; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Document; +using Microsoft.Sales.Receivables; + +codeunit 7000096 "CRT Sales-Post" +{ + Access = Internal; + + var + CannotCreateCarteraDocErr: Label 'You do not have permissions to create Documents in Cartera.\Please, change the Payment Method.'; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnAfterProcessPostingLines', '', true, true)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + var + CarteraSetup: Record "Cartera Setup"; + PaymentMethod: Record "Payment Method"; + InvoiceSplitPayment: Codeunit "Invoice-Split Payment"; +#if not CLEAN29 + SalesPost: Codeunit "Sales-Post"; +#endif + begin + // Create Bills + if PaymentMethod.Get(SalesHeader."Payment Method Code") then + if (PaymentMethod."Create Bills" or PaymentMethod."Invoices to Cartera") and + (not CarteraSetup.ReadPermission) and SalesHeader.Invoice + then + Error(CannotCreateCarteraDocErr); + + if SalesHeader.Invoice and (SalesHeader."Bal. Account No." = '') and + (not SalesHeader.IsCreditDocType()) and CarteraSetup.ReadPermission + then begin + OnBeforeCreateCarteraBills(SalesHeader, CustLedgEntry, TotalSalesLine); +#if not CLEAN29 + SalesPost.RunOnBeforeCreateCarteraBills(SalesHeader, CustLedgEntry, TotalSalesLine); +#endif + InvoiceSplitPayment.SplitSalesInv( + SalesHeader, CustLedgEntry, Window, InvoicePostingParameters."Source Code", + InvoicePostingParameters."External Document No.", InvoicePostingParameters."Document No.", + -(TotalSalesLine."Amount Including VAT" - TotalSalesLine.Amount), HideProgressWindow); + end; + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCreateCarteraBills(SalesHeader: Record "Sales Header"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var TotalSalesLine: Record "Sales Line") + begin + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnAfterCheckPostRestrictions', '', true, true)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + TestSalesEffects(SalesHeader); + end; + + internal procedure TestSalesEffects(SalesHeader: Record "Sales Header") + var + CustLedgEntry: Record "Cust. Ledger Entry"; + ShowError: Boolean; + ClosedDocumentErr: Label 'At least one document of %1 No. %2 is closed or in a Bill Group. This will avoid the document to be settled.\The posting process of %3 No. %4 will not settle any document.\ Please remove the lines for the Bill Group before posting.', Comment = '%1 = Document Type, %2 = Document No., %3 = Document Type, %4 = Document No.'; + begin + ShowError := false; + if SalesHeader."Document Type" = SalesHeader."Document Type"::"Credit Memo" then begin + CustLedgEntry.SetCurrentKey("Document No.", "Document Type", "Customer No."); + CustLedgEntry.SetFilter("Document Type", '%1|%2', CustLedgEntry."Document Type"::Invoice, + CustLedgEntry."Document Type"::Bill); + CustLedgEntry.SetFilter("Document Situation", '<>%1', CustLedgEntry."Document Situation"::" "); + CustLedgEntry.SetRange("Customer No.", SalesHeader."Bill-to Customer No."); + CustLedgEntry.SetRange(Open, true); + + if CustLedgEntry.Find('-') then + repeat + if CustLedgEntry."Document Situation" <> CustLedgEntry."Document Situation"::Cartera then + if not ((CustLedgEntry."Document Situation" in + [CustLedgEntry."Document Situation"::"Closed Documents", + CustLedgEntry."Document Situation"::"Closed BG/PO"]) and + (CustLedgEntry."Document Status" = CustLedgEntry."Document Status"::Rejected)) + then + ShowError := true; + until CustLedgEntry.Next() = 0; + + if ShowError then + Error( + ClosedDocumentErr, + Format(CustLedgEntry."Document Type"), + Format(CustLedgEntry."Document No."), + Format(SalesHeader."Document Type"), + Format(SalesHeader."No.")); + end; + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustomerLedgerEntries.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustomerLedgerEntries.PageExt.al new file mode 100644 index 00000000000..3b807bf89ee --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustomerLedgerEntries.PageExt.al @@ -0,0 +1,32 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +pageextension 7000011 "CRT Customer Ledger Entries" extends "Customer Ledger Entries" +{ + layout + { + addafter("Document No.") + { + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the bill number related to the customer entry.'; + } + field("Document Situation"; Rec."Document Situation") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the document location.'; + } + field("Document Status"; Rec."Document Status") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the status of the document.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTDetailedCustLedgEntry.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTDetailedCustLedgEntry.TableExt.al new file mode 100644 index 00000000000..4b8625f87a3 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTDetailedCustLedgEntry.TableExt.al @@ -0,0 +1,34 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft; + +tableextension 7000100 "CRT DetailedCustLedgEntry" extends "Detailed Cust. Ledg. Entry" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = CustomerContent; + } + field(7000001; "Document Situation"; Enum "ES Document Situation") + { + Caption = 'Document Situation'; + DataClassification = CustomerContent; + } + field(7000002; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + field(7000003; "Document Status"; Enum "ES Document Status") + { + Caption = 'Document Status'; + DataClassification = CustomerContent; + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Sales/Reports/ClosedBGAnalysisLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/ClosedBGAnalysisLCYFB.Page.al similarity index 100% rename from src/Layers/ES/BaseApp/Local/Sales/Reports/ClosedBGAnalysisLCYFB.Page.al rename to src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/ClosedBGAnalysisLCYFB.Page.al diff --git a/src/Layers/ES/BaseApp/Local/Sales/Reports/ClosedBGAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/ClosedBGAnalysisNonLCYFB.Page.al similarity index 100% rename from src/Layers/ES/BaseApp/Local/Sales/Reports/ClosedBGAnalysisNonLCYFB.Page.al rename to src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/ClosedBGAnalysisNonLCYFB.Page.al diff --git a/src/Layers/ES/BaseApp/Local/Sales/Reports/CustomerDuePayments.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/CustomerDuePayments.Report.al similarity index 99% rename from src/Layers/ES/BaseApp/Local/Sales/Reports/CustomerDuePayments.Report.al rename to src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/CustomerDuePayments.Report.al index bedcd2795ca..e25048b73e7 100644 --- a/src/Layers/ES/BaseApp/Local/Sales/Reports/CustomerDuePayments.Report.al +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/CustomerDuePayments.Report.al @@ -12,7 +12,7 @@ using System.Utilities; report 7000006 "Customer - Due Payments" { DefaultLayout = RDLC; - RDLCLayout = './Local/Sales/Reports/CustomerDuePayments.rdlc'; + RDLCLayout = './Local/Cartera/Sales/Reports/CustomerDuePayments.rdlc'; ApplicationArea = Basic, Suite; Caption = 'Customer - Due Payments'; UsageCategory = ReportsAndAnalysis; diff --git a/src/Layers/ES/BaseApp/Local/Sales/Reports/CustomerDuePayments.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/CustomerDuePayments.rdlc similarity index 100% rename from src/Layers/ES/BaseApp/Local/Sales/Reports/CustomerDuePayments.rdlc rename to src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/CustomerDuePayments.rdlc diff --git a/src/Layers/ES/BaseApp/Local/Sales/Reports/LongTermSalesInvoices.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/LongTermSalesInvoices.Report.al similarity index 99% rename from src/Layers/ES/BaseApp/Local/Sales/Reports/LongTermSalesInvoices.Report.al rename to src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/LongTermSalesInvoices.Report.al index 1f4cf32592f..45f68d304f9 100644 --- a/src/Layers/ES/BaseApp/Local/Sales/Reports/LongTermSalesInvoices.Report.al +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/LongTermSalesInvoices.Report.al @@ -12,7 +12,7 @@ using System.Utilities; report 10740 "Long Term Sales Invoices" { DefaultLayout = RDLC; - RDLCLayout = './Local/Sales/Reports/LongTermSalesInvoices.rdlc'; + RDLCLayout = './Local/Cartera/Sales/Reports/LongTermSalesInvoices.rdlc'; ApplicationArea = Basic, Suite; Caption = 'Long Term Sales Invoices'; UsageCategory = ReportsAndAnalysis; diff --git a/src/Layers/ES/BaseApp/Local/Sales/Reports/LongTermSalesInvoices.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/LongTermSalesInvoices.rdlc similarity index 100% rename from src/Layers/ES/BaseApp/Local/Sales/Reports/LongTermSalesInvoices.rdlc rename to src/Layers/ES/BaseApp/Local/Cartera/Sales/Reports/LongTermSalesInvoices.rdlc diff --git a/src/Layers/ES/BaseApp/Local/Finance/VAT/Calculation/SalesPurchBookVATBuffer.Table.al b/src/Layers/ES/BaseApp/Local/Finance/VAT/Calculation/SalesPurchBookVATBuffer.Table.al new file mode 100644 index 00000000000..e33622737b0 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Finance/VAT/Calculation/SalesPurchBookVATBuffer.Table.al @@ -0,0 +1,95 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.VAT.Ledger; +using Microsoft.Finance.VAT.Setup; + +table 10704 "Sales/Purch. Book VAT Buffer" +{ + Caption = 'Sales/Purch. Book VAT Buffer'; + LookupPageID = "VAT Entries"; + DataClassification = CustomerContent; + + fields + { + field(1; "VAT %"; Decimal) + { + AutoFormatType = 0; + Caption = 'VAT %'; + DataClassification = SystemMetadata; + } + field(2; "EC %"; Decimal) + { + AutoFormatType = 0; + Caption = 'EC %'; + DataClassification = SystemMetadata; + } + field(3; Base; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Base'; + DataClassification = SystemMetadata; + } + field(4; Amount; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount'; + DataClassification = SystemMetadata; + } + field(5; "EC Amount"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'EC Amount'; + DataClassification = SystemMetadata; + } + field(6; "Non-Deductible VAT %"; Decimal) + { + AutoFormatType = 0; + Caption = 'Non-Deductible VAT %'; + DataClassification = SystemMetadata; + } + field(7; "Non-Deductible VAT Base"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Non-Deductible VAT Base'; + DataClassification = SystemMetadata; + } + field(8; "Non-Deductible VAT Amount"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Non-Deductible VAT Amount'; + DataClassification = SystemMetadata; + } + } + + keys + { + key(Key1; "VAT %", "EC %") + { + Clustered = true; + } + } + + fieldgroups + { + } + + trigger OnInsert() + begin + VATPostingSetup.Get("EC %", Base); + "VAT %" := VATPostingSetup."VAT %"; + "EC %" := VATPostingSetup."EC %"; + end; + + var + VATPostingSetup: Record "VAT Posting Setup"; +} + diff --git a/src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 38001e37bfa..39c2b9836fc 100644 --- a/src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -4,7 +4,6 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.Purchases.Posting; -using Microsoft.Bank.BankAccount; using Microsoft.CRM.Contact; using Microsoft.EServices.EDocument; using Microsoft.Finance.Analysis; @@ -187,10 +186,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -235,8 +231,6 @@ codeunit 90 "Purch.-Post" var TempVATAmountLine: Record "VAT Amount Line" temporary; TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; - PaymentMethod: Record "Payment Method"; - CarteraSetup: Record "Cartera Setup"; ErrorContextElementProcessLines: Codeunit "Error Context Element"; ErrorContextElementPostLine: Codeunit "Error Context Element"; ZeroPurchLineRecID: RecordId; @@ -334,23 +328,9 @@ codeunit 90 "Purch.-Post" if not IsHandled then MakeInventoryAdjustment(); - // Create Bills - if PaymentMethod.Get(PurchHeader."Payment Method Code") then - if (PaymentMethod."Create Bills" or PaymentMethod."Invoices to Cartera") and - (not CarteraSetup.ReadPermission) and PurchHeader.Invoice - then - Error(CannotCreateCarteraDocErr); - - if PurchHeader.Invoice and (PurchHeader."Bal. Account No." = '') and - not PurchHeader.IsCreditDocType() and CarteraSetup.ReadPermission - then begin - OnBeforeCreateCarteraBills(PurchHeader, VendLedgEntry, TotalPurchLine, SuppressCommit); - SplitPayment.SplitPurchInv( - PurchHeader, VendLedgEntry, Window, SrcCode, GenJnlLineExtDocNo, GenJnlLineDocNo, - -(TotalPurchLine."Amount Including VAT" - TotalPurchLine.Amount)); - end; - Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -446,7 +426,6 @@ codeunit 90 "Purch.-Post" UOMMgt: Codeunit "Unit of Measure Management"; ApplicationAreaMgmt: Codeunit "Application Area Mgmt."; NonDeductibleVAT: Codeunit "Non-Deductible VAT"; - SplitPayment: Codeunit "Invoice-Split Payment"; MatchedOrderLineMgmt: Codeunit "Matched Order Line Mgmt."; InvoicePostingInterface: Interface "Invoice Posting"; IsInterfaceInitialized: Boolean; @@ -510,7 +489,6 @@ codeunit 90 "Purch.-Post" #pragma warning disable AA0470 Text1100000: Label 'The Credit Memo doesn''t have a Corrected Invoice No. Do you want to continue?'; Text1100011: Label 'The posting process has been cancelled by the user.'; - CannotCreateCarteraDocErr: Label 'You do not have permissions to create Documents in Cartera.\Please, change the Payment Method.'; Text1100102: Label 'Posting to bal. account #5######\'; Text1100103: Label 'Creating documents #6######'; Text1100104: Label 'Corrective Invoice'; @@ -781,7 +759,7 @@ codeunit 90 "Purch.-Post" begin OnBeforeCheckAndUpdate(PurchHeader, ModifyHeader); DocumentIsReadyToBeChecked := true; - + CheckPurchDocument(PurchHeader); if GuiAllowed() and not HideProgressWindow then @@ -3096,6 +3074,7 @@ codeunit 90 "Purch.-Post" if NoSeries.IsNoSeriesInDateOrder(PurchHeader."Receiving No. Series") then DateOrderSeriesUsed := true; ModifyHeader := true; + // Check for posting conflicts. if PurchRcptHeader.Get(PurchHeader."Receiving No.") then Error(PurchRcptHeaderConflictErr, PurchHeader."Receiving No."); @@ -3113,6 +3092,7 @@ codeunit 90 "Purch.-Post" DateOrderSeriesUsed := true; ModifyHeader := true; OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(PurchHeader); + // Check for posting conflicts. if ReturnShptHeader.Get(PurchHeader."Return Shipment No.") then Error(ReturnShptHeaderConflictErr, PurchHeader."Return Shipment No."); @@ -4172,6 +4152,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -6345,47 +6327,16 @@ codeunit 90 "Purch.-Post" exit(true); end; +#if not CLEAN29 + [Obsolete('Not used anywhere. Moved to codeunit CRT Purch-Post', '29.0')] [Scope('OnPrem')] procedure TestPurchEfects(PurchHeader: Record "Purchase Header"; Vend: Record Vendor) var - VendLedgEntry: Record "Vendor Ledger Entry"; - Text1100000: Label 'At least one document of %1 No. %2 is closed or in a Payment Order.'; - Text1100001: Label 'This will avoid the document to be settled.\'; - Text1100002: Label 'The posting process of %3 No. %4 will not settle any document.\'; - ShowError: Boolean; - Text1100003: Label 'Please remove the lines for the Payment Order before posting.'; - begin - ShowError := false; - if PurchHeader."Document Type" = PurchHeader."Document Type"::"Credit Memo" then begin - VendLedgEntry.SetCurrentKey("Document No.", "Document Type", "Vendor No."); - VendLedgEntry.SetFilter("Document Type", '%1|%2', VendLedgEntry."Document Type"::Invoice, - VendLedgEntry."Document Type"::Bill); - VendLedgEntry.SetFilter("Document Situation", '<>%1', VendLedgEntry."Document Situation"::" "); - VendLedgEntry.SetRange("Vendor No.", PurchHeader."Pay-to Vendor No."); - VendLedgEntry.SetRange(Open, true); - - if VendLedgEntry.Find('-') then - repeat - if VendLedgEntry."Document Situation" <> VendLedgEntry."Document Situation"::Cartera then - if not ((VendLedgEntry."Document Situation" in - [VendLedgEntry."Document Situation"::"Closed Documents", - VendLedgEntry."Document Situation"::"Closed BG/PO"]) and - (VendLedgEntry."Document Status" = VendLedgEntry."Document Status"::Rejected)) - then - ShowError := true; - until VendLedgEntry.Next() = 0; - - if ShowError then - Error(Text1100000 + - Text1100001 + - Text1100002 + - Text1100003, - Format(VendLedgEntry."Document Type"), - Format(VendLedgEntry."Document No."), - Format(PurchHeader."Document Type"), - Format(PurchHeader."No.")); - end; + CRTPurchPost: Codeunit "CRT Purch.-Post"; + begin + CRTPurchPost.TestPurchEffects(PurchHeader); end; +#endif local procedure UpdateIncomingDocument(IncomingDocNo: Integer; PostingDate: Date; GenJnlLineDocNo: Code[20]) var @@ -7383,7 +7334,7 @@ codeunit 90 "Purch.-Post" exit; if PurchHeader."Send IC Document" and (PurchHeader."IC Status" = PurchHeader."IC Status"::New) and (PurchHeader."IC Direction" = PurchHeader."IC Direction"::Outgoing) and - (PurchHeader."Document Type" in [PurchHeader."Document Type"::Order, PurchHeader."Document Type"::"Return Order"]) + (PurchHeader."Document Type" in [PurchHeader."Document Type"::Order, PurchHeader."Document Type"::"Return Order"]) then begin ICInboxOutboxMgt.SendPurchDoc(PurchHeader, true); PurchHeader."IC Status" := PurchHeader."IC Status"::Pending; @@ -10153,10 +10104,18 @@ codeunit 90 "Purch.-Post" begin end; +#if not CLEAN29 + internal procedure RunOnBeforeCreateCarteraBills(PurchHeader: Record "Purchase Header"; var VendLedgEntry: Record "Vendor Ledger Entry"; var TotalPurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) + begin + OnBeforeCreateCarteraBills(PurchHeader, VendLedgEntry, TotalPurchLine, CommitIsSupressed); + end; + + [Obsolete('Moved to codeunit "CRT Purch.-Post"', '29.0')] [IntegrationEvent(false, false)] local procedure OnBeforeCreateCarteraBills(PurchHeader: Record "Purchase Header"; var VendLedgEntry: Record "Vendor Ledger Entry"; var TotalPurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; +#endif [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") @@ -11734,4 +11693,18 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; } diff --git a/src/Layers/ES/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/ES/BaseApp/Sales/Posting/SalesPost.Codeunit.al index c5b092b47e0..b88bdb26373 100644 --- a/src/Layers/ES/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/ES/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -7,7 +7,6 @@ namespace Microsoft.Sales.Posting; using Microsoft.Assembly.Document; using Microsoft.Assembly.History; using Microsoft.Assembly.Posting; -using Microsoft.Bank.BankAccount; using Microsoft.CRM.Contact; using Microsoft.CRM.Opportunity; using Microsoft.CRM.Outlook; @@ -260,11 +259,8 @@ codeunit 80 "Sales-Post" CalledBy: Integer; PreviewMode: Boolean; TotalInvoiceAmountNegativeErr: Label 'The total amount for the invoice must be 0 or greater.'; - PaymentMethod: Record "Payment Method"; - SplitPayment: Codeunit "Invoice-Split Payment"; Text1100000: Label 'The Credit Memo doesn''t have a Corrected Invoice No. Do you want to continue?'; Text1100011: Label 'The posting process has been cancelled by the user.'; - CannotCreateCarteraDocErr: Label 'You do not have permissions to create Documents in Cartera.\Please, change the Payment Method.'; Text1100102: Label 'Posting to bal. account #5######\'; Text1100103: Label 'Creating documents #6######'; Text1100104: Label 'Corrective Invoice'; @@ -307,7 +303,6 @@ codeunit 80 "Sales-Post" SalesHeader: Record "Sales Header"; CustLedgEntry: Record "Cust. Ledger Entry"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - CarteraSetup: Record "Cartera Setup"; DisableAggregateTableUpdate: Codeunit "Disable Aggregate Table Update"; UpdateAnalysisView: Codeunit "Update Analysis View"; UpdateItemAnalysisView: Codeunit "Update Item Analysis View"; @@ -364,20 +359,6 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); - // Create Bills - if PaymentMethod.Get(SalesHeader."Payment Method Code") then - if (PaymentMethod."Create Bills" or PaymentMethod."Invoices to Cartera") and - (not CarteraSetup.ReadPermission) and SalesHeader.Invoice - then - Error(CannotCreateCarteraDocErr); - - if SalesHeader.Invoice and (SalesHeader."Bal. Account No." = '') and - (not SalesHeader.IsCreditDocType()) and CarteraSetup.ReadPermission - then begin - OnBeforeCreateCarteraBills(SalesHeader, CustLedgEntry, TotalSalesLine); - SplitPayment.SplitSalesInv(SalesHeader, CustLedgEntry, Window, SrcCode, GenJnlLineExtDocNo, GenJnlLineDocNo, -(TotalSalesLine."Amount Including VAT" - TotalSalesLine.Amount), HideProgressWindow); - end; - Clear(GenJnlPostLine); UpdateLastPostingNos(SalesHeader); @@ -568,6 +549,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -6340,6 +6323,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -7854,47 +7839,16 @@ codeunit 80 "Sales-Post" OnAfterFindNotShippedLines(SalesHeader, TempSalesLine); end; +#if not CLEAN29 + [Obsolete('Not used anywhere now. New version of this preocedure moved to codeunit CRTSalesPost', '29.0')] [Scope('OnPrem')] procedure TestSalesEfects(SalesHeader: Record "Sales Header"; Cust: Record Customer) var - CustLedgEntry: Record "Cust. Ledger Entry"; - Text1100000: Label 'At least one document of %1 No. %2 is closed or in a Bill Group.'; - Text1100001: Label 'This will avoid the document to be settled.\'; - Text1100002: Label 'The posting process of %3 No. %4 will not settle any document.\'; - ShowError: Boolean; - Text1100003: Label 'Please remove the lines for the Bill Group before posting.'; - begin - ShowError := false; - if SalesHeader."Document Type" = SalesHeader."Document Type"::"Credit Memo" then begin - CustLedgEntry.SetCurrentKey("Document No.", "Document Type", "Customer No."); - CustLedgEntry.SetFilter("Document Type", '%1|%2', CustLedgEntry."Document Type"::Invoice, - CustLedgEntry."Document Type"::Bill); - CustLedgEntry.SetFilter("Document Situation", '<>%1', CustLedgEntry."Document Situation"::" "); - CustLedgEntry.SetRange("Customer No.", SalesHeader."Bill-to Customer No."); - CustLedgEntry.SetRange(Open, true); - - if CustLedgEntry.Find('-') then - repeat - if CustLedgEntry."Document Situation" <> CustLedgEntry."Document Situation"::Cartera then - if not ((CustLedgEntry."Document Situation" in - [CustLedgEntry."Document Situation"::"Closed Documents", - CustLedgEntry."Document Situation"::"Closed BG/PO"]) and - (CustLedgEntry."Document Status" = CustLedgEntry."Document Status"::Rejected)) - then - ShowError := true; - until CustLedgEntry.Next() = 0; - - if ShowError then - Error(Text1100000 + - Text1100001 + - Text1100002 + - Text1100003, - Format(CustLedgEntry."Document Type"), - Format(CustLedgEntry."Document No."), - Format(SalesHeader."Document Type"), - Format(SalesHeader."No.")); - end; + CRTSalesPost: Codeunit "CRT Sales-Post"; + begin + CRTSalesPost.TestSalesEffects(SalesHeader); end; +#endif local procedure CheckTrackingAndWarehouseForShip(SalesHeader: Record "Sales Header") Ship: Boolean var @@ -10440,6 +10394,19 @@ codeunit 80 "Sales-Post" begin end; +#if not CLEAN29 + internal procedure RunOnBeforeCreateCarteraBills(SalesHeader: Record "Sales Header"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var TotalSalesLine: Record "Sales Line") + begin + OnBeforeCreateCarteraBills(SalesHeader, CustLedgerEntry, TotalSalesLine); + end; + + [Obsolete('Moved to codeunit "CRT Sales-Post"', '29.0')] + [IntegrationEvent(false, false)] + local procedure OnBeforeCreateCarteraBills(SalesHeader: Record "Sales Header"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var TotalSalesLine: Record "Sales Line") + begin + end; +#endif + /// /// Raised before posting the job contract line for a sales document. /// @@ -10451,11 +10418,6 @@ codeunit 80 "Sales-Post" /// The sales line in additional currency. /// The posted sales invoice header. /// The posted sales credit memo header. - [IntegrationEvent(false, false)] - local procedure OnBeforeCreateCarteraBills(SalesHeader: Record "Sales Header"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var TotalSalesLine: Record "Sales Line") - begin - end; - [IntegrationEvent(false, false)] local procedure OnBeforePostJobContractLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var JobContractLine: Boolean; var InvoicePostingInterface: Interface "Invoice Posting"; SalesLineACY: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -14157,4 +14119,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Sales/Receivables/CustomerLedgerEntries.Page.al b/src/Layers/ES/BaseApp/Sales/Receivables/CustomerLedgerEntries.Page.al index 1e70f521086..a5d5fa15554 100644 --- a/src/Layers/ES/BaseApp/Sales/Receivables/CustomerLedgerEntries.Page.al +++ b/src/Layers/ES/BaseApp/Sales/Receivables/CustomerLedgerEntries.Page.al @@ -66,23 +66,6 @@ page 25 "Customer Ledger Entries" Editable = false; StyleExpr = StyleTxt; } - field("Bill No."; Rec."Bill No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the bill number related to the customer entry.'; - } - field("Document Situation"; Rec."Document Situation") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the document location.'; - } - field("Document Status"; Rec."Document Status") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the status of the document.'; - } field("Customer No."; Rec."Customer No.") { ApplicationArea = Basic, Suite; diff --git a/src/Layers/ES/BaseApp/Sales/Receivables/DetailedCustLedgEntry.Table.al b/src/Layers/ES/BaseApp/Sales/Receivables/DetailedCustLedgEntry.Table.al index 860d8ade7e9..72c40237363 100644 --- a/src/Layers/ES/BaseApp/Sales/Receivables/DetailedCustLedgEntry.Table.al +++ b/src/Layers/ES/BaseApp/Sales/Receivables/DetailedCustLedgEntry.Table.al @@ -4,7 +4,6 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.Sales.Receivables; -using Microsoft; using Microsoft.Finance.Currency; using Microsoft.Finance.Dimension; using Microsoft.Finance.GeneralLedger.Journal; @@ -385,22 +384,6 @@ table 379 "Detailed Cust. Ledg. Entry" { Caption = 'VAT Date'; } - field(7000000; "Bill No."; Code[20]) - { - Caption = 'Bill No.'; - } - field(7000001; "Document Situation"; Enum "ES Document Situation") - { - Caption = 'Document Situation'; - } - field(7000002; "Applies-to Bill No."; Code[20]) - { - Caption = 'Applies-to Bill No.'; - } - field(7000003; "Document Status"; Enum "ES Document Status") - { - Caption = 'Document Status'; - } field(7000004; "Excluded from calculation"; Boolean) { Caption = 'Excluded from calculation'; diff --git a/src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 6faed7c0ecc..5490c307c49 100644 --- a/src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -184,10 +184,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -328,6 +325,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -847,6 +848,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -4057,6 +4059,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -5324,7 +5328,7 @@ codeunit 90 "Purch.-Post" if PurchHeader."Prices Including VAT" then PrepmtVATBaseToDeduct := Round( - (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine."Prepayment VAT %" / 100), + (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine.GetPrepaymentVATPct() / 100), Currency."Amount Rounding Precision") - Round( TotalPrepmtAmtToDeduct / (1 + PurchLine.GetPrepaymentVATPct() / 100), @@ -11524,4 +11528,18 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; } diff --git a/src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 25b6c0b55a9..6ea28cbcde8 100644 --- a/src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -353,6 +353,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -541,6 +543,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -930,7 +934,7 @@ codeunit 80 "Sales-Post" repeat ErrorMessageMgt.PushContext(ErrorContextElement, TempSalesLineGlobal.RecordId(), 0, CheckSalesLineMsg); TestSalesLine(SalesHeader, TempSalesLineGlobal); - if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then + if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then NoOfItemLines += 1; until TempSalesLineGlobal.Next() = 0; ErrorMessageMgt.PopContext(ErrorContextElement); @@ -6256,6 +6260,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -11629,7 +11635,7 @@ codeunit 80 "Sales-Post" DimensionMgt.GetCombinedDimensionSetID(DimSetID, ItemJnlLine2."Shortcut Dimension 1 Code", ItemJnlLine2."Shortcut Dimension 2 Code"); end; end; - + local procedure UpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; SalesLine: Record "Sales Line") var ItemLedgEntry: Record "Item Ledger Entry"; @@ -14001,4 +14007,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/FI/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/FI/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index 675cc4c0b91..582acf2690d 100644 --- a/src/Layers/FI/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/FI/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -18,6 +18,7 @@ using Microsoft.FixedAssets.FixedAsset; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.PaymentTerms; using Microsoft.Intercompany.Partner; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -851,6 +852,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -864,6 +872,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1148,11 +1157,6 @@ table 21 "Cust. Ledger Entry" } } - trigger OnInsert() - begin - TestField("G/L Register No."); - end; - var #pragma warning disable AA0074 #pragma warning disable AA0470 @@ -1394,12 +1398,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1413,6 +1417,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1486,6 +1506,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; OnAfterCopyCustLedgerEntryFromGenJnlLine(Rec, GenJnlLine); end; @@ -1821,5 +1842,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/FR/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/FR/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 308d529cc7d..e4693c78333 100644 --- a/src/Layers/FR/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/FR/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -352,6 +352,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -540,6 +542,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -929,7 +933,7 @@ codeunit 80 "Sales-Post" repeat ErrorMessageMgt.PushContext(ErrorContextElement, TempSalesLineGlobal.RecordId(), 0, CheckSalesLineMsg); TestSalesLine(SalesHeader, TempSalesLineGlobal); - if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then + if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then NoOfItemLines += 1; until TempSalesLineGlobal.Next() = 0; ErrorMessageMgt.PopContext(ErrorContextElement); @@ -6255,6 +6259,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -14025,4 +14031,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/FR/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/FR/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index 130ae3d200a..3a05e52513a 100644 --- a/src/Layers/FR/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/FR/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -18,6 +18,7 @@ using Microsoft.FixedAssets.FixedAsset; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.PaymentTerms; using Microsoft.Intercompany.Partner; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -851,6 +852,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -864,6 +872,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1097,23 +1106,23 @@ table 21 "Cust. Ledger Entry" key(Key17; "Customer No.", "Applies-to ID", Open, Positive, "Due Date") { } - key(Key23; "Document Type", "Posting Date") + key(Key18; "Document Type", "Posting Date") { SumIndexFields = "Sales (LCY)"; } - key(Key24; "Document Type", "Customer No.", Open, "Due Date") + key(Key19; "Document Type", "Customer No.", Open, "Due Date") { } - key(Key25; "Customer Posting Group") + key(Key20; "Customer Posting Group") { } - key(Key26; "Document Type", Open, "Posting Date", "Closed at Date") + key(Key21; "Document Type", Open, "Posting Date", "Closed at Date") { } - key(Key27; "Salesperson Code") + key(Key22; "Salesperson Code") { } - key(Key28; SystemModifiedAt) + key(Key23; SystemModifiedAt) { } key(Key35; "Customer No.", "Posting Date", "Applies-to ID") @@ -1140,11 +1149,6 @@ table 21 "Cust. Ledger Entry" } } - trigger OnInsert() - begin - TestField("G/L Register No."); - end; - var #pragma warning disable AA0074 #pragma warning disable AA0470 @@ -1386,12 +1390,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1405,6 +1409,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1478,6 +1498,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; OnAfterCopyCustLedgerEntryFromGenJnlLine(Rec, GenJnlLine); end; @@ -1813,5 +1834,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index bcf72ce9db0..cc736756d46 100644 --- a/src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -72,7 +72,6 @@ using System.Telemetry; #endif using System.Utilities; - codeunit 90 "Purch.-Post" { Permissions = TableData "Sales Header" = rm, @@ -188,10 +187,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -332,6 +328,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -592,7 +592,7 @@ codeunit 90 "Purch.-Post" end; /// - /// Copies all the purchase lines to a temporary table, if they haven't been copied yet, to speed up later processing + /// Copies all the purchase lines to a temporary table, if they haven't been copied yet, to speed up later processing /// /// The purchase header of the document that is being posted. /// Return value: The temp table that holds a copy of all purchase lines. @@ -741,14 +741,14 @@ codeunit 90 "Purch.-Post" /// /// Checks if document header and lines are valid for posting, updates the document and lines and creates posted documents. /// Prepayment lines are created for documents that are invoiced. - /// Unposted document is archived + /// Unposted document is archived /// Check for over-receipt is performed /// /// /// Transaction is committed after updating the document header if posting is not in PreviewMode /// Several related tables are locked for update after this procedure. /// DocumentIsReadyToBeChecked is set to true, so that PrepareCheckDocument() is not called again in CheckPurchDocument(). Preparation already happened in RunWithCheck() (parent procedure). - /// + /// /// Return Value: The purchase header of the document that is being posted, returned with updated values. local procedure CheckAndUpdate(var PurchHeader: Record "Purchase Header") var @@ -858,6 +858,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -2947,7 +2948,7 @@ codeunit 90 "Purch.-Post" /// Update Posting Date on an associated drop shipment Sales Order /// /// - /// Document Date is being retained after updating Posting Date + /// Document Date is being retained after updating Posting Date /// /// Drop Shipment Sales Order related to current purchase document /// New posting Date @@ -3716,7 +3717,7 @@ codeunit 90 "Purch.-Post" /// /// Collects the purchase lines for the specified Purchase Header and stores them in the PurchLine record set. - /// Collected lines will have the amounts divided by quantity the same way as they are divided during the posting process, depending on the selected QtyType. + /// Collected lines will have the amounts divided by quantity the same way as they are divided during the posting process, depending on the selected QtyType. /// /// /// Temporary/buffer table TempPurchLineGlobal is populated as part of the process @@ -3738,7 +3739,7 @@ codeunit 90 "Purch.-Post" /// Sums the purchase lines for the specified Purchase Header and stores the results in the NewTotalPurchLine and NewTotalPurchLineLCY record variables. /// The amounts will be divided by quantity the same way as they are divided during the posting process, depending on the selected QtyType. /// - /// + /// /// it always takes the lines for the specified Purchase Header (doesn't support a parameter for filtered or temp purchase lines). /// /// The Purchase Header of the document. @@ -3787,7 +3788,7 @@ codeunit 90 "Purch.-Post" /// /// Collects the purchase lines for the specified Purchase Header and stores them in the PurchLine record set. - /// Collected lines will have the amounts divided by quantity the same way as they are divided during the posting process, depending on the selected QtyType. + /// Collected lines will have the amounts divided by quantity the same way as they are divided during the posting process, depending on the selected QtyType. /// If Invoice Rounding functionality is enabled, rounding line is created /// /// The purchase header of the document that is being posted. @@ -4084,6 +4085,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -5351,7 +5354,7 @@ codeunit 90 "Purch.-Post" if PurchHeader."Prices Including VAT" then PrepmtVATBaseToDeduct := Round( - (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine."Prepayment VAT %" / 100), + (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine.GetPrepaymentVATPct() / 100), Currency."Amount Rounding Precision") - Round( TotalPrepmtAmtToDeduct / (1 + PurchLine.GetPrepaymentVATPct() / 100), @@ -5937,7 +5940,7 @@ codeunit 90 "Purch.-Post" /// /// Only Purchase Orders and Purchase Return Orders can be archived /// Archiving must be enabled in Purchase Setup - /// When archiving purchase line associated with deferrals, deferral amounts are rounded + /// When archiving purchase line associated with deferrals, deferral amounts are rounded /// /// The purchase header of the document that is being posted. procedure ArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header") @@ -8170,7 +8173,7 @@ codeunit 90 "Purch.-Post" if PurchInvHeader."No." = '' then exit; - // Do not change 'Order No.' if already set + // Do not change 'Order No.' if already set if PurchInvHeader."Order No." <> '' then exit; @@ -8248,7 +8251,7 @@ codeunit 90 "Purch.-Post" NoOfLinesWithShipmentNo: Integer; NoOfLinesWithParticularShipmentNo: Integer; begin - // Do not change 'Return Order No.' if already set + // Do not change 'Return Order No.' if already set if PurchCrMemoHdr."Return Order No." <> '' then exit; @@ -11551,4 +11554,18 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; } diff --git a/src/Layers/GB/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/GB/BaseApp/Sales/Posting/SalesPost.Codeunit.al index cc655fb21ac..352663bab6e 100644 --- a/src/Layers/GB/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/GB/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -365,6 +365,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -557,6 +559,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -4015,7 +4019,6 @@ codeunit 80 "Sales-Post" var IsHandled: Boolean; begin - if (CalledFromStatistics) and (not RoundingLineInserted) and (IsInvoiceRoundingLine(SalesHeader, SalesLine)) and (SalesLine."System-Created Entry") then exit; @@ -6287,6 +6290,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -13916,6 +13921,11 @@ codeunit 80 "Sales-Post" begin end; + [IntegrationEvent(false, false)] + local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) + begin + end; + [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin @@ -13966,11 +13976,6 @@ codeunit 80 "Sales-Post" begin end; - [IntegrationEvent(false, false)] - local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) - begin - end; - [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin @@ -14059,5 +14064,19 @@ codeunit 80 "Sales-Post" [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin - end; + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } diff --git a/src/Layers/IS/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/IS/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index 8404191cb51..7f568b4e192 100644 --- a/src/Layers/IS/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/IS/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -18,6 +18,7 @@ using Microsoft.FixedAssets.FixedAsset; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.PaymentTerms; using Microsoft.Intercompany.Partner; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -851,6 +852,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -864,6 +872,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1149,11 +1158,6 @@ table 21 "Cust. Ledger Entry" } } - trigger OnInsert() - begin - TestField("G/L Register No."); - end; - var #pragma warning disable AA0074 #pragma warning disable AA0470 @@ -1395,12 +1399,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1414,6 +1418,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1487,6 +1507,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; OnAfterCopyCustLedgerEntryFromGenJnlLine(Rec, GenJnlLine); end; @@ -1822,5 +1843,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 310db6e2147..bfbe4b6fb23 100644 --- a/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -191,10 +191,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -335,6 +332,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -924,6 +925,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -1197,7 +1199,6 @@ codeunit 90 "Purch.-Post" end; IsHandled := false; OnPostPurchLineOnBeforeDivideAmount(PurchHeader, PurchLine, TempVATAmountLine, TempVATAmountLineRemainder, IsHandled); - // <-- NEW EVENT if not IsHandled then DivideAmount(PurchHeader, PurchLine, 1, PurchLine."Qty. to Invoice", TempVATAmountLine, TempVATAmountLineRemainder); end else @@ -3130,6 +3131,7 @@ codeunit 90 "Purch.-Post" if NoSeriesCodeunit.IsNoSeriesInDateOrder(PurchHeader."Receiving No. Series") then DateOrderSeriesUsed := true; ModifyHeader := true; + // Check for posting conflicts. if PurchRcptHeader.Get(PurchHeader."Receiving No.") then Error(PurchRcptHeaderConflictErr, PurchHeader."Receiving No."); @@ -3147,6 +3149,7 @@ codeunit 90 "Purch.-Post" DateOrderSeriesUsed := true; ModifyHeader := true; OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(PurchHeader); + // Check for posting conflicts. if ReturnShptHeader.Get(PurchHeader."Return Shipment No.") then Error(ReturnShptHeaderConflictErr, PurchHeader."Return Shipment No."); @@ -4236,6 +4239,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -7538,7 +7543,7 @@ codeunit 90 "Purch.-Post" exit; if PurchHeader."Send IC Document" and (PurchHeader."IC Status" = PurchHeader."IC Status"::New) and (PurchHeader."IC Direction" = PurchHeader."IC Direction"::Outgoing) and - (PurchHeader."Document Type" in [PurchHeader."Document Type"::Order, PurchHeader."Document Type"::"Return Order"]) + (PurchHeader."Document Type" in [PurchHeader."Document Type"::Order, PurchHeader."Document Type"::"Return Order"]) then begin ICInboxOutboxMgt.SendPurchDoc(PurchHeader, true); PurchHeader."IC Status" := PurchHeader."IC Status"::Pending; @@ -11936,4 +11941,18 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; } diff --git a/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al index bfaf67c53fe..02fb644c5d5 100644 --- a/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -361,6 +361,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -549,6 +551,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -947,7 +951,7 @@ codeunit 80 "Sales-Post" repeat ErrorMessageMgt.PushContext(ErrorContextElement, TempSalesLineGlobal.RecordId(), 0, CheckSalesLineMsg); TestSalesLine(SalesHeader, TempSalesLineGlobal); - if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then + if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then NoOfItemLines += 1; until TempSalesLineGlobal.Next() = 0; ErrorMessageMgt.PopContext(ErrorContextElement); @@ -6353,6 +6357,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -11826,7 +11832,7 @@ codeunit 80 "Sales-Post" DimensionMgt.GetCombinedDimensionSetID(DimSetID, ItemJnlLine2."Shortcut Dimension 1 Code", ItemJnlLine2."Shortcut Dimension 2 Code"); end; end; - + local procedure UpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; SalesLine: Record "Sales Line") var ItemLedgEntry: Record "Item Ledger Entry"; @@ -14213,4 +14219,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/IT/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/IT/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index 1a546420456..2fe9354658e 100644 --- a/src/Layers/IT/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/IT/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -863,6 +863,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -876,6 +883,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1272,11 +1280,6 @@ table 21 "Cust. Ledger Entry" } } - trigger OnInsert() - begin - TestField("G/L Register No."); - end; - var #pragma warning disable AA0074 #pragma warning disable AA0470 @@ -1518,12 +1521,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1537,6 +1540,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1610,6 +1629,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; OnAfterCopyCustLedgerEntryFromGenJnlLine(Rec, GenJnlLine); end; @@ -1945,5 +1965,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 2ec89dd8fa8..465eb781a6b 100644 --- a/src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -184,10 +184,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -351,6 +348,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -886,6 +887,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -1162,7 +1164,6 @@ codeunit 90 "Purch.-Post" end; end; - RemQtyToBeInvoiced := PurchLine."Qty. to Invoice"; RemQtyToBeInvoicedBase := PurchLine."Qty. to Invoice (Base)"; @@ -4213,6 +4214,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -5502,7 +5505,7 @@ codeunit 90 "Purch.-Post" if PurchHeader."Prices Including VAT" then PrepmtVATBaseToDeduct := Round( - (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine."Prepayment VAT %" / 100), + (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine.GetPrepaymentVATPct() / 100), Currency."Amount Rounding Precision") - Round( TotalPrepmtAmtToDeduct / (1 + PurchLine.GetPrepaymentVATPct() / 100), @@ -12326,4 +12329,18 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; -} \ No newline at end of file + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; +} diff --git a/src/Layers/NA/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/NA/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 3c28de547e2..1dcafe86304 100644 --- a/src/Layers/NA/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/NA/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -365,6 +365,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -570,6 +572,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -6516,6 +6520,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -12134,7 +12140,7 @@ codeunit 80 "Sales-Post" DimensionMgt.GetCombinedDimensionSetID(DimSetID, ItemJnlLine2."Shortcut Dimension 1 Code", ItemJnlLine2."Shortcut Dimension 2 Code"); end; end; - + local procedure UpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; SalesLine: Record "Sales Line") var ItemLedgEntry: Record "Item Ledger Entry"; @@ -14556,4 +14562,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/NA/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/NA/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index 42804c94aac..8e99f845264 100644 --- a/src/Layers/NA/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/NA/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -19,6 +19,7 @@ using Microsoft.FixedAssets.FixedAsset; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.PaymentTerms; using Microsoft.Intercompany.Partner; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -853,6 +854,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -866,6 +874,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1266,11 +1275,6 @@ table 21 "Cust. Ledger Entry" } } - trigger OnInsert() - begin - TestField("G/L Register No."); - end; - var #pragma warning disable AA0074 #pragma warning disable AA0470 @@ -1514,12 +1518,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1533,6 +1537,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1606,6 +1626,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; OnAfterCopyCustLedgerEntryFromGenJnlLine(Rec, GenJnlLine); end; @@ -1729,7 +1750,6 @@ table 21 "Cust. Ledger Entry" exit(Math.Sign(Amount1) <> Math.Sign(Amount2)); end; - procedure GetDocumentVATPostingSetup(var TempVATPostingSetup: Record "VAT Posting Setup"; GenJnlLine: Record "Gen. Journal Line") begin if not (Rec."Document Type" in [Rec."Document Type"::"Credit Memo", Rec."Document Type"::Invoice]) then @@ -2031,5 +2051,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/NL/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/NL/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index 033cf8387b5..0fdc2f40939 100644 --- a/src/Layers/NL/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/NL/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -19,6 +19,7 @@ using Microsoft.FixedAssets.FixedAsset; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.PaymentTerms; using Microsoft.Intercompany.Partner; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -852,6 +853,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -865,6 +873,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1184,11 +1193,6 @@ table 21 "Cust. Ledger Entry" } } - trigger OnInsert() - begin - TestField("G/L Register No."); - end; - var #pragma warning disable AA0074 #pragma warning disable AA0470 @@ -1430,12 +1434,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1449,6 +1453,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1522,6 +1542,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; "Transaction Mode Code" := GenJnlLine."Transaction Mode Code"; OnAfterCopyCustLedgerEntryFromGenJnlLine(Rec, GenJnlLine); @@ -1858,5 +1879,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al index c3bf617cf74..efa56106c40 100644 --- a/src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -355,6 +355,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -543,6 +545,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -6262,6 +6266,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -14000,4 +14006,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 6adad620e02..2558300317e 100644 --- a/src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -188,10 +188,7 @@ codeunit 90 "Purch.-Post" /// The purchase header of the document that is being posted. /// Accumulates drop-shipment buffer records during posting. /// Set to false during posting if any line is partially invoiced. - local procedure ProcessPosting( - var PurchHeader: Record "Purchase Header"; - var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; - var EverythingInvoiced: Boolean) + local procedure ProcessPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean) var IgnoreCommit: Boolean; begin @@ -289,7 +286,7 @@ codeunit 90 "Purch.-Post" PostPurchLine( PurchHeader, TempPurchLineGlobal, TempVATAmountLine, TempVATAmountLineRemainder, - TempDropShptPostBuffer, EverythingInvoiced, ICGenJnlLineNo, TempEmplPurchLine); + TempDropShptPostBuffer, EverythingInvoiced, ICGenJnlLineNo, TempEmplPurchLine); OnRunOnAfterPostPurchLine(TempPurchLineGlobal, PurchInvHeader, PurchCrMemoHeader, PurchRcptHeader, ReturnShptHeader); end; @@ -339,6 +336,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -880,6 +881,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -3171,6 +3173,7 @@ codeunit 90 "Purch.-Post" if NoSeries.IsNoSeriesInDateOrder(PurchHeader."Receiving No. Series") then DateOrderSeriesUsed := true; ModifyHeader := true; + // Check for posting conflicts. if PurchRcptHeader.Get(PurchHeader."Receiving No.") then Error(PurchRcptHeaderConflictErr, PurchHeader."Receiving No."); @@ -3191,6 +3194,7 @@ codeunit 90 "Purch.-Post" DateOrderSeriesUsed := true; ModifyHeader := true; OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(PurchHeader); + // Check for posting conflicts. if ReturnShptHeader.Get(PurchHeader."Return Shipment No.") then Error(ReturnShptHeaderConflictErr, PurchHeader."Return Shipment No."); @@ -4231,6 +4235,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -5501,7 +5507,7 @@ codeunit 90 "Purch.-Post" if PurchHeader."Prices Including VAT" then PrepmtVATBaseToDeduct := Round( - (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine."Prepayment VAT %" / 100), + (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine.GetPrepaymentVATPct() / 100), Currency."Amount Rounding Precision") - Round( TotalPrepmtAmtToDeduct / (1 + PurchLine.GetPrepaymentVATPct() / 100), @@ -12297,6 +12303,19 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; -} + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; +} diff --git a/src/Layers/RU/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/RU/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 61d9dddcc1b..bd7995e35c6 100644 --- a/src/Layers/RU/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/RU/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -373,6 +373,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -561,6 +563,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -969,7 +973,7 @@ codeunit 80 "Sales-Post" repeat ErrorMessageMgt.PushContext(ErrorContextElement, TempSalesLineGlobal.RecordId(), 0, CheckSalesLineMsg); TestSalesLine(SalesHeader, TempSalesLineGlobal); - if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then + if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then NoOfItemLines += 1; until TempSalesLineGlobal.Next() = 0; ErrorMessageMgt.PopContext(ErrorContextElement); @@ -6370,6 +6374,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -12332,7 +12338,7 @@ codeunit 80 "Sales-Post" DimensionMgt.GetCombinedDimensionSetID(DimSetID, ItemJnlLine2."Shortcut Dimension 1 Code", ItemJnlLine2."Shortcut Dimension 2 Code"); end; end; - + local procedure UpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; SalesLine: Record "Sales Line") var ItemLedgEntry: Record "Item Ledger Entry"; @@ -14730,4 +14736,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file diff --git a/src/Layers/RU/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al b/src/Layers/RU/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al index 3937cb9242e..d73dd728372 100644 --- a/src/Layers/RU/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al +++ b/src/Layers/RU/BaseApp/Sales/Receivables/CustLedgerEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -18,6 +18,7 @@ using Microsoft.FixedAssets.FixedAsset; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.PaymentTerms; using Microsoft.Intercompany.Partner; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -487,7 +488,7 @@ table 21 "Cust. Ledger Entry" /// /// Specifies the type of balancing account used in the original transaction, such as G/L Account, Bank Account, or Vendor. /// - field(51; "Bal. Account Type"; enum "Gen. Journal Account Type") + field(51; "Bal. Account Type"; Enum "Gen. Journal Account Type") { Caption = 'Bal. Account Type'; ToolTip = 'Specifies the type of account that a balancing entry is posted to, such as BANK for a cash account.'; @@ -861,6 +862,13 @@ table 21 "Cust. Ledger Entry" Caption = 'Prepayment'; ToolTip = 'Specifies if the related payment is a prepayment.'; } + field(91; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + Editable = false; + TableRelation = "Payment Terms"; + ToolTip = 'Specifies the payment terms that determine the due date and payment discount date for the entry.'; + } field(95; "G/L Register No."; Integer) { Caption = 'G/L Register No.'; @@ -874,6 +882,7 @@ table 21 "Cust. Ledger Entry" field(171; "Payment Reference"; Code[50]) { Caption = 'Payment Reference'; + ToolTip = 'Specifies the payment reference number used by banks to identify and track the payment.'; } /// /// Specifies the payment method used or expected for this transaction, such as bank transfer, cash, or check. @@ -1209,19 +1218,10 @@ table 21 "Cust. Ledger Entry" } } - trigger OnInsert() - begin - TestField("G/L Register No."); - end; - var #pragma warning disable AA0074 #pragma warning disable AA0470 Text000: Label 'must have the same sign as %1'; -#pragma warning restore AA0470 -#pragma warning restore AA0074 -#pragma warning disable AA0074 -#pragma warning disable AA0470 Text001: Label 'must not be larger than %1'; #pragma warning restore AA0470 #pragma warning restore AA0074 @@ -1461,12 +1461,12 @@ table 21 "Cust. Ledger Entry" SetCurrentKey("Customer No.", Open, Positive, "Due Date"); SetRange("Customer No.", CustomerNo); SetRange(Open, true); + OnSetApplyToFiltersOnBeforeSetFilters(Rec); if ApplyDocNo <> '' then begin SetRange("Document Type", ApplyDocType); SetRange("Document No.", ApplyDocNo); if FindFirst() then; - SetRange("Document Type"); - SetRange("Document No."); + ClearDocumentFilters(); end else if ApplyDocType <> 0 then begin SetRange("Document Type", ApplyDocType); @@ -1480,6 +1480,22 @@ table 21 "Cust. Ledger Entry" end; end; + procedure SetAppliesToDocFilters(var GenJnlLine: Record "Gen. Journal Line") + begin + SetRange("Document Type", GenJnlLine."Applies-to Doc. Type"); + SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + + OnAfterSetAppliesToDocFilters(Rec, GenJnlLine); + end; + + procedure ClearDocumentFilters() + begin + SetRange("Document Type"); + SetRange("Document No."); + + OnAfterClearDocumentFilters(Rec); + end; + /// /// Toggles the Amount to Apply field between the remaining amount and zero for the specified document. /// @@ -1553,6 +1569,7 @@ table 21 "Cust. Ledger Entry" "Payment Method Code" := GenJnlLine."Payment Method Code"; "Payment Reference" := GenJnlLine."Payment Reference"; "Exported to Payment File" := GenJnlLine."Exported to Payment File"; + "Payment Terms Code" := GenJnlLine."Payment Terms Code"; "Prepayment Status" := GenJnlLine."Prepayment Status"; "Agreement No." := GenJnlLine."Agreement No."; "VAT Entry Type" := GenJnlLine."VAT Entry Type"; @@ -1892,5 +1909,20 @@ table 21 "Cust. Ledger Entry" local procedure OnValidateMaxPaymentToleranceOnBeforeFieldError(var CustLedgerEntry: Record "Cust. Ledger Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + end; } diff --git a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al index 373abb71c78..2dc93c7c6a4 100644 --- a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al +++ b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al @@ -238,6 +238,8 @@ codeunit 11 "Gen. Jnl.-Check Line" exit; GenJournalLine.TestField("Document No.", ErrorInfo.Create()); + + OnAfterTestDocumentNo(GenJournalLine); end; local procedure TestAccountAndBalAccountType(var GenJnlLine: Record "Gen. Journal Line") @@ -1539,6 +1541,15 @@ codeunit 11 "Gen. Jnl.-Check Line" begin end; + /// + /// Integration event raised after validating document number field requirements for journal lines. + /// + /// Journal line record being validated for document number requirements. + [IntegrationEvent(false, false)] + local procedure OnAfterTestDocumentNo(GenJournalLine: Record "Gen. Journal Line") + begin + end; + /// /// Integration event raised before validating document number field requirements for journal lines. /// Enables custom logic to completely override standard document number validation processing. diff --git a/src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 7be0c42b33d..9968bde6b5c 100644 --- a/src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -325,6 +325,10 @@ codeunit 90 "Purch.-Post" OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then MakeInventoryAdjustment(); + + Clear(GenJnlPostLine); + + OnAfterProcessPostingLines(PurchHeader, TotalPurchLine, VendLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window); end; var @@ -844,6 +848,7 @@ codeunit 90 "Purch.-Post" begin if not DocumentIsReadyToBeChecked then PrepareCheckDocument(PurchHeader); + ErrorMessageMgt.PushContext(ErrorContextElement, PurchHeader.RecordId, 0, CheckPurchHeaderMsg); CheckMandatoryHeaderFields(PurchHeader); GetGLSetup(); @@ -4051,6 +4056,8 @@ codeunit 90 "Purch.-Post" if PurchaseHeader."Pay-to Contact No." <> '' then if Contact.Get(PurchaseHeader."Pay-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(PurchaseHeader); end; local procedure CheckFAPostingPossibility(PurchaseHeader: Record "Purchase Header") @@ -5318,7 +5325,7 @@ codeunit 90 "Purch.-Post" if PurchHeader."Prices Including VAT" then PrepmtVATBaseToDeduct := Round( - (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine."Prepayment VAT %" / 100), + (TotalPrepmtAmtToDeduct + PurchLine."Prepmt Amt to Deduct") / (1 + PurchLine.GetPrepaymentVATPct() / 100), Currency."Amount Rounding Precision") - Round( TotalPrepmtAmtToDeduct / (1 + PurchLine.GetPrepaymentVATPct() / 100), @@ -11518,6 +11525,19 @@ codeunit 90 "Purch.-Post" local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; -} + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) + begin + end; + + /// + /// Event is raised after the CheckPostRestrictions function is executed + /// + /// The purchase header record that was checked for post restrictions. + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header") + begin + end; +} diff --git a/src/Layers/W1/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/W1/BaseApp/Sales/Posting/SalesPost.Codeunit.al index e42ff7fbd3a..c1587874edc 100644 --- a/src/Layers/W1/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/W1/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -352,6 +352,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -540,6 +542,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -6255,6 +6259,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -13991,4 +13997,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file From d38b5cae937c22784345ccbee6f0bec4d89d2682 Mon Sep 17 00:00:00 2001 From: Alexander Yakunin Date: Wed, 1 Jul 2026 17:02:01 +0200 Subject: [PATCH 02/26] Update CH change --- .../Sales/Posting/SalesPost.Codeunit.al | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/Layers/CH/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/CH/BaseApp/Sales/Posting/SalesPost.Codeunit.al index f0068a2da4f..9c6804adc7d 100644 --- a/src/Layers/CH/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/CH/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -355,6 +355,8 @@ codeunit 80 "Sales-Post" ProcessPosting(SalesHeader, SalesHeader2, TempDropShptPostBuffer, CustLedgEntry, EverythingInvoiced); + Clear(GenJnlPostLine); + UpdateLastPostingNos(SalesHeader); OnRunOnBeforeFinalizePosting( @@ -372,7 +374,7 @@ codeunit 80 "Sales-Post" // Date-ordered No. Series require that number allocation and the posted document are in the same // transaction to prevent gaps. At this point FinalizePosting has completed, so both the allocated - // number and the posted document exist in the current transaction — committing is safe. + // number and the posted document exist in the current transaction — committing is safe. // Restore SuppressCommit to the caller's original value so that the date-order guard // no longer blocks the final commit. if DateOrderSeriesUsed and SuppressCommit then @@ -555,6 +557,8 @@ codeunit 80 "Sales-Post" OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); if not SkipInventoryAdjustment then MakeInventoryAdjustment(); + + OnAfterProcessPostingLines(SalesHeader, TotalSalesLine, CustLedgEntry, InvoicePostingParameters, SuppressCommit, EverythingInvoiced, Window, HideProgressWindow); end; /// @@ -949,7 +953,7 @@ codeunit 80 "Sales-Post" repeat ErrorMessageMgt.PushContext(ErrorContextElement, TempSalesLineGlobal.RecordId(), 0, CheckSalesLineMsg); TestSalesLine(SalesHeader, TempSalesLineGlobal); - if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then + if (SalesHeader.Ship or SalesHeader.Receive or SalesHeader.Invoice) and (TempSalesLineGlobal.Type = TempSalesLineGlobal.Type::Item) and (TempSalesLineGlobal."Qty. to Ship" <> 0) then NoOfItemLines += 1; until TempSalesLineGlobal.Next() = 0; ErrorMessageMgt.PopContext(ErrorContextElement); @@ -2587,7 +2591,7 @@ codeunit 80 "Sales-Post" OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader, SalesLine); end; end; - + local procedure TestSalesLineItemCharge(SalesLine: Record "Sales Line") var IsHandled: Boolean; @@ -6290,6 +6294,8 @@ codeunit 80 "Sales-Post" if SalesHeader."Bill-to Contact No." <> '' then if Contact.Get(SalesHeader."Bill-to Contact No.") then Contact.CheckIfPrivacyBlocked(true); + + OnAfterCheckPostRestrictions(SalesHeader); end; local procedure CheckCustBlockage(SalesHeader: Record "Sales Header"; CustCode: Code[20]; ExecuteDocCheck: Boolean) @@ -11728,7 +11734,7 @@ codeunit 80 "Sales-Post" DimensionMgt.GetCombinedDimensionSetID(DimSetID, ItemJnlLine2."Shortcut Dimension 1 Code", ItemJnlLine2."Shortcut Dimension 2 Code"); end; end; - + local procedure UpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; SalesLine: Record "Sales Line") var ItemLedgEntry: Record "Item Ledger Entry"; @@ -14105,4 +14111,18 @@ codeunit 80 "Sales-Post" local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) + begin + end; + + /// + /// Raised after checking posting restrictions + /// + /// + [IntegrationEvent(false, false)] + local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") + begin + end; } \ No newline at end of file From 83ccd1b6de6b8970bd81b582115b073aee872439 Mon Sep 17 00:00:00 2001 From: Alexander Yakunin Date: Wed, 1 Jul 2026 17:06:44 +0200 Subject: [PATCH 03/26] Update event comments --- .../Sales/Posting/SalesPost.Codeunit.al | 1122 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1122 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1130 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1130 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1122 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1126 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1120 ++++++++++++++++ .../Sales/Posting/SalesPost.Codeunit.al | 1142 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1168 ++++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1122 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1126 +++++++++++++++- .../Sales/Posting/SalesPost.Codeunit.al | 1122 +++++++++++++++- 12 files changed, 13538 insertions(+), 14 deletions(-) diff --git a/src/Layers/APAC/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/APAC/BaseApp/Sales/Posting/SalesPost.Codeunit.al index fb9686d571d..6f330ff5452 100644 --- a/src/Layers/APAC/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/APAC/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -12930,834 +12930,1498 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13765,384 +14429,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -14159,16 +15127,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -14185,176 +15165,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14368,4 +15488,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 22a4beede61..ffc6072c4c2 100644 --- a/src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -12614,834 +12614,1498 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13449,384 +14113,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -13843,16 +14811,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -13869,176 +14849,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14052,4 +15172,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/CH/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/CH/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 9c6804adc7d..26380540feb 100644 --- a/src/Layers/CH/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/CH/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -374,7 +374,7 @@ codeunit 80 "Sales-Post" // Date-ordered No. Series require that number allocation and the posted document are in the same // transaction to prevent gaps. At this point FinalizePosting has completed, so both the allocated - // number and the posted document exist in the current transaction — committing is safe. + // number and the posted document exist in the current transaction � committing is safe. // Restore SuppressCommit to the caller's original value so that the date-order guard // no longer blocks the final commit. if DateOrderSeriesUsed and SuppressCommit then @@ -12433,6 +12433,10 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin @@ -12687,834 +12691,1498 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; - [IntegrationEvent(false, false)] + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// + [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13522,384 +14190,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -13916,16 +14888,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -13942,176 +14926,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14125,4 +15249,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/ES/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/ES/BaseApp/Sales/Posting/SalesPost.Codeunit.al index b88bdb26373..6680f6ea710 100644 --- a/src/Layers/ES/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/ES/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -10401,6 +10401,10 @@ codeunit 80 "Sales-Post" end; [Obsolete('Moved to codeunit "CRT Sales-Post"', '29.0')] + /// + /// Event raised by OnBeforeCreateCarteraBills. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateCarteraBills(SalesHeader: Record "Sales Header"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var TotalSalesLine: Record "Sales Line") begin @@ -12690,839 +12694,1507 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnBeforeCheckCorrectedInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckCorrectedInvoice(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13530,384 +14202,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -13924,16 +14900,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -13950,176 +14938,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14133,4 +15261,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 6ea28cbcde8..127bfd9ade8 100644 --- a/src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -12583,834 +12583,1498 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13418,384 +14082,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -13812,16 +14780,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -13838,176 +14818,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14021,4 +15141,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/FR/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/FR/BaseApp/Sales/Posting/SalesPost.Codeunit.al index e4693c78333..42175dd9aa4 100644 --- a/src/Layers/FR/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/FR/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -10063,6 +10063,10 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(SalesHeader: Record "Sales Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; var TotalSalesLine: Record "Sales Line"; var Currency: Record Currency) begin @@ -12607,834 +12611,1498 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13442,384 +14110,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -13836,16 +14808,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -13862,176 +14846,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14045,4 +15169,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/GB/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/GB/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 352663bab6e..37738aab637 100644 --- a/src/Layers/GB/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/GB/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -12641,834 +12641,1498 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13476,384 +14140,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -13870,16 +14838,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -13896,176 +14876,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin diff --git a/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 02fb644c5d5..1ed313f80d5 100644 --- a/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -10752,6 +10752,10 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnAfterPostResJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostResJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; JobTaskSalesLine: Record "Sales Line"; ResJnlLine: Record "Res. Journal Line") begin @@ -11294,6 +11298,10 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnBeforePostResJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResJnlLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var JobTaskSalesLine: Record "Sales Line"; var IsHandled: Boolean; DocNo: Code[20]; ExtDocNo: Code[35]; SourceCode: Code[10]; SalesShptHeader: Record "Sales Shipment Header"; ReturnRcptHeader: Record "Return Receipt Header"; var ResJnlPostLine: Codeunit "Res. Jnl.-Post Line") begin @@ -12780,854 +12788,1534 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedPaymentOnBeforeInsertPostedPayments. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedPaymentOnBeforeInsertPostedPayments(SalesHeader: Record "Sales Header"; PaymentTermsLine: Record "Payment Lines"; var PostedPayments: Record "Posted Payment Lines") begin end; + /// + /// Event raised by OnInsertPostedPaymentOnBeforeInsertPaymentJournalLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedPaymentOnBeforeInsertPaymentJournalLine(SalesHeader: Record "Sales Header"; PaymentTermsLine: Record "Payment Lines"; var PaymentJournalLine: Record "Payment Lines") begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnBeforeInsertPostedPayment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedPayment(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnValidateIncludeInVATReportAfterValidate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidateIncludeInVATReportAfterValidate(SalesHeaderParam: Record "Sales Header"; var InclInVATReportErrorLogTemp: Record "Incl. in VAT Report Error Log" temporary) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13635,379 +14323,679 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -14024,16 +15012,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -14050,176 +15050,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14233,4 +15373,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/NA/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/NA/BaseApp/Sales/Posting/SalesPost.Codeunit.al index 1dcafe86304..04813d83888 100644 --- a/src/Layers/NA/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/NA/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -11067,6 +11067,10 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnAfterPostResJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostResJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; JobTaskSalesLine: Record "Sales Line"; ResJnlLine: Record "Res. Journal Line") begin @@ -12203,16 +12207,28 @@ codeunit 80 "Sales-Post" until FindEmailParameter.Next() = 0; end; + /// + /// Event raised by OnBeforeCalculateSalesTax. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateSalesTax(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesTaxAmountLine: Record "Sales Tax Amount Line"; var LocalwasProcessed: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnFinalizeInvoicePostingSalesTax. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizeInvoicePostingSalesTax(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizeCreditmemoPostingSalesTax. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizeCreditmemoPostingSalesTax(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin @@ -12615,11 +12631,19 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnBeforePostSalesTaxToGL. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostSalesTaxToGL(var GenJnlLine: Record "Gen. Journal Line"; SalesHeader: Record "Sales Header"; SalesTaxAmountLine: Record "Sales Tax Amount Line") begin end; + /// + /// Event raised by OnBeforePostSalesTaxRoundingToGL. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostSalesTaxRoundingToGL(var GenJnlLine: Record "Gen. Journal Line"; SalesHeader: Record "Sales Header") begin @@ -13113,839 +13137,1507 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; - [IntegrationEvent(false, false)] + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// + [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcSalesTaxGeneral. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcSalesTaxGeneral(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13953,389 +14645,697 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostSalesTaxToGeneralLedger. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostSalesTaxToGeneralLedger(var SalesHeader: Record "Sales Header"; var LineCount: Integer; var TempSalesTaxAmountLine: Record "Sales Tax Amount Line" temporary; var Window: Dialog; var SalesTaxCountry: Option US,CA,,,,,,,,,,,,NoTax; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var SourceCode: Code[10]; var Currency: Record Currency; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -14352,16 +15352,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -14378,191 +15390,343 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnFinalizePostingOnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterDecrementPrepmtAmtInvLCY(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnAddSalesTaxLineToSalesTaxCalcOnBeforeTempSalesLineForSalesTaxInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAddSalesTaxLineToSalesTaxCalcOnBeforeTempSalesLineForSalesTaxInsert(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineForSalesTax: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnSetTaxTypeOnAfterAddSalesTaxLineToSalesTaxCalc. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetTaxTypeOnAfterAddSalesTaxLineToSalesTaxCalc(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14576,4 +15740,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al index efa56106c40..8a41e90a0c0 100644 --- a/src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -12582,834 +12582,1498 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13417,384 +14081,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -13811,16 +14779,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -13837,176 +14817,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14020,4 +15140,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/RU/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/RU/BaseApp/Sales/Posting/SalesPost.Codeunit.al index bd7995e35c6..6b5e226c16c 100644 --- a/src/Layers/RU/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/RU/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -13307,839 +13307,1507 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnCheckApplyFrom. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnCheckApplyFrom(SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -14147,384 +14815,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -14541,16 +15513,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -14567,176 +15551,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14750,4 +15874,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} diff --git a/src/Layers/W1/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/W1/BaseApp/Sales/Posting/SalesPost.Codeunit.al index c1587874edc..093201f3dbe 100644 --- a/src/Layers/W1/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/W1/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -12573,834 +12573,1498 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterDivideAmount(var OldSalesLine: Record "Sales Line"; var SalesLineQty: Decimal; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnSumSalesLines2OnAfterCalcTotalAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnAfterCalcTotalAdjCostLCY(var TotalAdjCostLCY: decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeCalcVATAmountLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var TempVATAmountLine: Record "VAT Amount Line" temporary; QtyType: Option General,Invoicing,Shipping; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2OnBeforeNewSalesLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2OnBeforeNewSalesLineInsert(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLines2SetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLines2SetFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; InsertSalesLine: Boolean; var QtyType: Option) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostTempWhseJnlLine2(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestUpdatedSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestUpdatedSalesLine(var SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineBeforeInitQtyToInvoice(var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitTempSalesLineQuantities(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterUpdateInvoicedValues(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterInsertSalesOrderHeader(var SalesOrderLine: Record "Sales Line"; TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateInvoicedValues(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; SalesSetup: Record "Sales & Receivables Setup"; var SetDefaultQtyBlank: Boolean) begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterTempSalesLineSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcInvDiscount(SalesHeader: Record "Sales Header"; TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PreviewMode: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; SuppressCommit: Boolean; WhseReceive: Boolean; WhseShip: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterReleaseSalesDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterReleaseSalesDocument(SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean; var HideProgressWindow: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var ModifyHeader: Boolean); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPoszingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPoszingFromWhseRef(var SalesHeader: Record "Sales Header"; var InvtPickPutaway: Boolean; var PostingFromWhseRef: Integer); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var SalesHeader: Record "Sales Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAssosOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssosOrderLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckSalesDocumentOnAfterCalcShouldCheckItemCharge(var SalesHeader: Record "Sales Header"; WhseReceive: Boolean; WhseShip: Boolean; var ShouldCheckItemCharge: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Ship: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnBeforeCheck(var SalesHeader: Record "Sales Header"; var TempWhseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWhseReceiptHeader: Record "Warehouse Receipt Header" temporary; var Receive: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnAfterTempItemSalesLineLoop(var TempItemSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckCustBlockageOnAfterTempLinesSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckCustBlockageOnAfterTempLinesSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary); begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempPrepmtSalesLineSetFilters(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetSalesPrepmtAccount(var GLAcc: Record "G/L Account"; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterTempSalesLineSetFilters(var TempSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempPrepmtSalesLine: Record "Sales Line" temporary; var NextLineNo: Integer) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var SalesHeader: Record "Sales Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempSalesLine: Record "Sales Line" temporary; var TempSalesLineGlobal: Record "Sales Line" temporary; SalesPost: Codeunit "Sales-Post") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeCreateOutboxSalesTrans. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCreateOutboxSalesTrans(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; EverythingInvoiced: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeGenJnlPostPreviewThrowError(SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostATOOnBeforePostedATOLinkInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOOnBeforePostedATOLinkInsert(var PostedATOLink: Record "Posted Assemble-to-Order Link"; var AssemblyHeader: Record "Assembly Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostATOAssocItemJnlLineOnBeforeRemainingPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostATOAssocItemJnlLineOnBeforeRemainingPost(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PostedATOLink: Record "Posted Assemble-to-Order Link"; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDropOrderShipmentOnAfterUpdateBlanketOrderLine(PurchOrderHeader: Record "Purchase Header"; PurchOrderLine: Record "Purchase Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCalcShouldPostItemJnlLineItemCharges(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var ShouldPostItemJnlLineItemCharges: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; WhseShip: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var QtyToBeShipped: Decimal; TrackingSpecification: Record "Tracking Specification"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var QtyToBeShippedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeIsJobContactLineCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeIsJobContactLineCheck(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ShouldPostItemJnlLine: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineWhseLine(var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeTransferReservToItemJnlLine(SalesLine: Record "Sales Line"; ItemJnlLine: Record "Item Journal Line"; var CheckApplFromItemEntry: Boolean; var TrackingSpecification: Record "Tracking Specification"; QtyToBeShippedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyTrackingFromSpec(TrackingSpecification: Record "Tracking Specification"; var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargeSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcItemJnlAmounts(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; IsATO: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var SalesLineToPost: Record "Sales Line"; var SalesLine: Record "Sales Line"; QtyToAssign: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterTempTrackingSpecificationInvSetFilters(SalesHeader: record "Sales Header"; var ItemJnlLine2: record "Item Journal Line"; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TotalSalesLineLCY: Record "Sales Line"; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var SkipTestJobNo: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeLastRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeLastRunWithCheck(NonDistrItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnBeforeRunWithCheck(ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var SkipTestJobNo: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCheckItemChargePerShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCheckItemChargePerShpt(SalesShipmentLine: Record "Sales Shipment Line"; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; DistributeCharge: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargePerShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerShptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; ReturnRcptLine: Record "Return Receipt Line"; TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var DistributeCharge: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnBeforeTestFieldJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingLineOnAfterRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterSetFilters(var SalesShipmentLine: Record "Sales Shipment Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterUpdateSalesShptLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(SalesShptLine: Record "Sales Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeShipmentInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnReceiptInvoiceErr(SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesHeader: Record "Sales Header"; var ItemJnlRollRndg: Boolean; TrackingSpecificationExists: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterSetFilters(var ReturnReceiptLine: Record "Return Receipt Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertCrMemoLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertInvoiceLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; var ShouldInsertInvoiceLine: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertReturnReceiptLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeInsertShipmentLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line"; DocType: Option; DocNo: Code[20]; ExtDocNo: Code[35]) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterSetEverythingInvoiced(SalesLine: Record "Sales Line"; var EverythingInvoiced: Boolean; var IsHandled: Boolean; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterRoundAmount(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnAfterPostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterTestSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterTestSalesLine(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean; PreviewMode: Boolean; var CostBaseAmount: Decimal) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostItemTrackingLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostSalesLineOnBeforePostItemTrackingLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ItemLedgShptEntryNo: Integer; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeTestUnitOfMeasureCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeTestUnitOfMeasureCode(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnAfterAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterAdjustPrepmtAmountLCY(var SalesLine: record "Sales Line"; var xSalesLine: record "Sales Line"; TempTrackingSpecification: record "Tracking Specification" temporary; SalesHeader: record "Sales Header") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterInsertReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterInsertReturnReceiptLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; ReturnRcptHeader: Record "Return Receipt Header"; RoundingLineInserted: Boolean; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; SalesShptLine: Record "Sales Shipment Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterGetSalesOrderLine(var TempSalesLine: Record "Sales Line" temporary; ReturnRcptLine: Record "Return Receipt Line"; SalesOrderLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitQtyToInvoice(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnAfterModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeModifySalesOrderLine(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeCalcQuantityInvoiced(var SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnBeforePostAssocItemJnlLine(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckTotalInvoiceAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckTotalInvoiceAmount(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var ReturnReceiptHeader: Record "Return Receipt Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean; GenJnlLineExtDocNo: Code[35]; var EverythingInvoiced: Boolean; GenJnlLineDocNo: Code[20]; SrcCode: Code[10]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforePostSalesLineEndLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostSalesLineEndLoop(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var LastLineRetrieved: Boolean; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; RecSalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetATOItemLedgEntriesNotInvoicedOnBeforeItemLedgEntryNotInvoicedInsert(var ItemLedgEntry: Record "Item Ledger Entry") begin end; + /// + /// Event raised by OnGetPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var PostedSalesDocumentVariant: Variant; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnGetSalesLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetSalesLinesOnAfterFillTempLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnAfterMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnAfterMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemLineOnBeforeMakeSalesLineToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforeMakeSalesLineToShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var ItemLedgShptEntryNo: Integer; var IsHandled: Boolean; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; ReturnReceiptHeader: Record "Return Receipt Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostItemInvoiceLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterTempItemChargeAssgntSalesLoop(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineParam: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReturnRcptLineModify(SalesHeader: Record "Sales Header"; var ReturnRcptLine: Record "Return Receipt Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeAdjustQuantityRounding(ReturnRcptLine: Record "Return Receipt Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; var ShouldAdjustQuantityRounding: Boolean) begin end; + /// + /// Event raised by OnReleaseSalesDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleaseSalesDocumentOnBeforeSetStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SavedStatus: Enum "Sales Document Status"; PreviewMode: Boolean; SuppressCommit: Boolean); begin end; + /// + /// Event raised by OnRoundAmountOnAfterAssignSalesLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnAfterAssignSalesLines(var xSalesLine: Record "Sales Line"; var SalesLineACY: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLines: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var SalesLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSendICDocumentOnBeforeSetICStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendICDocumentOnBeforeSetICStatus(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSendPostedDocumentRecordElseCase. + /// + /// [IntegrationEvent(false, false)] local procedure OnSendPostedDocumentRecordElseCase(SalesHeader: Record "Sales Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnAfterTestSalesLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterTestSalesLineJob(var SalesLine: record "Sales Line") begin end; + /// + /// Event raised by OnTestSalesLineOnAfterCalcShouldTestReturnQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnAfterCalcShouldTestReturnQty(SalesLine: Record "Sales Line"; var ShouldTestReturnQty: Boolean) begin end; + /// + /// Event raised by OnBeforeTestGenPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestGenPostingGroups(var SalesLine: record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnAfterPostJobContractLine(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnUpdateAssosOrderOnAfterPurchOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderOnAfterPurchOrderHeaderModify(var PurchOrderHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeModifyPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeModifyPurchLine(var PurchOrderLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleasePurchaseDocument(var PurchOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAfterPostingOnBeforeFindSetForUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAfterPostingOnBeforeFindSetForUpdate(var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckSellToCustomerNo(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateInvoicedQtyOnShipmentLineOnBeforeModifySalesShptLine(var SalesShptLine: Record "Sales Shipment Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterInitLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterInitLineDiscountAmount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SalesLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcVATBaseAmount(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateReturnReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostUpdateReturnReceiptLine(var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(SalesHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendPostedDocumentRecord. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendPostedDocumentRecord(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var DocumentSendingProfile: Record "Document Sending Profile") begin end; + /// + /// Event raised by OnAfterPostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargeLine(var SalesLine: Record "Sales Line"; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterDeleteLinks(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteSalesHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnDeleteAfterPostingOnBeforeDeleteLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnBeforeDeleteLinks(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateWonOpportunitiesOnBeforeOpportunityModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWonOpportunitiesOnBeforeOpportunityModify(var SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; var Opportunity: Record Opportunity) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCheckShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCheckShip(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeUpdateReceiveAndCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiveAndCheckIfInvPutawayExists(var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnModifyTempLineOnAfterSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnAfterSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeSalesLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesLine(SalesLine: Record "Sales Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnReceiptLine(ReturnReceiptLine: Record "Return Receipt Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateSalesLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateSalesLineDimSetIDFromAppliedEntry(var SalesLineToPost: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; DimSetID: array[10] of Integer) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSetupSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSetupSalesHeader(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnDeleteAfterPostingOnAfterSalesLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnDeleteAfterPostingOnAfterSalesLineDeleteAll(SalesHeader: Record "Sales Header"; SalesInvoiceHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine(var TempSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostResJnlLineOnAfterInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnAfterInit(var ResJnlLine: Record "Res. Journal Line"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLineGlobal: Record "Sales Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforePostItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnAfterInsertReturnReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnReceiptHeader(var SalesHeader: Record "Sales Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin @@ -13408,384 +14072,688 @@ codeunit 80 "Sales-Post" #if not CLEAN27 [Obsolete('This event is never raised.', '27.0')] + /// + /// Event raised by OnAfterGetAmountsForDeferral. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountsForDeferral(SalesLine: Record "Sales Line"; var AmtToDefer: Decimal; var AmtToDeferACY: Decimal; var DeferralAccount: Code[20]) begin end; #endif + /// + /// Event raised by OnPostJobContractLineBeforeTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostJobContractLineBeforeTestFields(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertCrMemoHeaderOnAfterCalcShouldProcessAsReturnOrder(SalesHeader: Record "Sales Header"; var ShouldProcessAsReturnOrder: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForShipmentOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; HasATOShippedNotInvoiced: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateReturnReceiptLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeGetATOItemLedgEntriesNotInvoiced(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckDueDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckDueDate(var SalesHeader: Record "Sales Header"; var ShouldCheckDueDate: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnAfterCalcShouldInsertTrkgSpecInv(var SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var ShouldInsertTrkgSpecInv: Boolean) begin end; + /// + /// Event raised by OnUpdateSalesLineBeforePostOnBeforeGetUnitCost. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateSalesLineBeforePostOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlAmountsFromQtyToBeInvoiced(var ItemJnlLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; QtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterSetFilters(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeCalcVATAmountLines(var TempSalesLineGlobal: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestSalesLineOnBeforeTestFieldQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestSalesLineOnBeforeTestFieldQtyToShip(SalesLine: Record "Sales Line"; var ShouldTestQtyToShip: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertShipmentLine(var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnIsEndLoopForShippedNotInvoicedOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnIsEndLoopForShippedNotInvoicedOnBeforeExit(SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; RemQtyToBeInvoiced: Decimal; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLinePrepareJournalLineOnBeforeCalcQuantities(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean; IsATO: Boolean) begin end; + /// + /// Event raised by OnBeforeInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRounding(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyTrackingFromSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyTrackingFromSpec(var ItemJnlLine: Record "Item Journal Line"; SalesLine: Record "Sales Line"; QtyToBeShipped: Decimal; IsATO: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateQtyToInvoice(var SalesHeader: Record "Sales Header"; var ShouldValidateQtyToInvoice: Boolean; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterSetFilterTempSalesLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSettings(var TempItemSalesLine: Record "Sales Line" temporary; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceipt(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineTrackingOnBeforeInsertTempTrkgSpec(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpec: Record "Tracking Specification" temporary; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCheckDocumentType. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCheckDocumentType(SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; SalesSetup: Record "Sales & Receivables Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; SuppressCommit: Boolean; PreviewMode: Boolean; InvoicePostingParameters: Record "Invoice Posting Parameters"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin end; + /// + /// Event raised by OnBeforeFindNotShippedLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFindNotShippedLines(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforePostSalesLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforePostSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; SalesLineACY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterUpdateInvoiceRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoiceRounding(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var SalesLine: Record "Sales Line"; var Currency: Record Currency; var BiggestLineNo: Integer; var LastLineRetrieved: Boolean; var RoundingLineInserted: Boolean; var RoundingLineNo: Integer; UseTempData: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterSetFilters(var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemLineOnBeforePostItemJnlLineForInvoiceDoc(SalesHeader: Record "Sales Header"; var SalesLineToShip: Record "Sales Line"; Ship: Boolean; var ItemLedgShptEntryNo: Integer; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; SalesShptHeader: Record "Sales Shipment Header"; var TempHandlingSpecification: Record "Tracking Specification" temporary; var TempTrackingSpecificationInv: Record "Tracking Specification" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean; QtyToInvoice: Decimal; TempAssembletoOrderLink: Record "Posted Assemble-to-Order Link" temporary) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForReceipt(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForReceipt: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldPostItemTrackingForShipment(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; RemQtyToBeInvoiced: Decimal; QtyToInvoiceBaseInTrackingSpec: Decimal; var ShouldPostItemTrackingForShipment: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetQuantityShipped. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetQuantityShipped(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeGetReturnQtyReceived(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessReceipt(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldProcessReceipt: Boolean; var ItemJnlRollRndg: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitOutstanding(var SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforeBalAccountNoWindowUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforeBalAccountNoWindowUpdate(HideProgressWindow: Boolean; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterCalcShouldCalcPrepmtAmounts(var TempSalesLine: Record "Sales Line" temporary; var ShouldCalcPrepmtAmounts: Boolean) begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckItemTrackingQuantityOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemTrackingQuantityOnDocumentTypeCaseElse(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var ErrorOnCommit: Boolean) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var SalesHeader: Record "Sales Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeAssignQtyToInvoice(var TempSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemLedgerEntryExist. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeItemLedgerEntryExist(var SalesLine: Record "Sales Line"; ShipOrReceive: Boolean; var HasItemLedgerEntry: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterCalcShouldInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var ShouldInsertInvoiceHeader: Boolean) begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnAfterItemEntryRelationInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnAfterItemEntryRelationInsert(SalesShipmentLine: Record "Sales Shipment Line"; var ItemEntryRelation: Record "Item Entry Relation"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeSetInvoiceFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeSetInvoiceFields(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line"; var ShouldSetInvoiceFields: Boolean) begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeError(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var InvoiceEverything: Boolean) begin end; + /// + /// Event raised by OnBeforeGetSalesLineAdjCostLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetSalesLineAdjCostLCY(SalesLine2: Record "Sales Line"; QtyType: Option General,Invoicing,Shipping; AdjCostLCY: Decimal; var Result: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetShipmentPPmtAmtToDeduct(SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var ShouldTestGetShipmentPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var ReturnReceiptHeader: Record "Return Receipt Header") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeUpdateSalesLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeUpdateSalesLineBeforePost(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterSumSalesLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumSalesLines2(var SalesHeader: Record "Sales Header"; var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPostWhseShptLinesOnAfterWhseShptLinesFound(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var WhseShptLinesFound: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseShip: Boolean; WhseReceive: Boolean; var WarehouseShipmentLine: Record "Warehouse Shipment Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(SalesHeader: Record "Sales Header"; var PrepmtSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostResJnlLineOnShouldExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostResJnlLineOnShouldExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeUpdateTempVATAmountLineRemainder(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var SalesLineToPost: Record "Sales Line"; QtyToAssign: Decimal; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeValidateType. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeValidateType(var TempPrepmtSalesLine: Record "Sales Line" temporary; var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeValidateDocumentDate(var PostingDateExists: Boolean; var ReplaceDocumentDate: Boolean; var PostingDate: Date; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCheckSalesDocumentOnBeforeCheckSalesDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckSalesDocumentOnBeforeCheckSalesDim(var SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCreatePrepaymentTextLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepaymentTextLines(var TempPrepmtSalesLine: Record "Sales Line" temporary; var TempSalesLine: Record "Sales Line" temporary; SalesHeader: Record "Sales Header"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnBeforeCollectValueEntryRelationForCrMemo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCollectValueEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCollectValueEntryRelation(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesInvoiceLine: Record "Sales Invoice Line") begin end; + /// + /// Event raised by OnPostSalesLineOnAfterCreatePostedDeferralSchedule. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesLineOnAfterCreatePostedDeferralSchedule(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterValidateQuantity. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterValidateQuantity(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInvoiceRoundingOnAfterSetLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInvoiceRoundingOnAfterSetLineNo(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") begin @@ -13802,16 +14770,28 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnBeforeDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header"; var SalesShipmentHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertInvoiceHeader(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertCrMemoHeader(var SalesHeader: Record "Sales Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header") begin @@ -13828,176 +14808,316 @@ codeunit 80 "Sales-Post" begin end; + /// + /// Event raised by OnProcessPostingLinesOnBeforePostDropOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessPostingLinesOnBeforePostDropOrderShipment(SalesHeader: Record "Sales Header"; TotalSalesLine: Record "Sales Line"; TotalSalesLineLCY: Record "Sales Line") begin end; + /// + /// Event raised by OnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterArchiveUnpostedOrder(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; OrderArchived: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckReturnRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReturnRcptLine(var ReturnReceiptLine: Record "Return Receipt Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnReceiptHeaderOnBeforeReturnReceiptHeaderTransferFields(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line"; var InvoiceEverything: Boolean; var AssignError: Boolean; var QtyNeeded: Decimal; var TempItemChargeAssgntSales: Record "Item Charge Assignment (Sales)" temporary; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)"; var TempSalesLineGlobal: Record "Sales Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeTestLineFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeTestLineFields(var SalesShipmentLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateQtyToBeInvoicedForReturnReceiptOnAfterSetQtyToBeInvoiced(TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var SalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertPostedHeadersOnAfterInsertShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInsertShipmentHeader(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersDeleteServItemOnSaleCreditMemo(var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunWithCheckOnAfterFinalize. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunWithCheckOnAfterFinalize(var SalesHeader: Record "Sales Header"); begin end; + /// + /// Event raised by OnBeforeFinalizePostATO. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePostATO(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeDeleteATOLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteATOLinks(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckATOLink. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckATOLink(SalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumSalesLinesTempOnAfterVatAmountSet. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumSalesLinesTempOnAfterVatAmountSet(var VATAmount: Decimal; var TotalSalesLine: Record "Sales Line") begin end; + /// + /// Event raised by OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertShptEntryRelationOnBeforeDeleteTempHandlingSpecification(var TempHandlingTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeModifyPurchOrderHeader(var PurchaseOrderHeader: Record "Purchase Header"; var SalesHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnAfterPostJobContractLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostJobContractLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcPrepmtAmtToDeduct(var SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var PrepmtAmtToDeduct: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJournalLineWarehouseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJournalLineWarehouseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAdjustPrepmtAmountLCYOnAfterGetOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAdjustPrepmtAmountLCYOnAfterGetOrderLine(var SalesLine: Record "Sales Line"; var SalesInvoiceLine: Record "Sales Line"); begin end; + /// + /// Event raised by OnBeforeGetQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetQtyToInvoice(SalesLine: Record "Sales Line"; Ship: Boolean; var IsHandled: Boolean; var QtyToInvoice: Decimal) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var TempPrepmtDeductLCYSalesLine: Record "Sales Line" temporary; var CombinedSalesLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateRemainingQtyToBeInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateRemainingQtyToBeInvoiced(SalesShptLine: Record "Sales Shipment Line"; var RemQtyToInvoiceCurrLine: Decimal; var RemQtyToInvoiceCurrLineBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLineForCreditMemoOnBeforeGetSalesPrepmtAccount(var GLAccount: Record "G/L Account"; var SalesInvoiceLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateEmailParameters. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateEmailParameters(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostUpdateOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderNo(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetInvoiceOrderNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetInvoiceOrderNo(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveRelatedJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveRelatedJob(SalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnSyncSurPlusItemTrackingOnBeforeModifyQtyToHandleInvoice(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var ReservationEntry: Record "Reservation Entry") begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var CustLedgEntry: Record "Cust. Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog; HideProgressWindow: Boolean) begin @@ -14011,4 +15131,4 @@ codeunit 80 "Sales-Post" local procedure OnAfterCheckPostRestrictions(var SalesHeader: Record "Sales Header") begin end; -} \ No newline at end of file +} From 7ae22ff1b45fff9943d29dec1809bc76d443a119 Mon Sep 17 00:00:00 2001 From: Alexander Yakunin Date: Wed, 1 Jul 2026 17:11:45 +0200 Subject: [PATCH 04/26] Add event comments for Purch Post --- .../Purchases/Posting/PurchPost.Codeunit.al | 1997 ++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 2001 ++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 1997 ++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 2001 ++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 1993 ++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 1993 ++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 2027 +++++++++++++++- .../Purchases/Posting/PurchPost.Codeunit.al | 2045 +++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 1993 ++++++++++++++++ .../Purchases/Posting/PurchPost.Codeunit.al | 1992 ++++++++++++++++ 10 files changed, 20036 insertions(+), 3 deletions(-) diff --git a/src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 1442d2e0a48..294e2d9b8ad 100644 --- a/src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -9454,169 +9454,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9629,275 +9761,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -9905,163 +10253,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -10069,97 +10545,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -10172,98 +10724,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -10271,6 +10899,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -10278,241 +10910,433 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10520,62 +11344,110 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10583,72 +11455,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10659,227 +11587,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -10888,191 +11996,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -11080,162 +12340,290 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -11243,102 +12631,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -11348,663 +12816,1187 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -12019,8 +14011,13 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnBeforePostWHT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostWHT(var PurchaseHeader: Record "Purchase Header"; var TotalInvAmount: Decimal; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var TempPurchaseLineGlobal: Record "Purchase Line" temporary; var WHTEntry: Record "WHT Entry"; var IsHandled: Boolean) begin end; } + diff --git a/src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index b7a7d85810c..b82131d0731 100644 --- a/src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -9020,169 +9020,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9195,275 +9327,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -9471,163 +9819,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -9635,97 +10111,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -9738,98 +10290,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -9837,6 +10465,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -9844,241 +10476,433 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10086,62 +10910,110 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10149,72 +11021,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10225,227 +11153,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -10454,191 +11562,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -10646,162 +11906,290 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -10809,102 +12197,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -10914,673 +12382,1205 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcVATBaseAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcPmtDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcPmtDiscountAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -11595,3 +13595,4 @@ codeunit 90 "Purch.-Post" begin end; } + diff --git a/src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 4fcf0e0c795..f27b8193800 100644 --- a/src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -9003,169 +9003,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9178,275 +9310,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -9454,163 +9802,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -9618,97 +10094,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -9721,98 +10273,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -9820,6 +10448,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -9827,246 +10459,442 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdPostingDescriptiononInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdPostingDescriptiononInvoice(var PurchaseHeader: Record "Purchase Header"; PostingNo: Code[20]; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10074,62 +10902,110 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10137,72 +11013,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10213,227 +11145,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -10442,191 +11554,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -10634,162 +11898,290 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -10797,102 +12189,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -10902,663 +12374,1187 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -11573,3 +13569,4 @@ codeunit 90 "Purch.-Post" begin end; } + diff --git a/src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 39c2b9836fc..dd2d0855a6f 100644 --- a/src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -9125,169 +9125,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9300,275 +9432,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -9576,168 +9924,300 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckCorrectedInvoiceNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckCorrectedInvoiceNo(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -9745,97 +10225,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -9848,98 +10404,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -9947,6 +10579,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -9954,151 +10590,271 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin @@ -10111,97 +10867,173 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit "CRT Purch.-Post"', '29.0')] + /// + /// Event raised by OnBeforeCreateCarteraBills. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateCarteraBills(PurchHeader: Record "Purchase Header"; var VendLedgEntry: Record "Vendor Ledger Entry"; var TotalPurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10209,62 +11041,110 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10272,72 +11152,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10348,227 +11284,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -10577,191 +11693,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -10769,162 +12037,290 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -10932,102 +12328,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -11037,663 +12513,1187 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -11708,3 +13708,4 @@ codeunit 90 "Purch.-Post" begin end; } + diff --git a/src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 5490c307c49..2e2280eb2c7 100644 --- a/src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -8978,169 +8978,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9153,275 +9285,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -9429,163 +9777,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -9593,97 +10069,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -9696,98 +10248,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -9795,6 +10423,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -9802,241 +10434,433 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10044,62 +10868,110 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10107,72 +10979,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10183,227 +11111,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -10412,191 +11520,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -10604,162 +11864,290 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -10767,102 +12155,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -10872,663 +12340,1187 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -11543,3 +13535,4 @@ codeunit 90 "Purch.-Post" begin end; } + diff --git a/src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index cc736756d46..3eb9fafd5b3 100644 --- a/src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -9004,169 +9004,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9179,275 +9311,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -9455,163 +9803,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -9619,97 +10095,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -9722,98 +10274,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -9821,6 +10449,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -9828,241 +10460,433 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10070,62 +10894,110 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10133,72 +11005,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10209,227 +11137,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -10438,191 +11546,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -10630,162 +11890,290 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -10793,102 +12181,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -10898,663 +12366,1187 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -11569,3 +13561,4 @@ codeunit 90 "Purch.-Post" begin end; } + diff --git a/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index bfbe4b6fb23..8591cd31a70 100644 --- a/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -9344,174 +9344,310 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCheckWithholdingTaxTotalAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckWithholdingTaxTotalAmount(var WithhSocSec: Record "Purch. Withh. Contribution"; var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9524,6 +9660,10 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin @@ -9542,269 +9682,481 @@ codeunit 90 "Purch.-Post" end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -9812,163 +10164,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -9976,97 +10456,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; - [IntegrationEvent(false, false)] + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// + [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -10079,98 +10635,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -10178,6 +10810,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -10185,241 +10821,433 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10427,72 +11255,128 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeInsertPostedPayments. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeInsertPostedPayments(PurchaseHeader: Record "Purchase Header"; PaymentTermsLines: Record "Payment Lines"; var PostedPayments: Record "Posted Payment Lines") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeInsertPaymentJournalLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeInsertPaymentJournalLine(PurchaseHeader: Record "Purchase Header"; PaymentTermsLine: Record "Payment Lines"; var PaymentJournalLine: Record "Payment Lines") begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10500,72 +11384,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10576,227 +11516,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; - [IntegrationEvent(false, false)] + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// + [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -10805,191 +11925,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -10997,177 +12269,317 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnPostWithhSocSecOnBeforeCompWithhTaxInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostWithhSocSecOnBeforeCompWithhTaxInsert(var ComputedWithholdingTax: Record "Computed Withholding Tax"; PurchWithhContribution: Record "Purch. Withh. Contribution") begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeCheckExternalDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeCheckExternalDocNo(var VendLedgEntry: Record "Vendor Ledger Entry"; PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforePaymentsInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforePaymentsInsert(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -11175,102 +12587,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -11280,668 +12772,1196 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnValidateIncludeInVATReportOnAfterValidatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidateIncludeInVATReportOnAfterValidatePurchaseHeader(PurchaseHeaderParam: Record "Purchase Header"; var InclInVATReportErrorLogTemp: Record "Incl. in VAT Report Error Log" temporary) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -11956,3 +13976,4 @@ codeunit 90 "Purch.-Post" begin end; } + diff --git a/src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 465eb781a6b..11260d58de1 100644 --- a/src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -9714,169 +9714,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9889,275 +10021,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -10165,163 +10513,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -10329,97 +10805,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -10432,98 +10984,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -10531,6 +11159,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -10538,241 +11170,433 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10780,67 +11604,119 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeCalculateSalesTax. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateSalesTax(PurchaseHeader: Record "Purchase Header"; var TempPurchLineForSalesTax: Record "Purchase Line" temporary; var TempSalesTaxAmountLine: Record "Sales Tax Amount Line" temporary; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10848,72 +11724,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10924,227 +11856,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -11153,201 +12265,361 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostProvincialSalesTaxToGLOnAfterGenJnlLineAssignFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostProvincialSalesTaxToGLOnAfterGenJnlLineAssignFields(var GenJnlLine: Record "Gen. Journal Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostSalesTaxToGLOnBeforeGenJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesTaxToGLOnBeforeGenJnlPostLine(var GenJnlLine: Record "Gen. Journal Line"; PurchaseHeader: Record "Purchase Header"; var TempSalesTaxAmtLine: Record "Sales Tax Amount Line"); begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -11355,177 +12627,317 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnPostSalesTaxToGLOnAfterGenJnlLineAssignField. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostSalesTaxToGLOnAfterGenJnlLineAssignField(var GenJnlLine: Record "Gen. Journal Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAddSalesTaxLineToSalesTaxCalcOnBeforeOnBeforeTempPurchLineForSalesTaxInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAddSalesTaxLineToSalesTaxCalcOnBeforeOnBeforeTempPurchLineForSalesTaxInsert(var TempPurchLineForSalesTax: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLinesTempOnAfterCalcVATAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLinesTempOnAfterCalcVATAmount(PurchHeader: Record "Purchase Header"; TotalPurchLine: Record "Purchase Line"; OldPurchLine: Record "Purchase Line"; var VATAmount: Decimal) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -11533,102 +12945,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -11638,698 +13130,1250 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchHeader: Record "Purchase Header"; var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostSalesTaxToGL. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostSalesTaxToGL(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var LineCount: Integer; var TotalUseTaxAmount: Decimal; var TotalNotUseTaxAmount: Decimal; var TempSalesTaxAmtLine: Record "Sales Tax Amount Line" temporary; var Window: Dialog; var SalesTaxCountry: Option US,CA,,,,,,,,,,,,NoTax; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var SrcCode: Code[10]; var Currency: Record Currency; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TotalPurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostProvincialSalesTaxToGLOnBeforeRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostProvincialSalesTaxToGLOnBeforeRunWithCheck(var PurchHeader: Record "Purchase Header"; var TotalUseTaxAmount: Decimal; var GenJnlLine: Record "Gen. Journal Line"; var TempProvSalesTaxAmtLine: Record "Sales Tax Amount Line" temporary; var Currency: Record Currency) begin end; + /// + /// Event raised by OnAfterPostProvincialSalesTaxToGL. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostProvincialSalesTaxToGL(var PurchHeader: Record "Purchase Header"; var TotalUseTaxAmount: Decimal; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcProvincialSalesTax. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcProvincialSalesTax(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostProvincialSalesTaxToGL. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostProvincialSalesTaxToGL(var PurchaseHeader: Record "Purchase Header"; var TotalUseTaxAmount: Decimal; var TempSalesTaxAmountLine: Record "Sales Tax Amount Line" temporary; var SalesTaxCountry: Option US,CA,,,,,,,,,,,,NoTax; TaxOption: Option ,VAT,SalesTax; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var SrcCode: Code[10]; var Currency: Record Currency; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemCharge(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeThrowError. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeThrowError(varPurchHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -12344,3 +14388,4 @@ codeunit 90 "Purch.-Post" begin end; } + diff --git a/src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 2558300317e..367583737be 100644 --- a/src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -9753,169 +9753,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9928,275 +10060,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -10204,163 +10552,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -10368,97 +10844,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -10471,98 +11023,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -10570,6 +11198,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -10577,241 +11209,433 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10819,62 +11643,110 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10882,72 +11754,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10958,227 +11886,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -11187,191 +12295,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -11379,162 +12639,290 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -11542,102 +12930,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -11647,663 +13115,1187 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin @@ -12319,3 +14311,4 @@ codeunit 90 "Purch.-Post" end; } + diff --git a/src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 9968bde6b5c..f08af3f99b5 100644 --- a/src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -8975,169 +8975,301 @@ codeunit 90 "Purch.-Post" ItemsToAdjust.Add(Item2."No."); end; + /// + /// Event raised by OnArchiveSalesOrdersOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnArchiveSalesOrdersOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnAfterCheckPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchDoc(var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WhseShip: Boolean; WhseReceive: Boolean; PreviewMode: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") begin end; + /// + /// Event raised by OnAfterCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterCheckTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCheckTrackingSpecification(PurchaseHeader: Record "Purchase Header"; var TempItemPurchaseLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForReceive(var PurchaseHeader: Record "Purchase Header"; var Receive: Boolean; CommitIsSupressed: Boolean; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckTrackingAndWarehouseForShip(var PurchaseHeader: Record "Purchase Header"; var Ship: Boolean; CommitIsSupressed: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateJobPurchLine(var JobPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterCreateWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCreateWhseJnlLine(PurchaseLine: Record "Purchase Line"; var TempWhseJnlLine: record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteAfterPosting(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnAfterGetAmountRoundingPrecisionInLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAmountRoundingPrecisionInLCY(DocType: Enum "Purchase Document Type"; DocNo: Code[20]; CurrencyCode: Code[10]; var AmountRoundingPrecision: Decimal) begin end; + /// + /// Event raised by OnAfterGetLineDataFromOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetLineDataFromOrder(var PurchLine: Record "Purchase Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterGetPurchSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchSetup(var PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnAfterModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterModifyTempLine(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] procedure OnAfterPostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PurchRcpHdrNo: Code[20]; RetShptHdrNo: Code[20]; PurchInvHdrNo: Code[20]; PurchCrMemoHdrNo: Code[20]; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostPurchaseDocDropShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchaseDocDropShipment(SalesShptNo: Code[20]; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterRetrieveInvoiceTrackingSpecificationIfExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRetrieveInvoiceTrackingSpecificationIfExists(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePostingNos(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnAfterCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePosting(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterFinalizePostingOnBeforeCommit(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; CommitIsSupressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterIncrAmount(var TotalPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header"; QtyToBeShipped: Decimal) begin end; + /// + /// Event raised by OnAfterInsertCombinedSalesShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCombinedSalesShipment(var SalesShipmentHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShptHeader: Record "Return Shipment Header"; var PurchSetup: Record "Purchases & Payables Setup"; var Window: Dialog) begin end; + /// + /// Event raised by OnAfterInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; WhseReceive: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInvoiceRoundingAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TotalPurchaseLine: Record "Purchase Line"; UseTempData: Boolean; InvoiceRoundingAmount: Decimal; CommitIsSuppressed: Boolean; RoundingLineInserted: Boolean; RoundingLineNo: Integer) begin end; + /// + /// Event raised by OnAfterInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertedPrepmtVATBaseToDeduct(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PrepmtLineNo: Integer; TotalPrepmtAmtToDeduct: Decimal; var TempPrepmtDeductLCYPurchLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal) begin end; + /// + /// Event raised by OnAfterPostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAssocItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var SalesLineOrder: Record "Sales Line"; var SalesOrderHeader: Record "Sales Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterPostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin @@ -9150,275 +9282,491 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnAfterPostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineCopyProdOrder(var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; CommitIsSupressed: Boolean; QtyToBeInvoiced: Decimal) begin end; #endif + /// + /// Event raised by OnAfterPostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerOrder(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemTrackingLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemTrackingLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateCreditMemoLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateCreditMemoLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostUpdateInvoiceLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostUpdateInvoiceLine(var PurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchRcptLineInsert(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; xPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterPurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnAfterPurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line") begin end; + /// + /// Event raised by OnAfterReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; ReturnShptHeader: Record "Return Shipment Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; var TempWhseShptHeader: Record "Warehouse Shipment Header" temporary; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; xPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRevertWarehouseEntry(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnAfterSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptHeaderInsert(var SalesShipmentHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderLine: Record "Sales Line"; CommitIsSuppressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterPostAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostAccICLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterPostItemLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterPostItemLine(PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var WhseReceive: Boolean; var WhseShip: Boolean; var WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseShptHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnAfterPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostWhseJnlLine(var PurchaseLine: Record "Purchase Line"; ItemLedgEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostUpdateOrderLine(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostInvoice(var PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TotalPurchLine: Record "Purchase Line"; TotalPurchLineLCY: Record "Purchase Line"; CommitIsSupressed: Boolean; var VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; + /// + /// Event raised by OnAfterPostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostPurchLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchInvLine: Record "Purch. Inv. Line"; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLineACY: Record "Purchase Line"; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; SrcCode: Code[10]; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterProcessPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPurchLines(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; WhseShip: Boolean; WhseReceive: Boolean; var PurchLinesProcessed: Boolean; CommitIsSuppressed: Boolean; EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnAfterProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessAssocItemJnlLine(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnAfterReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReleasePurchDoc(var PurchHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnAfterRefreshTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRefreshTempLines(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterResetTempLines(var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnAfterRestorePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRestorePurchaseHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseHeaderCopy: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterReverseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterReverseAmount(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterRoundAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnAfterSaveTempWhseSplitSpec. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSaveTempWhseSplitSpec(PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterTestPurchLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnPurchRcptLine(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShptLine(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; TempTrackingSpecification: Record "Tracking Specification" temporary; TrackingSpecificationExists: Boolean; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnAfterUpdateLastPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateLastPostingNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; WhseShip: Boolean; WhseReceive: Boolean; PurchaseHeader: Record "Purchase Header"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnAfterUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Integer; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnAfterUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdatePurchLineDimSetIDFromAppliedEntry(var PurchLineToPost: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeAddAssociatedOrderLineToBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAddAssociatedOrderLineToBuffer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnModifyTempLineOnBeforeTransferFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnModifyTempLineOnBeforeTransferFields(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeAdjustQuantityRoundingForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustQuantityRoundingForReceipt(PurchRcptLine: Record "Purch. Rcpt. Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveUnpostedOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; var OrderArchived: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeArchiveSalesOrders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeArchiveSalesOrders(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeBlanketOrderPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeBlanketOrderPurchLineModify(var BlanketOrderPurchLine: Record "Purchase Line"; PurchLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcInvoice(var PurchHeader: Record "Purchase Header"; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateAmountsInclVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateAmountsInclVAT(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalculateInvoiceEverything. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalculateInvoiceEverything(var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var InvoiceEverything: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCalcLineAmountAndLineDiscountAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; PurchLineQty: Decimal; var IsHandled: Boolean; Currency: Record Currency) begin @@ -9426,163 +9774,291 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckDropShipmentReceiveInvoice. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDropShipmentReceiveInvoice(PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckDocumentTotalAmounts. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeCheckDocumentTotalAmounts(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckExternalDocumentNumber. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExternalDocumentNumber(VendorLedgerEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header"; var Handled: Boolean; DocType: Option; ExtDocNo: Text[35]; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckExtDocNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckExtDocNo(PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Gen. Journal Document Type"; ExtDocNo: Text[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckGLAccDirectPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckGLAccDirectPosting(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICDocumentDuplicatePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICDocumentDuplicatePosting(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckIfInvPutawayExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckIfInvPutawayExists(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckHeaderPostingType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckHeaderPostingType(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFieldsOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterCheckFieldsOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckFieldsOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeCheckPrepmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPrepmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempItemPurchLine: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnBeforeCheckTrackingAndWarehouseForShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckTrackingAndWarehouseForShip(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var Ship: Boolean; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckWarehouse. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWarehouse(var TempItemPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckWhseRcptLineQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckWhseRcptLineQtyToReceive(var WhseRcptLine: Record "Warehouse Receipt Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeClearRemAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeClearRemAmt(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; ItemJnlRollRndg: Boolean; var RemAmt: Decimal; var RemDiscAmt: Decimal) begin end; + /// + /// Event raised by OnBeforeCreatePositiveEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePositiveEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseRcptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseRcptHeader(var PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptHeader(var PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCreatePostedWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedWhseShptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePostedRcptLine(PurchLine: Record "Purchase Line"; ReturnShptLine: Record "Return Shipment Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCreateWhseLineFromReturnShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreateWhseLineFromReturnShptLine(var ReturnShptLine: Record "Return Shipment Line"; PurchLine: Record "Purchase Line"; CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCommitAndUpdateAnalysisVeiw. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCommitAndUpdateAnalysisVeiw(InvtPickPutaway: Boolean; SuppressCommit: Boolean; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCopyAndCheckItemChargeTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCopyAndCheckItemChargeTempPurchLine(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean; var AssignError: Boolean) begin end; + /// + /// Event raised by OnBeforeCreatePrepmtLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCreatePrepmtLines(PurchaseHeader: Record "Purchase Header"; var TempPrepmtPurchaseLine: Record "Purchase Line" temporary; CompleteFunctionality: Boolean; var IsHandled: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeDeleteAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteAfterPosting(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var SkipDelete: Boolean; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeDeleteApprovalEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDeleteApprovalEntries(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeDivideAmount(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; var PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var EverythingInvoiced: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnBeforeGetInvoicePostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetInvoicePostingSetup(var InvoicePostingInterface: Interface "Invoice Posting"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInitAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; PurchaseHeader: Record "Purchase Header") begin @@ -9590,97 +10066,173 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeInvoiceRoundingAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInvoiceRoundingAmount(PurchHeader: Record "Purchase Header"; TotalAmountIncludingVAT: Decimal; UseTempData: Boolean; var InvoiceRoundingAmount: Decimal; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertPostedHeaders(var PurchaseHeader: Record "Purchase Header"; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertRcptEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertRcptEntryRelation(PurchaseLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary; TempTrackingSpecificationInv: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptHeader(var PurchHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReceiptLine(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentLine(var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertTrackingSpecification(PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeItemJnlPostLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean; WhseReceiptHeader: Record "Warehouse Receipt Header"; WhseShipmentHeader: Record "Warehouse Shipment Header"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnBeforeIsEndLoopForShippedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForShippedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsEndLoopForReceivedNotInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsEndLoopForReceivedNotInvoiced(RemQtyToBeInvoiced: Decimal; TrackingSpecificationExists: Boolean; var PurchRcptLine: Record "Purch. Rcpt. Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; PurchLine: Record "Purchase Line"; var EndLoop: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchRcptLineFromTrackingOrUpdateItemEntryRelation(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TrackingSpecification: Record "Tracking Specification"; var ItemEntryRelation: Record "Item Entry Relation"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeGetPurchLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetPurchLines(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeLockTables. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeLockTables(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSuppressed: Boolean; var IsHandled: Boolean; var TempPurchaseLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostLines(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; var TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary) begin end; + /// + /// Event raised by OnBeforePostDistributeItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostDistributeItemCharge(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempItemLedgerEntry: Record "Item Ledger Entry"; NonDistrQuantity: Decimal; NonDistrQtyToAssign: Decimal; NonDistrAmountToAssign: Decimal; Sign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostInvoice(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean; var Window: Dialog; HideProgressWindow: Boolean; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var InvoicePostingInterface: Interface "Invoice Posting"; var InvoicePostingParameters: Record "Invoice Posting Parameters"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePostGLAccICLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostGLAccICLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ICGenJnlLineNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerSalesShpt(var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin @@ -9693,98 +10245,174 @@ codeunit 90 "Purch.-Post" end; [Obsolete('Moved to codeunit MfgPurchPost', '27.0')] + /// + /// Event raised by OnBeforePostItemJnlLineCopyProdOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineCopyProdOrder(PurchLine: Record "Purchase Line"; var ItemJnlLine: Record "Item Journal Line"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforePostPurchaseDoc. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; CommitIsSupressed: Boolean; var HideProgressWindow: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostCommitPurchaseDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostCommitPurchaseDoc(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean; var ModifyHeader: Boolean; var CommitIsSupressed: Boolean; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeProcessAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcessAssocItemJnlLine(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; SourceCode: Code[10]) begin end; + /// + /// Event raised by OnBeforePrepareCheckDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePrepareCheckDocument(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePurchLineDeleteAll. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchLineDeleteAll(var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePurchRcptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforePurchRcptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchRcptLineInsert(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean; ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforePurchInvHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchInvLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePurchCrMemoHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforePurchCrMemoLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeReleasePurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReleasePurchDoc(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean); begin end; + /// + /// Event raised by OnBeforeReturnShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptHeaderInsert(var ReturnShptHeader: Record "Return Shipment Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean) begin end; + /// + /// Event raised by OnBeforeReturnShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeReturnShptLineInsert(var ReturnShptLine: Record "Return Shipment Line"; var ReturnShptHeader: Record "Return Shipment Header"; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnBeforeSalesShptHeaderInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptHeaderInsert(var SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeSalesShptLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSalesShptLineInsert(var SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; DropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSetCheckApplToItemEntry(var PurchaseLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; PurchaseHeader: Record "Purchase Header"; ItemJournalLine: Record "Item Journal Line") begin @@ -9792,6 +10420,10 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostCombineSalesOrderShipment. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostCombineSalesOrderShipment(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShipmentHeader: Record "Sales Shipment Header"; var ItemLedgShptEntryNo: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; var IsHandled: Boolean) begin @@ -9799,241 +10431,433 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer; var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnBeforePostItemJnlLineItemCharges. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineItemCharges(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostAssocItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var SalesLine: Record "Sales Line"; CommitIsSupressed: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerOrder(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ItemJnlLine2: Record "Item Journal Line"; var ItemChargePurchLine: Record "Purchase Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; CommitIsSupressed: Boolean; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargeLineProcedure. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargeLineProcedure(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemLine(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var RemQtyToBeInvoiced: Decimal; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; SourceCode: Code[10]; var PostJobConsumptionBeforePurch: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTracking. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTracking(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TrackingSpecificationExists: Boolean; var PreciseTotalChargeAmt: Decimal; var PreciseTotalChargeAmtACY: Decimal; var RoundedPrevTotalChargeAmt: Decimal; var RoundedPrevTotalChargeAmtACY: Decimal; var IsHandled: Boolean; RemQtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckReceipt(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingCheckShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingCheckShipment(PurchaseLine: Record "Purchase Line"; RemQtyToBeInvoiced: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForReceiptCondition(PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemTrackingItemChargePerOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingItemChargePerOrder(var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification" temporary; var IsHandled: Boolean; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmtCorrect: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingLineOnPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforePostItemTrackingLineOnPostPurchLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; TempTrackingSpecification: Record "Tracking Specification" temporary; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipmentCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipmentCondition(PurchaseLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; var Condition: Boolean) begin end; + /// + /// Event raised by OnBeforePostResourceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostResourceLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SrcCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; JobPurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLine(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; CommitIsSuppressed: Boolean; PurchSetup: Record "Purchases & Payables Setup") begin end; + /// + /// Event raised by OnBeforePostUpdateOrderLineModifyTempLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSuppressed: Boolean; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeRevertWarehouseEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRevertWarehouseEntry(var WarehouseJournalLine: Record "Warehouse Journal Line"; JobNo: Code[20]; PostJobConsumption: Boolean; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSendICDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSendICDocument(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLines2. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeSumPurchLines2(QtyType: Option; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; InsertPurchLine: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeSumPurchLinesTemp. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeSumPurchLinesTemp(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeTempDropShptPostBufferInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempDropShptPostBufferInsert(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchaseLine: Record "Purchase Line"; var ItemLedgShptEntryNo: Integer) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineInsert(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTempPrepmtPurchLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTempPrepmtPurchLineModify(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnBeforeTransferReservToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTransferReservToItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemJnlLine: Record "Item Journal Line"; PurchLine: Record "Purchase Line"; QtyToBeShippedBase: Decimal; var ApplySpecificItemTracking: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateAssocOrder. + /// + /// [IntegrationEvent(true, false)] local procedure OnBeforeUpdateAssocOrder(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var IsHandled: Boolean; SuppressCommit: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateBlanketOrderLine(PurchLine: Record "Purchase Line"; Receive: Boolean; Ship: Boolean; Invoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePostingNos(var PurchHeader: Record "Purchase Header"; var ModifyHeader: Boolean; SuppressCommit: Boolean; var IsHandled: Boolean; var DateOrderSeriesUsed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchaseHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchaseHeader(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; GenJnlLineDocType: Option; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineBeforePost(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; WhseShip: Boolean; WhseReceive: Boolean; RoundingLineInserted: Boolean; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; CommitIsSupressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdatePrepmtPurchLineWithRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePrepmtPurchLineWithRounding(var PrepmtPurchLine: Record "Purchase Line"; TotalRoundingAmount: array[2] of Decimal; TotalPrepmtAmount: array[2] of Decimal; FinalInvoice: Boolean; PricesInclVATRoundingAmount: array[2] of Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToInvoiceForReturnOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToInvoiceForReturnOrder(var PurchHeader: Record "Purchase Header"; TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReceipt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReceipt(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateQtyToBeInvoicedForReturnShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateQtyToBeInvoicedForReturnShipment(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; TrackingSpecificationExists: Boolean; PurchLine: Record "Purchase Line"; ReturnShipmentLine: Record "Return Shipment Line"; InvoicingTrackingSpecification: Record "Tracking Specification"; RemQtyToBeInvoiced: Decimal; RemQtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateJobConsumptionReservationApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateJobConsumptionReservationApplToItemEntry(var TempReservEntryJobCons: Record "Reservation Entry" temporary; var ItemJournalLine: Record "Item Journal Line"; IsNonInventoriableItem: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLine(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineFixedAsset. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineFixedAsset(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineItemCharge(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineJob. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineJob(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestPurchLineOthers. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestPurchLineOthers(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeTestStatusRelease. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeTestStatusRelease(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdateHandledICInboxTransaction. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateHandledICInboxTransaction(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidatePostingAndDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidatePostingAndDocumentDate(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnSetPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnSetPostingDateExists(var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeWhseHandlingRequired. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeWhseHandlingRequired(PurchaseLine: Record "Purchase Line"; var Required: Boolean; var IsHandled: Boolean) begin @@ -10041,62 +10865,110 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnBeforeGetCountryCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeGetCountryCode(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var CountryRegionCode: Code[10]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeShouldPostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeShouldPostWhseJnlLine(PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnCalcInvDiscountSetFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountSetFilter(var PurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterClearPostingFromWhseRef. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterClearPostingFromWhseRef(var PurchHeader: Record "Purchase Header"; var InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary); begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeSetPostingFlags. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeSetPostingFlags(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterSetSourceCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterSetSourceCode(var PurchHeader: Record "Purchase Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; Currency: Record "Currency"; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeCalcInvDiscount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeCalcInvDiscount(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseReceive: Boolean; WhseShip: Boolean; var RefreshNeeded: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateAssocOrderPostingDateOnBeforeValidateDocumentDate(var SalesHeader: Record "Sales Header"; var OriginalDocumentDate: Date) begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCheckAssociatedOrderLinesOnAfterCheckDimensions. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssociatedOrderLinesOnAfterCheckDimensions(PurchaseHeader: Record "Purchase Header"; SalesHeader: Record "Sales Header"; var PurchaseLine: Record "Purchase Line"; TempSalesLine: Record "Sales Line" temporary) begin @@ -10104,72 +10976,128 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnCheckAssocOrderLinesOnBeforeCheckOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAssocOrderLinesOnBeforeCheckOrderLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; SalesOrderLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary) begin end; #endif + /// + /// Event raised by OnCheckExternalDocumentNumberOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckExternalDocumentNumberOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForShipOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingAndWarehouseForReceiveOnAfterTempPurchLineSetFilters(PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCheckWarehouseOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckWarehouseOnAfterSetFilters(var TempItemPurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeLoop(var TempPurchLine: Record "Purchase Line" temporary; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyAndCheckItemChargeOnBeforeCheckIfEmpty(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCopyToTempLinesOnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterInitTempPrepmtPurchLineFromPurchHeader(var TempPrepmtPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterTempPrepmtPurchLineSetFilters(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnDivideAmountOnAfterClearAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterClearAmounts(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var PurchLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcLineAmountAndLineDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineQty: Decimal) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineRemainderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineRemainderModify(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency) begin @@ -10180,227 +11108,407 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnGetItemChargeLineOnAfterGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetItemChargeLineOnAfterGet(var ItemChargePurchLine: Record "Purchase Line"; PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnGetPurchLinesOnAfterFillTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnGetPurchLinesOnAfterFillTempLines(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnAfterCopyDocumentFields(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var TempICGenJournalLine: Record "Gen. Journal Line") begin end; + /// + /// Event raised by OnInsertAssocOrderChargeOnBeforeInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertAssocOrderChargeOnBeforeInsert(TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var NewItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertICGenJnlLineOnBeforeICGenJnlLineInsert(var TempICGenJournalLine: Record "Gen. Journal Line" temporary; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterGetWhseRcptLine(var WhseRcptLine: Record "Warehouse Receipt Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterInitPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterInitPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; xPurchLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var CostBaseAmount: Decimal; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; var WhseRcptLine: Record "Warehouse Receipt Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseRcptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseRcptHeader: Record "Posted Whse. Receipt Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseRcptLine: Boolean; xPurchLine: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnAfterCalcShouldGetWhseShptLine(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchLine: Record "Purchase Line"; PostedWhseShptHeader: Record "Posted Whse. Shipment Header"; WhseShptHeader: Record "Warehouse Shipment Header"; CostBaseAmount: Decimal; WhseReceive: Boolean; WhseShip: Boolean; var ShouldGetWhseShptLine: Boolean) begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterGetWhseShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterGetWhseShptLine(var WhseShptLine: Record "Warehouse Shipment Line"; ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnInsertReturnShipmentLineOnAfterReturnShptLineInit. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReturnShipmentLineOnAfterReturnShptLineInit(var ReturnShptHeader: Record "Return Shipment Header"; var ReturnShptLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line"; var xPurchLine: Record "Purchase Line"; var CostBaseAmount: Decimal; WhseShip: Boolean; WhseReceive: Boolean); begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforePost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforePost(var ItemJournalLine: Record "Item Journal Line"; SalesOrderLine: Record "Sales Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer"; var SalesOrderLine: Record "Sales Line"; var SalesOrderHeader: record "Sales Header"; var SalesShptLine: record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SrcCode: Code[10]; Currency: Record Currency) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeUpdateBlanketOrderLine(var SalesOrderLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterProcessDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchRcptHeader: Record "Purch. Rcpt. Header"; SalesShptLine: Record "Sales Shipment Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary); begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterCalcAmountToAssign. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterCalcAmountToAssign(var PurchaseLine: Record "Purchase Line"; TempItemLedgerEntry: Record "Item Ledger Entry"; QtyToAssign: Decimal; AmountToAssign: Decimal; Sign: Decimal; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterPostItemJnlLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeOnAfterPostItemJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargeLineOnAfterPostItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemChargeLineOnAfterPostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchaseLineBackup: Record "Purchase Line"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargeLineOnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeLineOnBeforePostItemCharge(var TempItemChargeAssgntPurch: record "Item Charge Assignment (Purch)" temporary; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnPostItemChargeOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnBeforePostItemJnlLine(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; QtyToAssign: Decimal; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnPostItemChargePerOrderOnAfterCopyToItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerOrderOnAfterCopyToItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; GeneralLedgerSetup: Record "General Ledger Setup"; QtyToInvoice: Decimal; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnRcptLine: Record "Return Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesRetRcptOnBeforeTestJobNo(ReturnReceiptLine: Record "Return Receipt Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var SalesShptLine: Record "Sales Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerSalesShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ReturnShptLine: Record "Return Shipment Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRetShptOnBeforeTestJobNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRetShptOnBeforeTestJobNo(ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterCalcDistributeCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterCalcDistributeCharge(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PurchRcptLine: record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var DistributeCharge: Boolean) begin end; + /// + /// Event raised by OnPostItemChargePerRcptOnAfterPurchRcptLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerRcptOnAfterPurchRcptLineGet(PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnAfterInitPurchLine2. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnAfterInitPurchLine2(TransferReceiptLine: Record "Transfer Receipt Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforePostItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemApplnEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerITTransferOnAfterCollectItemEntryRelation(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforeTempWhseJnlLine2Find(var TempWarehouseJournalLine2: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; GenJnlLineExtDocNo: Code[35]; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostItemJnlLineCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPostItemJnlLineJobConsumption(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; OriginalItemJnlLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var TrackingSpecification: Record "Tracking Specification" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var PostJobConsumptionBeforePurch: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterCopyItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineOnAfterCopyItemCharge(var ItemJournalLine: Record "Item Journal Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeCopyDocumentFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeCopyDocumentFields(var ItemJournalLine: Record "Item Journal Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; WhseReceive: Boolean; WhseShip: Boolean; InvtPickPutaway: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforePostWhseJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforePostWhseJnlLine(TempHandlingSpecification: Record "Tracking Specification"; var TempWhseJnlLine: Record "Warehouse Journal Line"; ItemJnlLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"; var TempReservationEntry: Record "Reservation Entry" temporary; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumption. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumption(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; ItemJournalLine: Record "Item Journal Line"; var TempPurchReservEntry: Record "Reservation Entry" temporary; QtyToBeInvoiced: Decimal; QtyToBeReceived: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary; PurchItemLedgEntryNo: Integer; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetFactor(var PurchaseLine: Record "Purchase Line"; var Factor: Decimal; var GenJnlLineExtDocNo: Code[35]; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterPrepareItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var GenJnlLineDocNo: code[20]; TrackingSpecification: Record "Tracking Specification"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnCopyProdOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnCopyProdOrder(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; QtyToBeReceived: Decimal; QtyToBeInvoiced: Decimal; SuppressCommit: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnBeforeJobPost. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnBeforeJobPost( var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; @@ -10409,191 +11517,343 @@ codeunit 90 "Purch.-Post" begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnAfterPostRevert. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnAfterPostRevert(var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineWhseLineOnBeforePostSingleLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineWhseLineOnBeforePostSingleLine(WhseShip: Boolean; WhseReceive: Boolean; InvtPickPutaway: Boolean; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary) begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; QtyToBeReceived: Decimal; WhseReceive: Boolean; var TempWhseRcptHeader: Record "Warehouse Receipt Header" temporary; QtyToBeReceivedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck(var ItemJnlLine: Record "Item Journal Line"; var PurchaseLine: Record "Purchase Line"; DropShipOrder: Boolean; PurchaseHeader: Record "Purchase Header"; WhseReceive: Boolean; QtyToBeReceived: Decimal; QtyToBeReceivedBase: Decimal; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineOnBeforeInitAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnBeforeInitAmount(var ItemJnlLine: Record "Item Journal Line"; PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineItemChargesOnAfterGetItemChargeLine(var ItemChargePurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemLineOnBeforePostShipReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemLineOnBeforePostShipReceive(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var RemQtyToBeInvoiced: Decimal; var RemQtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforeReceiptInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnBeforePostItemTrackingForReceiptCondition(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineTestFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForReceiptOnAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeReturnShipmentInvoiceErr(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterSetEverythingInvoiced. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterSetEverythingInvoiced(var PurchaseLine: Record "Purchase Line"; var EverythingInvoiced: Boolean; PurchaseHeader: Record "Purchase Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var AmountsOnly: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnAfterPostByType. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterPostByType(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnAfterCollectPurchaseLineReservEntries. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCollectPurchaseLineReservEntries(var JobReservationEntry: Record "Reservation Entry"; ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnAfterGetPurchOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetPurchOrderLine(var PurchaseLineOrder: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnPostPurchLineOnBeforePostByType. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforePostByType(PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; PurchLineACY: Record "Purchase Line"; Sourcecode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertCrMemoLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertCrMemoLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; xPurchaseLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertInvoiceLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var PurchInvLine: Record "Purch. Inv. Line"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReceiptLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostPurchLineOnBeforeInsertReceiptLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; RoundingLineInserted: Boolean; CostBaseAmount: Decimal; xPurchaseLine: Record "Purchase Line"; var ReturnShipmentHeader: Record "Return Shipment Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var ItemLedgShptEntryNo: Integer; SrcCode: Code[10]; PreviewMode: Boolean; var WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WhseShip: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; GenJnlLineDocNo: Code[20]); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; ReturnShptHeader: Record "Return Shipment Header"; TempPurchLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"); begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeRoundAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeRoundAmount(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SrcCode: Code[10]) begin end; + /// + /// Event raised by OnPostPurchLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnTypeCaseElse(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; SourceCode: Code[10]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary); begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDoc(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterCreatePostedDeferralScheduleFromPurchDocCrMemo(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var ReturnShptLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnAfterResetTempLines(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineGet(var TempPurchLine: Record "Purchase Line" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnAfterPurchOrderLineModify(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeInitQtyToInvoice(var PurchaseLine: Record "Purchase Line"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterInitQtyToReceiveOrShip(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitOutstanding(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeInitQtyToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeInitQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; WhseShip: Boolean; WhseReceive: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeLoop(PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnPurchHeaderReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnPurchHeaderReceive(var TempPurchLine: Record "Purchase Line"; PurchRcptHeader: Record "Purch. Rcpt. Header") begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnSetDefaultQtyBlank. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostUpdateOrderLineOnSetDefaultQtyBlank(var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchPost: Record "Purchases & Payables Setup"; var SetDefaultQtyBlank: Boolean) begin @@ -10601,162 +11861,290 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnProcessAssocItemJnlLineOnAfterInitTempDropShptPostBuffer(var PurchLine: Record "Purchase Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeSetStatus. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeSetStatus(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRoundAmountOnBeforeCalculateLCYAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeCalculateLCYAmounts(var xPurchLine: Record "Purchase Line"; var PurchLineACY: Record "Purchase Line"; PurchHeader: Record "Purchase Header"; var IsHandled: Boolean; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRoundAmountOnBeforeIncrAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnRoundAmountOnBeforeIncrAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchLineQty: Decimal; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var xPurchaseLine: Record "Purchase Line"; var CurrExchRate: Record "Currency Exchange Rate"; var NoVAT: Boolean; var IsHandled: Boolean; var NonDeductibleVAT: Codeunit "Non-Deductible VAT") begin end; + /// + /// Event raised by OnRunOnBeforeFinalizePosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFinalizePosting(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var ReturnShipmentHeader: Record "Return Shipment Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; CommitIsSuppressed: Boolean) begin end; + /// + /// Event raised by OnRunOnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforeMakeInventoryAdjustment(var PurchaseHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; PreviewMode: Boolean; PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping; PurchLineQty: Decimal; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnSumPurchLines2OnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnBeforeDivideAmount(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyType: Option General,Invoicing,Shipping) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderHeaderModify(var SalesOrderHeader: Record "Sales Header"; var SalesSetup: Record "Sales & Receivables Setup") begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderOnBeforeClearTempDropShptPostBuffer(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header") begin end; + /// + /// Event raised by OnUpdateAssocOrderOnAfterOrderNoClearFilter. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnAfterOrderNoClearFilter(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary) begin end; + /// + /// Event raised by OnUpdateAssocOrderOnBeforeSalesOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssocOrderOnBeforeSalesOrderLineModify(var SalesOrderLine: Record "Sales Line"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheck. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheck(var BlanketOrderPurchLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; Ship: Boolean; Receive: Boolean; Invoice: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnAfterCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePurchLineBeforePostOnAfterCalcInitQtyToInvoiceNeeded(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var InitQtyToInvoiceNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseRcpt(var WarehouseReceiptHeader: Record "Warehouse Receipt Header") begin end; + /// + /// Event raised by OnUpdateWhseDocumentsOnAfterUpdateWhseShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateWhseDocumentsOnAfterUpdateWhseShpt(var WarehouseShipmentHeader: Record "Warehouse Shipment Header") begin end; + /// + /// Event raised by OnBeforeRunItemJnlPostLineWithReservation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeRunItemJnlPostLineWithReservation(var ItemJournalLine: Record "Item Journal Line"); begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCopyAndCheckItemCharge. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCopyAndCheckItemCharge(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded. + /// + /// [IntegrationEvent(true, false)] local procedure OnCheckAndUpdateOnAfterCalcCopyAndCheckItemChargeNeeded(var PurchHeader: Record "Purchase Header"; var CopyAndCheckItemChargeNeeded: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnBeforeUpdatePostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnBeforeUpdatePostingNo(PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterCalcShouldUpdateReceivingNo(PurchaseHeader: Record "Purchase Header"; PreviewMode: Boolean; var ModifyHeader: Boolean; var ShouldUpdateReceivingNo: Boolean) begin end; + /// + /// Event raised by OnCreatePositiveOnBeforeWhseJnlPostLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePositiveOnBeforeWhseJnlPostLine(var WhseJnlLine: Record "Warehouse Journal Line") begin end; + /// + /// Event raised by OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedWhseShptLineOnBeforeCreatePostedShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePostedRcptLineOnBeforeCreatePostedRcptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnAfterUpdateTempTrackingSpecification(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeTempTrackingSpecificationModify(var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification. + /// + /// [IntegrationEvent(false, false)] local procedure OnSaveInvoiceSpecificationOnBeforeAssignTempInvoicingSpecification(var TempInvoicingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnBeforePostUpdateInvoiceLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostUpdateInvoiceLine(var TempPurchLine: Record "Purchase Line" temporary; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") begin @@ -10764,102 +12152,182 @@ codeunit 90 "Purch.-Post" #if not CLEAN28 [Obsolete('This event is no longer used.', '28.0')] + /// + /// Event raised by OnBeforeCheckAssociatedSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedSalesOrderLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; #endif + /// + /// Event raised by OnBeforeCheckAssociatedOrderLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAssociatedOrderLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforeCheckReceiveInvoiceShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckReceiveInvoiceShip(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterCalcFactor(var NonDistrItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var TempTrackingSpecificationChargeAssmt: Record "Tracking Specification"; SignFactor: Integer; Factor: Decimal) begin end; + /// + /// Event raised by OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingItemChargePerOrderOnAfterUpdateItemJnlLine2LocationCode(var ItemJnlLine2: Record "Item Journal Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnAfterReturnShptLineReset. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnAfterReturnShptLineReset(var ReturnShptLine: Record "Return Shipment Line"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeSetItemEntryRelationForShipment(var ItemEntryRelation: Record "Item Entry Relation"; var ReturnShptLine: Record "Return Shipment Line"; var InvoicingTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingForShipmentOnBeforeAdjustQuantityRounding(ReturnShptLine: Record "Return Shipment Line"; RemQtyToInvoiceCurrLine: Decimal; var QtyToBeInvoiced: Decimal; RemQtyToInvoiceCurrLineBase: Decimal; QtyToBeInvoicedBase: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterFillTempLines(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnRunOnAfterInvoiceRounding. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterInvoiceRounding(var PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnRunOnBeforeFillTempLines. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnBeforeFillTempLines(PreviewMode: Boolean; var GenJnlLineDocNo: Code[20]) begin end; + /// + /// Event raised by OnRunOnAfterPostPurchLine. + /// + /// [IntegrationEvent(true, false)] local procedure OnRunOnAfterPostPurchLine(var TempPurchLineGlobal: Record "Purchase Line" temporary; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header") begin end; + /// + /// Event raised by OnAfterCalcInvDiscount. + /// + /// [IntegrationEvent(true, false)] local procedure OnAfterCalcInvDiscount(PurchHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCheckAndInsertICGenJnlLine(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; ICGenJnlLineNo: Integer) begin end; + /// + /// Event raised by OnPostGLAccICLineOnAfterCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnAfterCreateJobPurchLine(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind. + /// + /// [IntegrationEvent(true, false)] local procedure OnPostItemJnlLineTrackingOnBeforeTempHandlingSpecificationFind(PurchLine: Record "Purchase Line"; var TempHandlingSpecification: Record "Tracking Specification" temporary) begin end; + /// + /// Event raised by OnFinalizePostingOnAfterUpdateItemChargeAssgnt. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnAfterUpdateItemChargeAssgnt(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line" temporary; var TempPurchLineGlobal: Record "Purchase Line" temporary; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertValueEntryRelation. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertValueEntryRelation(var PurchHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeInsertTrackingSpecification. + /// + /// [IntegrationEvent(true, false)] local procedure OnFinalizePostingOnBeforeInsertTrackingSpecification(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; PurchHeader: Record "Purchase Header"; var TempTrackingSpecification: Record "Tracking Specification" temporary; EverythingInvoiced: Boolean; var TempPurchLine: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line") begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateWhseDocuments. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateWhseDocuments(var PurchaseHeader: Record "Purchase Header"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; TempWarehouseReceiptHeader: Record "Warehouse Receipt Header" temporary; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; TempWarehouseShipmentHeader: Record "Warehouse Shipment Header" temporary; WarehouseReceive: Boolean; WarehouseShip: Boolean; var IsHandled: Boolean) @@ -10869,663 +12337,1187 @@ codeunit 90 "Purch.-Post" + /// + /// Event raised by OnFinalizePostingOnBeforeCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeCommit(PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseReceiptLine: Record "Warehouse Receipt Line"; PostedWhseReceiptHeader: Record "Posted Whse. Receipt Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeCreatePostedShptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeCreatePostedShptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PostedWhseShipmentHeader: Record "Posted Whse. Shipment Header") begin end; + /// + /// Event raised by OnInsertReceiptLineOnBeforeProcessWhseShptRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertReceiptLineOnBeforeProcessWhseShptRcpt(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean; var CostBaseAmount: Decimal; PurchRcptLine: Record "Purch. Rcpt. Line") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeArchiveUnpostedOrder. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeArchiveUnpostedOrder(var PurchHeader: Record "Purchase Header"; PreviewMode: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnAfterInsertPostedHeaders. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnAfterInsertPostedHeaders(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnAfterReleaseSalesHeader(var PurchHeader: Record "Purchase Header"; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnAfterSetReturnShipmentNoFromNos(var PurchHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdatePostingNosOnInvoiceOnBeforeSetPostingNo(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnAfterCalcPostingDateExists(var PurchHeader: Record "Purchase Header"; var PostingDateExists: Boolean; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var VATDateExists: Boolean; var ReplaceVATDate: Boolean; var VATDate: Date) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchaseLine(PurchaseLine: Record "Purchase Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnNeedUpdateGenProdPostingGroupOnItemChargeOnReturnShipmentLine(ReturnShipmentLine: Record "Return Shipment Line"; var NeedUpdate: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnShipmentHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnShipmentHeader(var PurchHeader: Record "Purchase Header"; var ReturnShptHeader: Record "Return Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertInvoiceHeader(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean; var Window: Dialog; var HideProgressWindow: Boolean; var SrcCode: Code[10]; var PurchCommentLine: Record "Purch. Comment Line"; var RecordLinkManagement: Codeunit "Record Link Management") begin end; + /// + /// Event raised by OnBeforeInserCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInserCrMemoHeader(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var HideProgressWindow: Boolean; var Window: Dialog; var IsHandled: Boolean; SrcCode: Code[10]; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PurchCommentLine: Record "Purch. Comment Line") begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeCopyComments. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeCopyComments(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesShptHeader: Record "Sales Shipment Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnBeforePostBalancingEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnBeforePostBalancingEntry(var PurchHeader: Record "Purchase Header"; var LineCount: Integer) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnAfterReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnAfterReceive(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforeUpdateAssosOrderPostingNos. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean; PreviewMode: Boolean) begin end; + /// + /// Event raised by OnFinalizePostingOnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnFinalizePostingOnBeforeUpdateAfterPosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var EverythingInvoiced: Boolean; var IsHandled: Boolean; var TempPurchLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforePurchOrderLineModify(var PurchOrderLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostPurchLine(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateOrderLineOnBeforeFindTempPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateOrderLineOnBeforeFindTempPurchLine(var TempPurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"); begin end; + /// + /// Event raised by OnCalcInvoiceOnAfterResetTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvoiceOnAfterResetTempLines(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterPostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterPostInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var ReturnShipmentHeader: Record "Return Shipment Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PreviewMode: Boolean; var Window: Dialog; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") begin end; + /// + /// Event raised by OnCopyToTempLinesLoop. + /// + /// [IntegrationEvent(false, false)] local procedure OnCopyToTempLinesLoop(var PurchLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnRunOnBeforePostPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostPurchLine(var PurchLine: Record "Purchase Line"; var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeValidateICPartnerBusPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeValidateICPartnerBusPostingGroups(var TempICGenJnlLine: Record "Gen. Journal Line" temporary; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetCurrency. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetCurrency(CurrencyCode: Code[10]; var Currency: Record Currency) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeInsertedPrepmtVATBaseToDeduct(var TempPrepmtPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header"; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnAfterGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeGetPurchPrepmtAccount(var GLAcc: Record "G/L Account"; var TempPurchaseLine: Record "Purchase Line" temporary; PurchaseHeader: Record "Purchase Header"; var GenPostingSetup: Record "General Posting Setup"; CompleteFunctionality: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeInsertReturnEntryRelation. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeInsertReturnEntryRelation(var ReturnShptLine: Record "Return Shipment Line"; var Result: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldQtyToReceive. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldQtyToReceive(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnTestPurchLineOnBeforeTestFieldReturnQtyToShip. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnBeforeTestFieldReturnQtyToShip(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnRunOnAfterCalcVATAmountLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnAfterCalcVATAmountLines(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var TempVATAmountLine: Record "VAT Amount Line" temporary) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeInitAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckTrackingSpecificationOnBeforeGetItemTrackingSetup(var PurchaseLine: Record "Purchase Line"; var ItemTrackingSetup: Record "Item Tracking Setup"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeReceivedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeReceivedAmounts(var ItemJnlLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeReceived: Decimal; var RemAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostAssocItemJnlLineOnBeforeExit. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostAssocItemJnlLineOnBeforeExit(SalesOrderHeader: Record "Sales Header"; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostUpdateInvoiceLineOnBeforeCalcQty. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateInvoiceLineOnBeforeCalcQty(var TempPurchLine: Record "Purchase Line" temporary; var PurchOrderLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnBeforeInsertSalesShptHeader(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnCreatePrepmtLinesOnAfterShouldCalcAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepmtLinesOnAfterShouldCalcAmounts(PurchHeader: Record "Purchase Header"; var ShouldCalcAmounts: Boolean; var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeDivideAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeDivideAmount(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostCombineSalesOrderShipmentOnAfterUpdateSalesOrderLine(SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var SalesOrderLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line") begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckPosted(PurchHeader: Record "Purchase Header"; var ShouldCheckPosted: Boolean) begin end; + /// + /// Event raised by OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckICDocumentDuplicatePostingOnAfterCalcShouldCheckUnposted(PurchHeader: Record "Purchase Header"; var ShouldCheckUnposted: Boolean) begin end; + /// + /// Event raised by OnAfterCopyToTempLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCopyToTempLines(var TempPurchLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostUpdateCreditMemoLineOnBeforeTempPurchLineSetFilters(var TempPurchaseLine: Record "Purchase Line" temporary) begin end; + /// + /// Event raised by OnBeforePostItemTrackingForShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemTrackingForShipment(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostGLAccICLineOnBeforeCreateJobPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostGLAccICLineOnBeforeCreateJobPurchLine(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeIsItemChargeLineWithQuantityToInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeIsItemChargeLineWithQuantityToInvoice(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var Result: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterGetAppliedOutboundItemLedgEntryNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetAppliedOutboundItemLedgEntryNo(var ItemJnlLine: Record "Item Journal Line"; var ItemApplicationEntry: Record "Item Application Entry") begin end; + /// + /// Event raised by OnAfterGetGeneralPostingSetup. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterGetGeneralPostingSetup(var GeneralPostingSetup: Record "General Posting Setup"; PurchLine: Record "Purchase Line"); begin end; + /// + /// Event raised by OnBeforeConfirmJobLineType. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobLineType(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeConfirmJobPlanningLineNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeConfirmJobPlanningLineNo(PurchLine: Record "Purchase Line"; var HideDialog: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemTrackingOnAfterCalcShouldProcessShipment. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemTrackingOnAfterCalcShouldProcessShipment(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var ShouldProcessShipment: Boolean) begin end; + /// + /// Event raised by OnCheckItemReservDisruptionOnAfterInsertTempSKU. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckItemReservDisruptionOnAfterInsertTempSKU(var Item: Record Item; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetRcpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerTransfer(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerRetShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterPostItemChargePerSalesShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemChargePerSalesShpt(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnInsertInvoiceHeaderOnBeforeCopyLinks. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertInvoiceHeaderOnBeforeCopyLinks(var PurchHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeUpdateIncomingDocument. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeUpdateIncomingDocument(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineJobConsumptionOnAfterItemLedgEntrySetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; var PurchLine: Record "Purchase Line"; var ItemJournalLine: Record "Item Journal Line") begin end; + /// + /// Event raised by OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnTestPurchLineOnTypeCaseOnDocumentTypeCaseElse(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnAfterDecrementPrepmtAmtInvLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDecrementPrepmtAmtInvLCY(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepmtAmountInvLCY: Decimal; var PrepmtVATAmountInvLCY: Decimal) begin end; #if not CLEAN27 + /// + /// Event raised by OnSetPostingPreviewDocumentNo. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnSetPostingPreviewDocumentNo(var PreviewDocumentNo: Code[20]) begin end; + /// + /// Event raised by OnGetPostingPreviewDocumentNos. + /// + /// [IntegrationEvent(false, false)] [Obsolete('This event is no longer used.', '27.0')] local procedure OnGetPostingPreviewDocumentNos(var PreviewDocumentNos: List of [Code[20]]) begin end; #endif + /// + /// Event raised by OnInsertPostedHeadersOnAfterInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertPostedHeadersOnAfterInvoice(var PurchaseHeader: Record "Purchase Header"; var GenJournalLine: Record "Gen. Journal Line"; var GenJnlLineDocType: Enum "Gen. Journal Document Type"; var GenJnlLineDocNo: Code[20]; var GenJnlLineExtDocNo: Code[35]; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterSumPurchLines2. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterSumPurchLines2(var PurchaseHeader: Record "Purchase Header"; var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnTypeCaseElse. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnTypeCaseElse(var PurchaseLine: Record "Purchase Line"; var Sign: Decimal) begin end; + /// + /// Event raised by OnSumPurchLines2OnAfterIsRoundingLineInserted. + /// + /// [IntegrationEvent(false, false)] local procedure OnSumPurchLines2OnAfterIsRoundingLineInserted(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var OldPurchaseLine: Record "Purchase Line"; RoundingLineInserted: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckICPartnerBlocked. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckICPartnerBlocked(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostInvoiceOnAfterPostLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostInvoiceOnAfterPostLines(var PurchaseHeader: Record "Purchase Header"; SrcCode: Code[10]; GenJnlLineDocType: Enum "Gen. Journal Document Type"; GenJnlLineDocNo: Code[20]; GenJnlLineExtDocNo: Code[35]; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempPurchLineGlobal: Record "Purchase Line" temporary; TotalAmount: Decimal) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforePurchaseHeaderModify(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdatePurchLineDimSetIDFromAppliedEntry(var PurchaseLineToPost: Record "Purchase Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterDeleteItemChargeAssgnt. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterDeleteItemChargeAssgnt(var PurchaseHeader: Record "Purchase Header") begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetRcpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetRcpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerITTransfer. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerITTransfer(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TransRcptLine: Record "Transfer Receipt Line"; var TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemChargePerRetShpt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemChargePerRetShpt(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TempItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct. + /// + /// [IntegrationEvent(false, false)] local procedure OnCreatePrepaymentLinesOnBeforeShouldTestGetReceiptPPmtAmtToDeduct(PurchaseHeader: Record "Purchase Header"; CompleteFunctionality: Boolean; var ShouldTestGetReceiptPPmtAmtToDeduct: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeAmountIncludingVATAmountRound. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeAmountIncludingVATAmountRound(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeCalcAmountsForFullVAT. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeCalcAmountsForFullVAT(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckMandatoryFields. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckMandatoryFields(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostingDate(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterInsertCrMemoHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertCrMemoHeader(var PurchaseHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") begin end; + /// + /// Event raised by OnAfterInsertInvoiceHeader. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterInsertInvoiceHeader(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") begin end; + /// + /// Event raised by OnCheckAndUpdateOnBeforeOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckAndUpdateOnBeforeOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnReleasePurchDocumentOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnReleasePurchDocumentOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssociatedSalesOrderBeforeInitOutstanding. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssociatedSalesOrderBeforeInitOutstanding(var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; var SalesOrderLine: Record "Sales Line"; SalesOrderHeader: Record "Sales Header") begin end; + /// + /// Event raised by OnRunOnBeforePostInvoice. + /// + /// [IntegrationEvent(false, false)] local procedure OnRunOnBeforePostInvoice(PurchaseHeader: Record "Purchase Header"; var EverythingInvoiced: Boolean) begin end; + /// + /// Event raised by OnCheckPurchDocumentOnBeforeCheckPurchDim. + /// + /// [IntegrationEvent(false, false)] local procedure OnCheckPurchDocumentOnBeforeCheckPurchDim(var PurchaseHeader: Record "Purchase Header"; var TempPurchLineGlobal: Record "Purchase Line" temporary; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnCalcInvDiscountOnBeforeDoCommit. + /// + /// [IntegrationEvent(false, false)] local procedure OnCalcInvDiscountOnBeforeDoCommit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeSetReplaceDocumentDate(var PurchaseHeader: Record "Purchase Header"; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var ModifyHeader: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnBeforeTempVATAmountLineGet. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnBeforeTempVATAmountLineGet(PurchaseLine: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckFAPostingPossibility. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckFAPostingPossibility(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckPostRestrictions. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckPostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostPurchLineOnBeforeTestGeneralPostingGroups. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnBeforeTestGeneralPostingGroups(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateAssosOrderPostingNosOnBeforeTestFieldBilltoCustomerNo(var SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnDivideAmountOnAfterCalcVATBaseAmount. + /// + /// [IntegrationEvent(false, false)] local procedure OnDivideAmountOnAfterCalcVATBaseAmount(var PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnBeforeUpdateAfterPosting. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateAfterPosting(var PurchaseHeader: Record "Purchase Header"; SuppressCommit: Boolean; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckAndUpdate. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckAndUpdate(var PurchaseHeader: Record "Purchase Header"; var ModifyHeader: Boolean) begin end; + /// + /// Event raised by OnPostItemChargeOnAfterCalcTotalChargeAmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargeOnAfterCalcTotalChargeAmt(var PurchaseLineToPost: Record "Purchase Line"; QtyToAssign: Decimal; var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostPurchLineOnAfterInsertReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostPurchLineOnAfterInsertReturnShipmentLine(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ReturnShptHeader: Record "Return Shipment Header"; TempPurchaseLineGlobal: Record "Purchase Line"; RoundingLineInserted: Boolean; xPurchaseLine: Record "Purchase Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."); begin end; + /// + /// Event raised by OnBeforeMakeInventoryAdjustment. + /// + /// [IntegrationEvent(false, false)] procedure OnBeforeMakeInventoryAdjustment(var IsHandled: Boolean); begin end; + /// + /// Event raised by OnBeforeCheckItemReservDisruption. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemReservDisruption(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean); begin end; + /// + /// Event raised by OnPostItemJnlLineOnAfterSetCheckApplToItemEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemJnlLineOnAfterSetCheckApplToItemEntry(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateBlanketOrderLineOnBeforeCheckBlanketOrderPurchLine(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeModifyInvoicedQtyOnPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeModifyInvoicedQtyOnPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnValidatePostingAndDocumentDateOnBeforeTestPostingDate. + /// + /// [IntegrationEvent(false, false)] local procedure OnValidatePostingAndDocumentDateOnBeforeTestPostingDate(var PurchaseHeader: Record "Purchase Header"; ReplacePostingDate: Boolean; var SkipTestPostingDate: Boolean) begin end; + /// + /// Event raised by OnBeforeCheckItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCheckItemCharge(var ItemChargeAssignmentPurch: Record "Item Charge Assignment (Purch)"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeProcedurePostAssocItemJnlLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeProcedurePostAssocItemJnlLine(var SalesOrderLine: Record "Sales Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; var TempHandlingSpecification: Record "Tracking Specification" temporary; QtyToBeShipped: Decimal; QtyToBeShippedBase: Decimal; var ItemShptEntryNo: Integer; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnPostDistributeItemChargeOnAfterSetFactor. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostDistributeItemChargeOnAfterSetFactor(TempItemLedgerEntry: Record "Item Ledger Entry"; var Factor: Decimal) begin end; + /// + /// Event raised by OnBeforeCalcItemJnlLineToBeInvoicedAmounts. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeCalcItemJnlLineToBeInvoicedAmounts(var ItemJournalLine: Record "Item Journal Line"; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; QtyToBeInvoiced: Decimal; QtyToBeInvoicedBase: Decimal; var RemAmt: Decimal; var RemDiscAmt: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line"; PostBefore: Boolean) begin end; + /// + /// Event raised by OnAfterPostItemJnlLineWhseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterPostItemJnlLineWhseLine(var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var TempWhseTrackingSpecification: Record "Tracking Specification" temporary; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry. + /// + /// [IntegrationEvent(false, false)] local procedure OnPostItemChargePerTransferOnBeforeProcessItemApplicationEntry(PurchaseLine: Record "Purchase Line"; ItemApplicationEntry: Record "Item Application Entry"; TransferReceiptLine: Record "Transfer Receipt Line"; TotalAmountToPostFCY: Decimal; var AmountToPostFCY: Decimal; GeneralLedgerSetup: Record "General Ledger Setup"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforePostItemCharge. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforePostItemCharge(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; ItemEntryNo: Integer; QuantityBase: Decimal; AmountToAssign: Decimal; QtyToAssign: Decimal; IndirectCostPct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnInsertedPrepmtVATBaseToDeductOnAfterSetTempPrepmtDeductLCYPurchaseLine(var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var PrepmtVATBaseToDeduct: Decimal; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustPrepmtAmountLCY. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustPrepmtAmountLCY(PurchaseHeader: Record "Purchase Header"; var PrepmtPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnBeforeAdjustFinalInvWith100PctPrepmt. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeAdjustFinalInvWith100PctPrepmt(var CombinedPurchaseLine: Record "Purchase Line"; var TempPrepmtDeductLCYPurchaseLine: Record "Purchase Line" temporary; var IsHandled: Boolean) begin end; + /// + /// Event raised by OnAfterUpdateInvoicedQtyOnReturnShipmentLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterUpdateInvoicedQtyOnReturnShipmentLine(var ReturnShipmentLine: Record "Return Shipment Line") begin end; + /// + /// Event raised by OnAfterCheckPurchRcptLine. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterCheckPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLine: Record "Purchase Line") begin end; + /// + /// Event raised by OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify. + /// + /// [IntegrationEvent(false, false)] local procedure OnUpdateItemChargeAssgntOnBeforeItemChargeAssignmentPurchModify(var ItemChargeAssgntPurch: Record "Item Charge Assignment (Purch)") begin end; + /// + /// Event raised by OnBeforeUpdateReceiptInvoicingQuantities. + /// + /// [IntegrationEvent(false, false)] local procedure OnBeforeUpdateReceiptInvoicingQuantities(PurchLine: Record "Purchase Line"; var SkipQuantityUpdate: Boolean) begin end; + /// + /// Event raised by OnSetCommitBehavior. + /// + /// [IntegrationEvent(false, false)] local procedure OnSetCommitBehavior(var IgnoreCommit: Boolean) begin end; + /// + /// Event raised by OnAfterProcessPostingLines. + /// + /// [IntegrationEvent(false, false)] local procedure OnAfterProcessPostingLines(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var VendLedgEntry: Record "Vendor Ledger Entry"; InvoicePostingParameters: Record "Invoice Posting Parameters"; SuppressCommit: Boolean; EverythingInvoiced: Boolean; var Window: Dialog) begin From 225bfe9e5568177d78f646ea0fe4124aa0bd61e3 Mon Sep 17 00:00:00 2001 From: Alexander Yakunin Date: Wed, 1 Jul 2026 17:19:18 +0200 Subject: [PATCH 05/26] Move changes objects from NAV PR --- .../BankAccount/CRTBankAccount.Codeunit.al | 56 + .../BankAccount/CRTBankAccount.TableExt.al | 555 ++ .../BankAccount/CRTBankAccountCard.PageExt.al | 179 + .../BankAccount/CRTBankAccountList.PageExt.al | 142 + .../CRTBankAccountPostingGroup.TableExt.al | 44 + .../CRTBankAccountPostingGroups.PageExt.al | 40 + .../CRTBankAccountStatistics.PageExt.al | 778 +++ .../BankAccount/CRTPaymentMethod.TableExt.al | 56 + .../BankAccount/CRTPaymentMethods.PageExt.al | 40 + .../CRTBankAccountLedgerEntries.PageExt.al | 21 + .../CRTBankAccountLedgerEntry.TableExt.al | 17 + .../Cartera/Bank/Reports/BankRisk.Report.al | 279 + .../Local/Cartera/Bank/Reports/BankRisk.rdlc | 1791 ++++++ .../CRTExchRateAdjmtSubscribers.Codeunit.al | 194 + .../Journal/CRTCashReceiptJournal.PageExt.al | 29 + .../Journal/CRTGenJournalLine.Codeunit.al | 61 + .../Journal/CRTGenJournalLine.TableExt.al | 50 + .../Journal/CRTGeneralJournal.PageExt.al | 30 + .../Journal/CRTPaymentJournal.PageExt.al | 29 + .../CRTPostedGenJournalLine.TableExt.al | 22 + .../Journal/CRTPurchaseJournal.PageExt.al | 29 + .../Journal/CRTSalesJournal.PageExt.al | 29 + .../Ledger/CRTGLEntry.TableExt.al | 17 + .../Ledger/CRTGeneralLedgerEntries.PageExt.al | 21 + .../Ledger/CarteraGeneralLedger.Codeunit.al | 43 + .../BGPOCommentLine.Table.al | 114 + .../BGPOCommentList.Page.al | 45 + .../BGPOCommentSheet.Page.al | 60 + .../BGPOMaturityLines.Page.al | 176 + .../BGPOPostBuffer.Table.al | 75 + .../BGPOPostandPrint.Codeunit.al | 184 + .../CRTCVLedgerEntryBuffer.TableExt.al | 42 + .../CRTDetailedCVLedgEntryBuffer.TableExt.al | 35 + .../CarteraDealingType.Enum.al | 14 + .../ReceivablesPayables/CarteraDoc.Table.al | 449 ++ .../CarteraDocumentDocType.Enum.al | 15 + .../CarteraDocumentStatus.Enum.al | 15 + .../CarteraDocumentType.Enum.al | 14 + .../CarteraDocuments.Page.al | 442 ++ .../CarteraFactStatisticsFB.Page.al | 291 + .../CarteraJournal.Page.al | 625 ++ .../CarteraManagement.Codeunit.al | 1321 ++++ .../CarteraReportSelections.Table.al | 70 + .../ReceivablesPayables/CarteraSetup.Page.al | 89 + .../ReceivablesPayables/CarteraSetup.Table.al | 58 + .../CarteraSourceCdSetup.Page.al | 47 + .../CheckDiscountCreditLimit.Page.al | 270 + .../ClosedCarteraDoc.Table.al | 260 + .../ClosedCarteraDocuments.Page.al | 245 + .../ClosedDocsAnalysisLCYFB.Page.al | 151 + .../ClosedDocsAnalysisNonLCYFB.Page.al | 151 + .../ClosedDocumentsAnalysis.Page.al | 226 + .../CompanyInitializeCartera.Codeunit.al | 62 + .../DocPostBuffer.Table.al | 44 + .../DocumentEdit.Codeunit.al | 75 + .../DocumentMisc.Codeunit.al | 264 + .../DocumentMove.Codeunit.al | 128 + .../DocumentPost.Codeunit.al | 1297 ++++ .../DocumentsAnalysis.Page.al | 155 + .../DocumentsMaturity.Page.al | 190 + .../DocumentsMaturityLines.Page.al | 112 + .../DueDateAdjust.Codeunit.al | 201 + .../ReceivablesPayables/FeeRange.Table.al | 667 ++ .../ReceivablesPayables/FeeRanges.Page.al | 49 + .../ReceivablesPayables/GLRegDocs.Codeunit.al | 71 + .../ReceivablesPayables/Installment.Table.al | 78 + .../ReceivablesPayables/Installments.Page.al | 40 + .../InvoiceSplitPayment.Codeunit.al | 824 +++ .../NonPaymentPeriod.Table.al | 55 + .../NonPaymentPeriods.Page.al | 44 + .../ReceivablesPayables/OperationFee.Table.al | 78 + .../ReceivablesPayables/OperationFees.Page.al | 59 + .../ReceivablesPayables/PaymentDay.Table.al | 47 + .../ReceivablesPayables/PaymentDays.Page.al | 34 + .../ReceivablesPayables/PostedBills.Page.al | 610 ++ .../PostedCarteraDoc.Table.al | 301 + .../PostedCarteraDocEdit.Codeunit.al | 33 + .../PostedCarteraDocuments.Page.al | 138 + .../RecDocsAnalysisFactBox.Page.al | 109 + .../ReceivablesPayables/RejectDocs.Report.al | 729 +++ .../ReportSelectionCartera.Page.al | 116 + .../ReportSelectionUsageCartera.Enum.al | 21 + .../CRTAccPayablesActivities.PageExt.al | 61 + .../CRTAccReceivableActivities.PageExt.al | 61 + .../CRTAccReceivablesAdmRC.PageExt.al | 142 + .../CRTAccountMgrActivities.PageExt.al | 54 + .../CRTAccountingMgrRoleCtr.PageExt.al | 24 + .../CRTBookkeeperActivities.PageExt.al | 105 + .../CRTBookkeeperRoleCenter.PageExt.al | 218 + .../RoleCenters/CRTFinanceCue.TableExt.al | 40 + .../CRTFinanceManagerRC.PageExt.al | 257 + .../RoleCenters/CRTSBOwnerCue.TableExt.al | 42 + .../CRTSmallBusinessOwnerAct.PageExt.al | 105 + .../CRTSmallBusinessOwnerRC.PageExt.al | 244 + .../CRTBankAccountsView.PermissionSetExt.al | 24 + .../CRTGLJournalsEdit.PermissionSetExt.al | 24 + .../CRTGlobalDimMgt.PermissionSetExt.al | 14 + .../Permissions/CRTLOCAL.PermissionSetExt.al | 36 + .../CRTLOCALREAD.PermissionSetExt.al | 36 + .../Document/CRTPurchaseCreditMemo.PageExt.al | 31 + .../Document/CRTPurchaseInvoice.PageExt.al | 23 + .../Document/CRTPurchaseOrder.PageExt.al | 23 + .../Document/CRTPurchaseQuote.PageExt.al | 23 + .../CRTPurchaseReturnOrder.PageExt.al | 23 + .../History/CRTPurchCrMemoHdr.Codeunit.al | 19 + .../History/CRTPurchCrMemoHdr.TableExt.al | 18 + .../History/CRTPurchInvHeader.Codeunit.al | 18 + .../History/CRTPurchInvHeader.TableExt.al | 18 + .../History/CRTPurchRcptHeader.Codeunit.al | 19 + .../History/CRTPurchRcptHeader.TableExt.al | 18 + .../History/PostPOAnalysisLCYFactBox.Page.al | 174 + .../History/PostPOAnalysisNonLCYFB.Page.al | 174 + .../History/PostPaymentOrdersAnalysis.Page.al | 241 + .../History/PostPmtOrdMaturityLin.Page.al | 139 + .../History/PostedPaymentOrder.Table.al | 244 + .../PostedPaymentOrderListing.Report.al | 414 ++ .../History/PostedPaymentOrderListing.rdlc | 2595 ++++++++ .../History/PostedPaymentOrders.Page.al | 252 + .../History/PostedPaymentOrdersList.Page.al | 185 + .../PostedPaymentOrdersMaturity.Page.al | 188 + .../History/PostedPaymentOrdersSelect.Page.al | 385 ++ .../History/PostedPurchCrMemoUpdate.Page.al | 96 + .../BankCatPostPayBillsMatrix.Page.al | 515 ++ .../BankCatPostedPayableBills.Page.al | 165 + .../Payables/BatchSettlPostedPOs.Report.al | 517 ++ .../CRTDetailedVendorLedgEntry.TableExt.al | 35 + .../Payables/CRTVendorLedgerEntry.Codeunit.al | 71 + .../Payables/CRTVendorLedgerEntry.TableExt.al | 78 + .../CarteraPayablesStatisticsFB.Page.al | 214 + .../Payables/ClosedPOAnalysisLCYFB.Page.al | 126 + .../Payables/ClosedPOAnalysisNonLCYFB.Page.al | 126 + .../Payables/ClosedPaymentOrder.Table.al | 180 + .../ClosedPaymentOrderListing.Report.al | 415 ++ .../Payables/ClosedPaymentOrderListing.rdlc | 2550 ++++++++ .../Payables/ClosedPaymentOrders.Page.al | 234 + .../Payables/ClosedPaymentOrdersList.Page.al | 154 + .../Payables/ClosedPmtOrdAnalysis.Page.al | 148 + .../Payables/DocsinClosedPOSubform.Page.al | 212 + .../Payables/DocsinPOSubform.Page.al | 273 + .../Payables/DocsinPostedPOSubform.Page.al | 369 ++ .../Payables/POExportN341.Codeunit.al | 27 + .../Purchases/Payables/POExportN341.Report.al | 566 ++ .../Purchases/Payables/POExportN341.rdlc | 1868 ++++++ .../Payables/PartialSettlPayable.Report.al | 513 ++ .../Payables/PayableClosedCarteraDocs.Page.al | 272 + .../Payables/PayablesCarteraDocs.Page.al | 480 ++ .../Purchases/Payables/PaymentOrder.Table.al | 421 ++ .../Payables/PaymentOrderListing.Report.al | 407 ++ .../Payables/PaymentOrderListing.rdlc | 2694 ++++++++ .../Payables/PaymentOrderTest.Report.al | 637 ++ .../Purchases/Payables/PaymentOrderTest.rdlc | 3546 ++++++++++ .../Purchases/Payables/PaymentOrders.Page.al | 320 + .../Payables/PaymentOrdersAnalysis.Page.al | 98 + .../Payables/PaymentOrdersList.Page.al | 235 + .../Payables/PaymentOrdersMaturity.Page.al | 97 + .../PaymentorderExportN34.Codeunit.al | 27 + .../Payables/PaymentorderExportN34.Report.al | 386 ++ .../Payables/PmtOrdersAnalysisFactBox.Page.al | 75 + .../Payables/RedrawPayableBills.Report.al | 497 ++ .../Payables/SettleDocsinPostedPO.Report.al | 528 ++ .../Purchases/Payables/VoidPOExport.Report.al | 124 + .../Purchases/Vendor/CRTVendorCard.PageExt.al | 23 + .../Purchases/Vendor/CRTVendorList.PageExt.al | 23 + .../Vendor/CRTVendorStatistics.PageExt.al | 274 + .../Sales/Customer/CRTCustomerCard.PageExt.al | 30 + .../Sales/Customer/CRTCustomerList.PageExt.al | 30 + .../CRTCustomerPostingGroup.TableExt.al | 114 + .../Customer/CRTCustomerStatistics.PageExt.al | 674 ++ .../Document/CRTSalesCreditMemo.PageExt.al | 38 + .../Sales/Document/CRTSalesInvoice.PageExt.al | 30 + .../Sales/Document/CRTSalesOrder.PageExt.al | 30 + .../Sales/Document/CRTSalesQuote.PageExt.al | 30 + .../Document/CRTSalesReturnOrder.PageExt.al | 30 + .../History/CRTSalesCrMemoHeader.Codeunit.al | 18 + .../History/CRTSalesCrMemoHeader.TableExt.al | 18 + .../History/CRTSalesInvoiceHeader.Codeunit.al | 19 + .../History/CRTSalesInvoiceHeader.TableExt.al | 18 + .../CRTSalesShipmentHeader.Codeunit.al | 19 + .../CRTSalesShipmentHeader.TableExt.al | 18 + .../History/PostBGAnalysisLCYFactBox.Page.al | 174 + .../History/PostBGAnalysisNonLCYFB.Page.al | 174 + .../History/PostedBillGrMaturityLines.Page.al | 139 + .../Sales/History/PostedBillGroup.Table.al | 281 + .../History/PostedBillGroupListing.Report.al | 451 ++ .../Sales/History/PostedBillGroupListing.rdlc | 2467 +++++++ .../History/PostedBillGroupSelect.Page.al | 394 ++ .../Sales/History/PostedBillGroups.Page.al | 299 + .../History/PostedBillGroupsAnalysis.Page.al | 241 + .../History/PostedBillGroupsList.Page.al | 186 + .../History/PostedBillGroupsMaturity.Page.al | 94 + .../Sales/History/PostedBillsAnalysis.Page.al | 276 + .../History/PostedBillsMaturityLin.Page.al | 137 + .../PostedPayableBillsMaturity.Page.al | 188 + .../History/PostedReceivBillsMaturity.Page.al | 188 + .../Receivables/BGAnalysisFactBox.Page.al | 75 + .../BankAccountInformationFB.Page.al | 134 + .../Receivables/BankAccountSelection.Page.al | 484 ++ .../BankCatPostRecBillsMatrix.Page.al | 515 ++ .../BankCatPostedReceivBills.Page.al | 165 + .../Receivables/BankSummBillGroup.Report.al | 245 + .../Sales/Receivables/BankSummBillGroup.rdlc | 2185 +++++++ .../BatchSettlPostedBillGrs.Report.al | 555 ++ .../Sales/Receivables/BillGroup.Table.al | 514 ++ .../Receivables/BillGroupListing.Report.al | 434 ++ .../Sales/Receivables/BillGroupListing.rdlc | 2306 +++++++ .../Sales/Receivables/BillGroupTest.Report.al | 1088 ++++ .../Sales/Receivables/BillGroupTest.rdlc | 5697 +++++++++++++++++ .../Sales/Receivables/BillGroups.Page.al | 326 + .../Receivables/BillGroupsAnalysis.Page.al | 98 + .../Sales/Receivables/BillGroupsList.Page.al | 235 + .../Receivables/BillGroupsMaturity.Page.al | 97 + .../BillgroupExportN19.Codeunit.al | 31 + .../Receivables/BillgroupExportN19.Report.al | 483 ++ .../BillgroupExportN32.Codeunit.al | 31 + .../Receivables/BillgroupExportN32.Report.al | 440 ++ .../BillgroupExportN58.Codeunit.al | 31 + .../Receivables/BillgroupExportN58.Report.al | 470 ++ .../BillgroupExportfactoring.Codeunit.al | 31 + .../BillgroupExportfactoring.Report.al | 303 + .../CRTCustLedgerEntry.Codeunit.al | 58 + .../CRTCustLedgerEntry.TableExt.al | 157 + .../CarteraReceivStatisticsFB.Page.al | 435 ++ .../Receivables/CategorizeDocuments.Report.al | 63 + .../CategorizePostedDocuments.Report.al | 63 + .../Receivables/ClosedBillGroup.Table.al | 217 + .../ClosedBillGroupListing.Report.al | 388 ++ .../Receivables/ClosedBillGroupListing.rdlc | 2943 +++++++++ .../Receivables/ClosedBillGroups.Page.al | 279 + .../ClosedBillGroupsAnalysis.Page.al | 181 + .../Receivables/ClosedBillGroupsList.Page.al | 154 + .../Receivables/CustomerPmtAddress.Table.al | 153 + .../Sales/Receivables/CustomerRating.Table.al | 70 + .../Sales/Receivables/CustomerRatings.Page.al | 39 + .../Sales/Receivables/DocsinBGSubform.Page.al | 311 + .../Receivables/DocsinClosedBGSubform.Page.al | 216 + .../Receivables/DocsinPostedBGSubform.Page.al | 471 ++ .../Sales/Receivables/ESBillType.Enum.al | 18 + .../Receivables/ESDocumentStatus.Enum.al | 17 + .../PartialSettlReceivable.Report.al | 576 ++ .../Sales/Receivables/PostBillGroup.Report.al | 786 +++ .../Receivables/ReceivableBill.Report.al | 642 ++ .../Sales/Receivables/ReceivableBill.rdlc | 1615 +++++ .../ReceivableClosedCarteraDocs.Page.al | 274 + .../ReceivablesCarteraDocs.Page.al | 514 ++ .../RedrawReceivableBills.Report.al | 839 +++ .../SettleDocsinPostBillGr.Report.al | 602 ++ .../Cartera/Sales/Receivables/Suffix.Table.al | 46 + .../Sales/Receivables/Suffixes.Page.al | 43 + 248 files changed, 79942 insertions(+) create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccount.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccount.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountCard.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountList.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountPostingGroup.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountPostingGroups.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountStatistics.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTPaymentMethod.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTPaymentMethods.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/Ledger/CRTBankAccountLedgerEntries.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/Ledger/CRTBankAccountLedgerEntry.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/Reports/BankRisk.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Bank/Reports/BankRisk.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/Currency/CRTExchRateAdjmtSubscribers.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTCashReceiptJournal.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGenJournalLine.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGenJournalLine.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGeneralJournal.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPaymentJournal.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPostedGenJournalLine.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPurchaseJournal.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTSalesJournal.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CRTGLEntry.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CRTGeneralLedgerEntries.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CarteraGeneralLedger.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentLine.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentList.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentSheet.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOMaturityLines.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOPostBuffer.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOPostandPrint.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CRTCVLedgerEntryBuffer.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CRTDetailedCVLedgEntryBuffer.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDealingType.Enum.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDoc.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentDocType.Enum.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentStatus.Enum.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentType.Enum.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocuments.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraFactStatisticsFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraJournal.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraManagement.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraReportSelections.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSetup.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSetup.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSourceCdSetup.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CheckDiscountCreditLimit.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedCarteraDoc.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedCarteraDocuments.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocsAnalysisLCYFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocsAnalysisNonLCYFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocumentsAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CompanyInitializeCartera.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocPostBuffer.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentEdit.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentMisc.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentMove.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentPost.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsMaturity.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsMaturityLines.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DueDateAdjust.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/FeeRange.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/FeeRanges.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/GLRegDocs.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/Installment.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/Installments.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/InvoiceSplitPayment.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/NonPaymentPeriod.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/NonPaymentPeriods.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/OperationFee.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/OperationFees.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PaymentDay.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PaymentDays.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedBills.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDoc.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDocEdit.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDocuments.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/RecDocsAnalysisFactBox.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/RejectDocs.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ReportSelectionCartera.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ReportSelectionUsageCartera.Enum.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccPayablesActivities.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccReceivableActivities.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccReceivablesAdmRC.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccountMgrActivities.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccountingMgrRoleCtr.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTBookkeeperActivities.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTBookkeeperRoleCenter.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTFinanceCue.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTFinanceManagerRC.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSBOwnerCue.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSmallBusinessOwnerAct.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSmallBusinessOwnerRC.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTBankAccountsView.PermissionSetExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTGLJournalsEdit.PermissionSetExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTGlobalDimMgt.PermissionSetExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTLOCAL.PermissionSetExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTLOCALREAD.PermissionSetExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseCreditMemo.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseInvoice.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseOrder.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseQuote.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseReturnOrder.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchCrMemoHdr.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchCrMemoHdr.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchInvHeader.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchInvHeader.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchRcptHeader.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchRcptHeader.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPOAnalysisLCYFactBox.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPOAnalysisNonLCYFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPaymentOrdersAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPmtOrdMaturityLin.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrder.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrderListing.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrderListing.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrders.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersList.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersMaturity.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersSelect.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPurchCrMemoUpdate.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BankCatPostPayBillsMatrix.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BankCatPostedPayableBills.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BatchSettlPostedPOs.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTDetailedVendorLedgEntry.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTVendorLedgerEntry.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTVendorLedgerEntry.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CarteraPayablesStatisticsFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPOAnalysisLCYFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPOAnalysisNonLCYFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrder.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrders.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrdersList.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPmtOrdAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinClosedPOSubform.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinPOSubform.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinPostedPOSubform.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PartialSettlPayable.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PayableClosedCarteraDocs.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PayablesCarteraDocs.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrder.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderListing.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderListing.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderTest.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderTest.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrders.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersList.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersMaturity.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentorderExportN34.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentorderExportN34.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PmtOrdersAnalysisFactBox.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/RedrawPayableBills.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/SettleDocsinPostedPO.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/VoidPOExport.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorCard.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorList.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorStatistics.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerCard.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerList.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerPostingGroup.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerStatistics.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesCreditMemo.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesInvoice.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesOrder.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesQuote.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesReturnOrder.PageExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesCrMemoHeader.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesCrMemoHeader.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesInvoiceHeader.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesInvoiceHeader.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesShipmentHeader.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesShipmentHeader.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostBGAnalysisLCYFactBox.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostBGAnalysisNonLCYFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGrMaturityLines.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroup.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupListing.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupListing.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupSelect.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroups.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsList.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsMaturity.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillsAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillsMaturityLin.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedPayableBillsMaturity.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedReceivBillsMaturity.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BGAnalysisFactBox.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankAccountInformationFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankAccountSelection.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankCatPostRecBillsMatrix.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankCatPostedReceivBills.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankSummBillGroup.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankSummBillGroup.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BatchSettlPostedBillGrs.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroup.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupListing.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupListing.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupTest.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupTest.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroups.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsList.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsMaturity.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN19.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN19.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN32.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN32.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN58.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN58.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportfactoring.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportfactoring.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustLedgerEntry.Codeunit.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustLedgerEntry.TableExt.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CarteraReceivStatisticsFB.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CategorizeDocuments.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CategorizePostedDocuments.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroup.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupListing.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupListing.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroups.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupsAnalysis.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupsList.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CustomerPmtAddress.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CustomerRating.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CustomerRatings.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/DocsinBGSubform.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/DocsinClosedBGSubform.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/DocsinPostedBGSubform.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ESBillType.Enum.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ESDocumentStatus.Enum.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/PartialSettlReceivable.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/PostBillGroup.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ReceivableBill.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ReceivableBill.rdlc create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ReceivableClosedCarteraDocs.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ReceivablesCarteraDocs.Page.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/RedrawReceivableBills.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/SettleDocsinPostBillGr.Report.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/Suffix.Table.al create mode 100644 src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/Suffixes.Page.al diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccount.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccount.Codeunit.al new file mode 100644 index 00000000000..8d9b70a488a --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccount.Codeunit.al @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +codeunit 7000080 "CRT Bank Account" +{ + var + CarteraSetup: Record "Cartera Setup"; + CannotChangeDueToPostedBillGroupsErr: Label 'You cannot change %1 because there are one or more posted bill groups for this bank account.', Comment = '%1 = Field caption'; + CannotChangeDueToPostedPmtOrdersErr: Label 'You cannot change %1 because there are one or more posted payment orders for this bank account.', Comment = '%1 = Field caption'; + + [EventSubscriber(ObjectType::Table, Database::"Bank Account", OnAfterValidateEvent, 'No.', false, false)] + local procedure NoOnAfterValidate(var Rec: Record "Bank Account"; var xRec: Record "Bank Account"; CurrFieldNo: Integer) + begin + Rec."Operation Fees Code" := Rec."No."; + end; + + [EventSubscriber(ObjectType::Table, Database::"Bank Account", OnAfterValidateEvent, 'Currency Code', false, false)] + local procedure CurrencyCodeOnAfterValidate(var Rec: Record "Bank Account"; var xRec: Record "Bank Account"; CurrFieldNo: Integer) + var + PostedBillGr: Record "Posted Bill Group"; + PostedPmtOrd: Record "Posted Payment Order"; + begin + if CarteraSetup.ReadPermission then begin + PostedBillGr.SetCurrentKey("Bank Account No."); + PostedBillGr.SetRange("Bank Account No.", Rec."No."); + if not PostedBillGr.IsEmpty() then + Error(CannotChangeDueToPostedBillGroupsErr, Rec.FieldCaption("Currency Code")); + PostedPmtOrd.SetCurrentKey("Bank Account No."); + PostedPmtOrd.SetRange("Bank Account No.", Rec."No."); + if not PostedPmtOrd.IsEmpty() then + Error(CannotChangeDueToPostedPmtOrdersErr, Rec.FieldCaption("Currency Code")); + end; + end; + + [EventSubscriber(ObjectType::Table, Database::"Bank Account", OnAfterDeleteEvent, '', false, false)] + local procedure CurrencyCodeOnAfterDelete(var Rec: Record "Bank Account") + var + Suffix: Record Suffix; + DocumentMove: Codeunit "Document-Move"; + begin + DocumentMove.MoveBankAccDocs(Rec); + + if CarteraSetup.ReadPermission then begin + Suffix.SetRange("Bank Acc. Code", Rec."No."); + Suffix.DeleteAll(); + end; + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccount.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccount.TableExt.al new file mode 100644 index 00000000000..a26ced296eb --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccount.TableExt.al @@ -0,0 +1,555 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +tableextension 7000080 "CRT Bank Account" extends "Bank Account" +{ + fields + { + field(7000000; "Delay for Notices"; Integer) + { + Caption = 'Delay for Notices'; + DataClassification = CustomerContent; + MinValue = 0; + } + field(7000001; "Credit Limit for Discount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Credit Limit for Discount'; + DataClassification = CustomerContent; + MinValue = 0; + } + field(7000002; "Last Bill Gr. No."; Code[20]) + { + Caption = 'Last Bill Gr. No.'; + DataClassification = CustomerContent; + Editable = false; + } + field(7000003; "Date of Last Post. Bill Gr."; Date) + { + Caption = 'Date of Last Post. Bill Gr.'; + DataClassification = CustomerContent; + Editable = false; + } + field(7000004; "Operation Fees Code"; Code[20]) + { + Caption = 'Operation Fees Code'; + DataClassification = CustomerContent; + TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); + ValidateTableRelation = true; + } + field(7000005; "Posted Receiv. Bills Rmg. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable), + "Document Type" = const(Bill))); + Caption = 'Posted Receiv. Bills Rmg. Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000006; "Posted Receiv. Bills Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable), + "Document Type" = const(Bill))); + Caption = 'Posted Receiv. Bills Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000007; "Closed Receiv. Bills Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable), + "Document Type" = const(Bill))); + Caption = 'Closed Receiv. Bills Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000008; "Dealing Type Filter"; Enum "Cartera Dealing Type") + { + Caption = 'Dealing Type Filter'; + FieldClass = FlowFilter; + } + field(7000009; "Status Filter"; Enum "Cartera Document Status") + { + Caption = 'Status Filter'; + FieldClass = FlowFilter; + } + field(7000010; "Category Filter"; Code[10]) + { + Caption = 'Category Filter'; + FieldClass = FlowFilter; + TableRelation = "Category Code"; + } + field(7000011; "Due Date Filter"; Date) + { + Caption = 'Due Date Filter'; + FieldClass = FlowFilter; + } + field(7000012; "Honored/Rejtd. at Date Filter"; Date) + { + Caption = 'Honored/Rejtd. at Date Filter'; + FieldClass = FlowFilter; + } + field(7000013; "Posted R.Bills Rmg. Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable), + "Document Type" = const(Bill))); + Caption = 'Posted R.Bills Rmg. Amt. (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(7000014; "Posted Receiv Bills Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Amt. for Collection (LCY)" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable), + "Document Type" = const(Bill))); + Caption = 'Posted Receiv Bills Amt. (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(7000015; "Closed Receiv Bills Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Closed Cartera Doc."."Amt. for Collection (LCY)" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable), + "Document Type" = const(Bill))); + Caption = 'Closed Receiv Bills Amt. (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(7000016; "VAT Registration No."; Text[20]) + { + Caption = 'VAT Registration No.'; + DataClassification = CustomerContent; + } + field(7000017; "Customer Ratings Code"; Code[20]) + { + Caption = 'Customer Ratings Code'; + DataClassification = CustomerContent; + TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); + ValidateTableRelation = true; + } + field(7000018; "Posted Pay. Bills Rmg. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable), + "Document Type" = const(Bill))); + Caption = 'Posted Pay. Bills Rmg. Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000019; "Posted Pay. Bills Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable), + "Document Type" = const(Bill))); + Caption = 'Posted Pay. Bills Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000020; "Closed Pay. Bills Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable), + "Document Type" = const(Bill))); + Caption = 'Closed Pay. Bills Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000021; "Posted P.Bills Rmg. Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + "Document Type" = const(Bill), + Type = const(Payable))); + Caption = 'Posted P.Bills Rmg. Amt. (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(7000022; "Posted Pay. Bills Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Amt. for Collection (LCY)" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable), + "Document Type" = const(Bill))); + Caption = 'Posted Pay. Bills Amt. (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(7000023; "Closed Pay. Bills Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Closed Cartera Doc."."Amt. for Collection (LCY)" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable), + "Document Type" = const(Bill))); + Caption = 'Closed Pay. Bills Amt. (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(7000024; "Post. Receivable Inv. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable), + "Document Type" = const(Invoice))); + Caption = 'Post. Receivable Inv. Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000025; "Clos. Receivable Inv. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable), + "Document Type" = const(Invoice))); + Caption = 'Clos. Receivable Inv. Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000026; "Posted Pay. Invoices Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable), + "Document Type" = const(Invoice))); + Caption = 'Posted Pay. Invoices Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000027; "Closed Pay. Invoices Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable), + "Document Type" = const(Invoice))); + Caption = 'Closed Pay. Invoices Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000028; "Posted Pay. Inv. Rmg. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable), + "Document Type" = const(Invoice))); + Caption = 'Posted Pay. Inv. Rmg. Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000029; "Posted Pay. Documents Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Dealing Type" = field("Dealing Type Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Posted Pay. Documents Amt.'; + Editable = false; + FieldClass = FlowField; + } + field(7000030; "Closed Pay. Documents Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bank Account No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Honored/Rejtd. at Date" = field("Honored/Rejtd. at Date Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Closed Pay. Documents Amt.'; + Editable = false; + FieldClass = FlowField; + } + } + + var + CarteraSetup: Record "Cartera Setup"; + PostedBillGr: Record "Posted Bill Group"; + ClosedBillGr: Record "Closed Bill Group"; + PostedPmtOrd: Record "Posted Payment Order"; + ClosedPmtOrd: Record "Closed Payment Order"; + + [Scope('OnPrem')] + procedure DiscInterestsTotalAmt(PostDateFilter: Code[250]): Decimal + begin + if CarteraSetup.ReadPermission then begin + PostedBillGr.SetCurrentKey("Bank Account No.", "Posting Date"); + PostedBillGr.SetRange("Bank Account No.", "No."); + PostedBillGr.SetFilter("Posting Date", PostDateFilter); + PostedBillGr.CalcSums("Discount Interests Amt."); + ClosedBillGr.SetCurrentKey("Bank Account No.", "Posting Date"); + ClosedBillGr.SetRange("Bank Account No.", "No."); + ClosedBillGr.SetFilter("Posting Date", PostDateFilter); + ClosedBillGr.CalcSums("Discount Interests Amt."); + exit(PostedBillGr."Discount Interests Amt." + ClosedBillGr."Discount Interests Amt."); + end; + end; + + [Scope('OnPrem')] + procedure ServicesFeesTotalAmt(PostDateFilter: Code[250]): Decimal + begin + if CarteraSetup.ReadPermission then begin + PostedBillGr.SetCurrentKey("Bank Account No.", "Posting Date"); + PostedBillGr.SetRange("Bank Account No.", "No."); + PostedBillGr.SetFilter("Posting Date", PostDateFilter); + PostedBillGr.CalcSums("Discount Expenses Amt."); + ClosedBillGr.SetCurrentKey("Bank Account No.", "Posting Date"); + ClosedBillGr.SetRange("Bank Account No.", "No."); + ClosedBillGr.SetFilter("Posting Date", PostDateFilter); + ClosedBillGr.CalcSums("Discount Expenses Amt."); + exit(PostedBillGr."Discount Expenses Amt." + ClosedBillGr."Discount Expenses Amt."); + end; + end; + + [Scope('OnPrem')] + procedure CollectionFeesTotalAmt(PostDateFilter: Code[250]): Decimal + begin + if CarteraSetup.ReadPermission then begin + PostedBillGr.SetCurrentKey("Bank Account No.", "Posting Date"); + PostedBillGr.SetRange("Bank Account No.", "No."); + PostedBillGr.SetFilter("Posting Date", PostDateFilter); + PostedBillGr.CalcSums("Collection Expenses Amt."); + ClosedBillGr.SetCurrentKey("Bank Account No.", "Posting Date"); + ClosedBillGr.SetRange("Bank Account No.", "No."); + ClosedBillGr.SetFilter("Posting Date", PostDateFilter); + ClosedBillGr.CalcSums("Collection Expenses Amt."); + exit(PostedBillGr."Collection Expenses Amt." + ClosedBillGr."Collection Expenses Amt."); + end; + end; + + [Scope('OnPrem')] + procedure RejExpensesAmt(PostDateFilter: Code[250]): Decimal + begin + if CarteraSetup.ReadPermission then begin + PostedBillGr.SetCurrentKey("Bank Account No.", "Posting Date"); + PostedBillGr.SetRange("Bank Account No.", "No."); + PostedBillGr.SetFilter("Posting Date", PostDateFilter); + PostedBillGr.CalcSums("Rejection Expenses Amt."); + ClosedBillGr.SetCurrentKey("Bank Account No.", "Posting Date"); + ClosedBillGr.SetRange("Bank Account No.", "No."); + ClosedBillGr.SetFilter("Posting Date", PostDateFilter); + ClosedBillGr.CalcSums("Rejection Expenses Amt."); + exit(PostedBillGr."Rejection Expenses Amt." + ClosedBillGr."Rejection Expenses Amt."); + end; + end; + + [Scope('OnPrem')] + procedure RiskFactFeesTotalAmt(PostDateFilter: Code[250]): Decimal + begin + if CarteraSetup.ReadPermission then begin + PostedBillGr.SetCurrentKey("Bank Account No.", "Posting Date", Factoring); + PostedBillGr.SetRange("Bank Account No.", "No."); + PostedBillGr.SetFilter("Posting Date", PostDateFilter); + PostedBillGr.CalcSums("Risked Factoring Exp. Amt."); + ClosedBillGr.SetCurrentKey("Bank Account No.", "Posting Date", Factoring); + ClosedBillGr.SetRange("Bank Account No.", "No."); + ClosedBillGr.SetFilter("Posting Date", PostDateFilter); + ClosedBillGr.CalcSums("Risked Factoring Exp. Amt."); + exit(PostedBillGr."Risked Factoring Exp. Amt." + ClosedBillGr."Risked Factoring Exp. Amt."); + end; + end; + + [Scope('OnPrem')] + procedure UnriskFactFeesTotalAmt(PostDateFilter: Code[250]): Decimal + begin + if CarteraSetup.ReadPermission then begin + PostedBillGr.SetCurrentKey("Bank Account No.", "Posting Date", Factoring); + PostedBillGr.SetRange("Bank Account No.", "No."); + PostedBillGr.SetFilter("Posting Date", PostDateFilter); + PostedBillGr.CalcSums("Collection Expenses Amt."); + ClosedBillGr.SetCurrentKey("Bank Account No.", "Posting Date", Factoring); + ClosedBillGr.SetRange("Bank Account No.", "No."); + ClosedBillGr.SetFilter("Posting Date", PostDateFilter); + ClosedBillGr.CalcSums("Unrisked Factoring Exp. Amt."); + exit(PostedBillGr."Unrisked Factoring Exp. Amt." + ClosedBillGr."Unrisked Factoring Exp. Amt."); + end; + end; + + [Scope('OnPrem')] + procedure DiscInterestFactTotalAmt(PostDateFilter: Code[250]): Decimal + begin + if CarteraSetup.ReadPermission then begin + PostedBillGr.SetCurrentKey("Bank Account No.", "Posting Date", Factoring); + PostedBillGr.SetRange("Bank Account No.", "No."); + PostedBillGr.SetFilter(Factoring, '<>%1', PostedBillGr.Factoring::" "); + PostedBillGr.SetFilter("Posting Date", PostDateFilter); + PostedBillGr.CalcSums("Discount Interests Amt."); + ClosedBillGr.SetCurrentKey("Bank Account No.", "Posting Date", Factoring); + ClosedBillGr.SetRange("Bank Account No.", "No."); + ClosedBillGr.SetFilter(Factoring, '<>%1', ClosedBillGr.Factoring::" "); + ClosedBillGr.SetFilter("Posting Date", PostDateFilter); + ClosedBillGr.CalcSums("Discount Interests Amt."); + PostedBillGr.SetRange(Factoring); + ClosedBillGr.SetRange(Factoring); + exit(PostedBillGr."Discount Interests Amt." + ClosedBillGr."Discount Interests Amt."); + end; + end; + + [Scope('OnPrem')] + procedure PaymentOrderFeesTotalAmt(PostDateFilter: Code[250]): Decimal + begin + if CarteraSetup.ReadPermission then begin + PostedPmtOrd.SetCurrentKey("Bank Account No.", "Posting Date"); + PostedPmtOrd.SetRange("Bank Account No.", "No."); + PostedPmtOrd.SetFilter("Posting Date", PostDateFilter); + PostedPmtOrd.CalcSums("Payment Order Expenses Amt."); + ClosedPmtOrd.SetCurrentKey("Bank Account No.", "Posting Date"); + ClosedPmtOrd.SetRange("Bank Account No.", "No."); + ClosedPmtOrd.SetFilter("Posting Date", PostDateFilter); + ClosedPmtOrd.CalcSums("Payment Order Expenses Amt."); + exit(PostedPmtOrd."Payment Order Expenses Amt." + ClosedPmtOrd."Payment Order Expenses Amt."); + end; + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountCard.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountCard.PageExt.al new file mode 100644 index 00000000000..90e01307723 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountCard.PageExt.al @@ -0,0 +1,179 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +using Microsoft.Bank.Reports; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +pageextension 7000152 "CRT Bank Account Card" extends "Bank Account Card" +{ + layout + { + addlast(content) + { + group(Cartera) + { + Caption = 'Cartera'; + field("Delay for Notices"; Rec."Delay for Notices") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies, if applicable, the delay for notice defined for this bank.'; + } + field("Credit Limit for Discount"; Rec."Credit Limit for Discount") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the credit limit for the discount of bills available at this particular bank.'; + } + field("Operation Fees Code"; Rec."Operation Fees Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the operations fee code related to this particular bank.'; + } + field("Customer Ratings Code"; Rec."Customer Ratings Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for insolvency risk percentages that the bank assigns to its customers.'; + } + } + } + } + + actions + { + addlast("&Bank Acc.") + { + separator(Action1100030) + { + } + action("&Operation Fees") + { + ApplicationArea = Basic, Suite; + Caption = '&Operation Fees'; + Image = Costs; + RunObject = Page "Operation Fees"; + RunPageLink = Code = field("Operation Fees Code"), + "Currency Code" = field("Currency Code"); + ToolTip = 'View the various operation fees that banks charge to process the documents that are remitted to them. These operations include collections, discounts, discount interest, rejections, payment orders, unrisked factoring, and risked factoring.'; + } + action("Customer Ratings") + { + ApplicationArea = Basic, Suite; + Caption = 'Customer Ratings'; + Image = CustomerRating; + RunObject = Page "Customer Ratings"; + RunPageLink = Code = field("Customer Ratings Code"), + "Currency Code" = field("Currency Code"); + ToolTip = 'View or edit the risk percentages that are assigned to customers according to their insolvency risk.'; + } + action("Sufi&xes") + { + ApplicationArea = Basic, Suite; + Caption = 'Sufi&xes'; + Image = NumberSetup; + RunObject = Page Suffixes; + RunPageLink = "Bank Acc. Code" = field("No."); + ToolTip = 'View the bank suffixes that area assigned to manage bill groups. Typically, banks assign the company a different suffix for managing bill groups, depending if they are receivable or discount management type operations.'; + } + separator(Action1100034) + { + } + action("Bill &Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill &Groups'; + Image = VoucherGroup; + RunObject = Page "Bill Groups List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View the related bill groups.'; + } + action("&Posted Bill Groups") + { + ApplicationArea = Basic, Suite; + Caption = '&Posted Bill Groups'; + Image = PostedVoucherGroup; + RunObject = Page "Posted Bill Groups List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + separator(Action1100038) + { + } + action("Payment O&rders") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment O&rders'; + Image = Payment; + RunObject = Page "Payment Orders List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View or edit related payment orders.'; + } + action("Posted P&ayment Orders") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted P&ayment Orders'; + Image = PostedPayment; + RunObject = Page "Posted Payment Orders List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + separator(Action1100041) + { + } + action("Posted Recei&vable Bills") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Recei&vable Bills'; + Image = PostedReceivableVoucher; + RunObject = Page "Bank Cat. Posted Receiv. Bills"; + ToolTip = 'View the list of posted bill groups pertaining to receivables.'; + } + action("Posted Pa&yable Bills") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Pa&yable Bills'; + Image = PostedPayableVoucher; + RunObject = Page "Bank Cat. Posted Payable Bills"; + ToolTip = 'View the list of posted bill groups pertaining to payables.'; + } + } + addlast(reporting) + { + action("Bank - Summ. Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Summ. Bill Group'; + Image = "Report"; + RunObject = Report "Bank - Summ. Bill Group"; + ToolTip = 'View a detailed summary for existing bill groups.'; + } + action("Bank - Risk") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Risk'; + Image = "Report"; + RunObject = Report "Bank - Risk"; + ToolTip = 'View the risk status for discounting bills with the selected bank.'; + } + } + addlast(Category_Report) + { + actionref("Bank - Summ. Bill Group_Promoted"; "Bank - Summ. Bill Group") + { + } + actionref("Bank - Risk_Promoted"; "Bank - Risk") + { + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountList.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountList.PageExt.al new file mode 100644 index 00000000000..00ac5eac8d9 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountList.PageExt.al @@ -0,0 +1,142 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +using Microsoft.Bank.Reports; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +pageextension 7000153 "CRT Bank Account List" extends "Bank Account List" +{ + actions + { + addlast("&Bank Acc.") + { + separator(Action1100000) + { + } + action("&Operation Fees") + { + ApplicationArea = Basic, Suite; + Caption = '&Operation Fees'; + Image = Costs; + RunObject = Page "Operation Fees"; + RunPageLink = Code = field("Operation Fees Code"), + "Currency Code" = field("Currency Code"); + ToolTip = 'View the various operation fees that banks charge to process the documents that are remitted to them. These operations include collections, discounts, discount interest, rejections, payment orders, unrisked factoring, and risked factoring.'; + } + action("Customer Ratings") + { + ApplicationArea = Basic, Suite; + Caption = 'Customer Ratings'; + Image = CustomerRating; + RunObject = Page "Customer Ratings"; + RunPageLink = Code = field("Customer Ratings Code"), + "Currency Code" = field("Currency Code"); + ToolTip = 'View or edit the risk percentages that are assigned to customers according to their insolvency risk.'; + } + action("Sufi&xes") + { + ApplicationArea = Basic, Suite; + Caption = 'Sufi&xes'; + Image = NumberSetup; + RunObject = Page Suffixes; + RunPageLink = "Bank Acc. Code" = field("No."); + ToolTip = 'View the bank suffixes that area assigned to manage bill groups. Typically, banks assign the company a different suffix for managing bill groups, depending if they are receivable or discount management type operations.'; + } + separator(Action1100004) + { + } + action("Bill &Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill &Groups'; + Image = VoucherGroup; + RunObject = Page "Bill Groups List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View the related bill groups.'; + } + action("&Posted Bill Groups") + { + ApplicationArea = Basic, Suite; + Caption = '&Posted Bill Groups'; + Image = PostedVoucherGroup; + RunObject = Page "Posted Bill Groups List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + separator(Action1100007) + { + } + action("Payment O&rders") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment O&rders'; + Image = Payment; + RunObject = Page "Payment Orders List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View or edit related payment orders.'; + } + action("Posted P&ayment Orders") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted P&ayment Orders'; + Image = PostedPayment; + RunObject = Page "Posted Payment Orders List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + separator(Action1100010) + { + } + action("Posted Recei&vable Bills") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Recei&vable Bills'; + Image = PostedReceivableVoucher; + RunObject = Page "Bank Cat. Posted Receiv. Bills"; + ToolTip = 'View the list of posted bill groups pertaining to receivables.'; + } + action("Posted Pa&yable Bills") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Pa&yable Bills'; + Image = PostedPayableVoucher; + RunObject = Page "Bank Cat. Posted Payable Bills"; + ToolTip = 'View the list of posted bill groups pertaining to payables.'; + } + } + addlast(reporting) + { + action("Bank - Summ. Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Summ. Bill Group'; + Image = "Report"; + //The property 'PromotedCategory' can only be set if the property 'Promoted' is set to 'true' + //PromotedCategory = "Report"; + RunObject = Report "Bank - Summ. Bill Group"; + ToolTip = 'View a detailed summary for existing bill groups.'; + } + action("Bank - Risk") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Risk'; + Image = "Report"; + //The property 'PromotedCategory' can only be set if the property 'Promoted' is set to 'true' + //PromotedCategory = "Report"; + RunObject = Report "Bank - Risk"; + ToolTip = 'View the risk status for discounting bills with the selected bank.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountPostingGroup.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountPostingGroup.TableExt.al new file mode 100644 index 00000000000..9d9b7673270 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountPostingGroup.TableExt.al @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +using Microsoft.Finance.GeneralLedger.Account; + +tableextension 7000081 "CRT BankAccountPostingGroup" extends "Bank Account Posting Group" +{ + fields + { + field(7000000; "Liabs. for Disc. Bills Acc."; Code[20]) + { + Caption = 'Liabs. for Disc. Bills Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000001; "Bank Services Acc."; Code[20]) + { + Caption = 'Bank Services Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000002; "Discount Interest Acc."; Code[20]) + { + Caption = 'Discount Interest Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000003; "Rejection Expenses Acc."; Code[20]) + { + Caption = 'Rejection Expenses Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000004; "Liabs. for Factoring Acc."; Code[20]) + { + Caption = 'Liabs. for Factoring Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountPostingGroups.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountPostingGroups.PageExt.al new file mode 100644 index 00000000000..9615e42f8f3 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountPostingGroups.PageExt.al @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +pageextension 7000154 "CRT BankAccountPostingGroups" extends "Bank Account Posting Groups" +{ + layout + { + addafter("G/L Account No.") + { + field("Liabs. for Disc. Bills Acc."; Rec."Liabs. for Disc. Bills Acc.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the general ledger account that will reflect the debt due to the discounting of bills for this bank general ledger group.'; + } + field("Bank Services Acc."; Rec."Bank Services Acc.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the general ledger account that will reflect the banking expenses for document discount management services for this group.'; + } + field("Discount Interest Acc."; Rec."Discount Interest Acc.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the general ledger account that will reflect the interest charged for discounting of bills/invoices, for this group.'; + } + field("Rejection Expenses Acc."; Rec."Rejection Expenses Acc.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the general ledger account that will reflect the costs derived from the rejection of documents for this group.'; + } + field("Liabs. for Factoring Acc."; Rec."Liabs. for Factoring Acc.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the general ledger account that will reflect the debt due to the discounting of invoices for this group.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountStatistics.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountStatistics.PageExt.al new file mode 100644 index 00000000000..cebeb71395b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTBankAccountStatistics.PageExt.al @@ -0,0 +1,778 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +using Microsoft.Foundation.Period; + +pageextension 7000155 "CRT Bank Account Statistics" extends "Bank Account Statistics" +{ + layout + { + addlast(content) + { + group("Receivable Bills") + { + Caption = 'Receivable Bills'; + fixed(Control1903836701) + { + ShowCaption = false; + group(Control1900249401) + { + Caption = 'This Period'; + field("Posted Receiv. Bills Amt."; Rec."Posted Receiv. Bills Amt.") + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + ToolTip = 'Specifies the amount of the bills, included in the bill groups, posted and delivered to this bank.'; + } + field("Closed Receiv. Bills Amt."; Rec."Closed Receiv. Bills Amt.") + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + ToolTip = 'Specifies the amount of the closed bills delivered to this bank.'; + } + field("TotalHonoredDocs[1]"; TotalHonoredDocs[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Total Honored Bills Amt.'; + ToolTip = 'Specifies the amount on honored bills. '; + } + field("TotalRejectedDocs[1]"; TotalRejectedDocs[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Total Rejected Bills Amt.'; + ToolTip = 'Specifies the amount on rejected bills.'; + } + field("DocDiscIntAmt[1]"; DocDiscIntAmt[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Discount Interests Amt.'; + ToolTip = 'Specifies the amount that relates to interest charged in connection with discount payments.'; + } + field("DocDiscExpAmt[1]"; DocDiscExpAmt[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Discount Expenses Amt.'; + ToolTip = 'Specifies the amount that relates to commission and charges in connection with discount payments.'; + } + field("DocCollExpAmt[1]"; DocCollExpAmt[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Collection Expenses Amt.'; + ToolTip = 'Specifies the amount that relates to commission and charges in connection with collection payments.'; + } + field("DocRejExpAmt[1]"; DocRejExpAmt[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejection Expenses Amt.'; + ToolTip = 'Specifies the amount that relates to commission and charges in connection with rejections.'; + } + } + group(Control1902148501) + { + Caption = 'This Year'; + field(Control1100031; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100032; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredDocs[2]"; TotalHonoredDocs[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("TotalRejectedDocs[2]"; TotalRejectedDocs[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocDiscIntAmt[2]"; DocDiscIntAmt[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocDiscExpAmt[2]"; DocDiscExpAmt[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocCollExpAmt[2]"; DocCollExpAmt[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocRejExpAmt[2]"; DocRejExpAmt[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + } + group(Control1906484001) + { + Caption = 'Last Year'; + field(Control1100033; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100034; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredDocs[3]"; TotalHonoredDocs[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("TotalRejectedDocs[3]"; TotalRejectedDocs[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocDiscIntAmt[3]"; DocDiscIntAmt[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocDiscExpAmt[3]"; DocDiscExpAmt[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocCollExpAmt[3]"; DocCollExpAmt[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocRejExpAmt[3]"; DocRejExpAmt[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + } + group(Control1906936701) + { + Caption = 'To Date'; + field(Control1100035; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100036; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredDocs[4]"; TotalHonoredDocs[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("TotalRejectedDocs[4]"; TotalRejectedDocs[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocDiscIntAmt[4]"; DocDiscIntAmt[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocDiscExpAmt[4]"; DocDiscExpAmt[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocCollExpAmt[4]"; DocCollExpAmt[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("DocRejExpAmt[4]"; DocRejExpAmt[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + } + } + } + group(Factoring) + { + Caption = 'Factoring'; + fixed(Control1903442601) + { + ShowCaption = false; + group(Control1905716001) + { + Caption = 'This Period'; + field(Control66; BankAccDateName[1]) + { + ApplicationArea = Basic, Suite; + } + field("TotalHonoredInvoices[1]"; TotalHonoredInvoices[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Total Honored Inv. Amt.'; + ToolTip = 'Specifies the amount on honored invoices. '; + } + field("TotalRejectedInvoices[1]"; TotalRejectedInvoices[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Total Rejected Inv. Amt.'; + ToolTip = 'Specifies the amount on rejected invoices.'; + } + field("FactDiscIntAmt[1]"; FactDiscIntAmt[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Discount Interests Amt.'; + ToolTip = 'Specifies the amount that relates to interest charged in connection with discount payments.'; + } + field("RiskFactExpAmt[1]"; RiskFactExpAmt[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Risked Factoring Exp. Amt.'; + ToolTip = 'Specifies the amount that relates to commission and charges in connection risked factoring.'; + } + field("UnriskFactExpAmt[1]"; UnriskFactExpAmt[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Unrisked Factoring Exp. Amt.'; + ToolTip = 'Specifies the amount that relates to commission and charges in connection unrisked factoring.'; + } + field("Post. Receivable Inv. Amt."; Rec."Post. Receivable Inv. Amt.") + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + ToolTip = 'Specifies the amount of the invoices included in bill groups, posted and delivered to this bank.'; + } + field("Clos. Receivable Inv. Amt."; Rec."Clos. Receivable Inv. Amt.") + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + ToolTip = 'Specifies the amount of the closed invoices delivered to this bank.'; + } + } + group(Control1905520001) + { + Caption = 'This Year'; + field(Control1100048; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredInvoices[2]"; TotalHonoredInvoices[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("TotalRejectedInvoices[2]"; TotalRejectedInvoices[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("FactDiscIntAmt[2]"; FactDiscIntAmt[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("RiskFactExpAmt[2]"; RiskFactExpAmt[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("UnriskFactExpAmt[2]"; UnriskFactExpAmt[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field(Control1100038; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100039; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + } + group(Control1903594901) + { + Caption = 'Last Year'; + field(Control1100049; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredInvoices[3]"; TotalHonoredInvoices[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("TotalRejectedInvoices[3]"; TotalRejectedInvoices[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("FactDiscIntAmt[3]"; FactDiscIntAmt[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("RiskFactExpAmt[3]"; RiskFactExpAmt[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("UnriskFactExpAmt[3]"; UnriskFactExpAmt[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field(Control1100044; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100045; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + } + group(Control1907930401) + { + Caption = 'To Date'; + field(Control1100050; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredInvoices[4]"; TotalHonoredInvoices[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("TotalRejectedInvoices[4]"; TotalRejectedInvoices[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("FactDiscIntAmt[4]"; FactDiscIntAmt[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("RiskFactExpAmt[4]"; RiskFactExpAmt[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("UnriskFactExpAmt[4]"; UnriskFactExpAmt[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field(Control1100046; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100047; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + } + } + } + group("Payable Documents") + { + Caption = 'Payable Documents'; + fixed(Control1907778101) + { + ShowCaption = false; + group(Control1906168701) + { + Caption = 'This Period'; + field(Control91; BankAccDateName[1]) + { + ApplicationArea = Basic, Suite; + } + field("TotalHonoredPayableDoc[1]"; TotalHonoredPayableDoc[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Total Honored Amt.'; + ToolTip = 'Specifies the amount on all honored documents. '; + } + field("PmtOrdExpAmt[1]"; PmtOrdExpAmt[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Payment Order Expenses Amt.'; + ToolTip = 'Specifies the amount that relates to commission and charges in connection with payment orders.'; + } + field("Posted Pay. Documents Amt."; Rec."Posted Pay. Documents Amt.") + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Posted Documents'; + ToolTip = 'Specifies the value of the pending amount, for payable documents posted to this bank.'; + } + field("Closed Pay. Documents Amt."; Rec."Closed Pay. Documents Amt.") + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Closed Documents'; + ToolTip = 'Specifies the amount of the closed payable documents delivered to this bank.'; + } + } + group(Control1907591201) + { + Caption = 'This Year'; + field(Control1100053; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredPayableDoc[2]"; TotalHonoredPayableDoc[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("PmtOrdExpAmt[2]"; PmtOrdExpAmt[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field(Control1100056; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100059; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + } + group(Control1904043901) + { + Caption = 'Last Year'; + field(Control1100054; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredPayableDoc[3]"; TotalHonoredPayableDoc[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("PmtOrdExpAmt[3]"; PmtOrdExpAmt[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field(Control1100057; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100060; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + } + group(Control1907649801) + { + Caption = 'To Date'; + field(Control1100055; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field("TotalHonoredPayableDoc[4]"; TotalHonoredPayableDoc[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field("PmtOrdExpAmt[4]"; PmtOrdExpAmt[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + } + field(Control1100058; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100061; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + } + } + } + group("Bill Groups") + { + Caption = 'Bill Groups'; + field(Control1100062; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100063; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + fixed(Control1903384001) + { + ShowCaption = false; + group(Control1905829501) + { + ShowCaption = false; + field("Last Bill Gr. No."; Rec."Last Bill Gr. No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the last posted bill group sent to this bank.'; + } + field("Date of Last Post. Bill Gr."; Rec."Date of Last Post. Bill Gr.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the posting date of the last bill group sent to this bank.'; + } + field("Credit Limit for Discount"; Rec."Credit Limit for Discount") + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + ToolTip = 'Specifies the credit limit for the discount of bills available at this particular bank.'; + } + field(DocsForDiscRmgAmt; DocsForDiscRmgAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Bills for Disc. Remg. Amt.'; + ToolTip = 'Specifies remaining amounts on bills for discount.'; + } + field(DocsForCollRmgAmt; DocsForCollRmgAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Bills for Coll. Remg. Amt.'; + ToolTip = 'Specifies remaining amounts on bills for collection.'; + } + } + group(Control1905435401) + { + ShowCaption = false; + field(Control1100064; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100065; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(Control1100066; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + field(RiskPerc; RiskPerc) + { + AutoFormatType = 0; + ApplicationArea = Basic, Suite; + ExtendedDatatype = Ratio; + MaxValue = 100; + MinValue = 0; + } + field(Control1100067; PlaceholderESLbl) + { + ApplicationArea = Advanced; + Visible = false; + } + } + } + } + } + } + + trigger OnAfterGetRecord() + var + CTRi: Integer; + begin + BankAcc.Copy(Rec); + + if CurrentDate <> WorkDate() then begin + CurrentDate := WorkDate(); + DateFilterCalc.CreateAccountingPeriodFilter(BankAccDateFilter[1], BankAccDateName[1], CurrentDate, 0); + DateFilterCalc.CreateFiscalYearFilter(BankAccDateFilter[2], BankAccDateName[2], CurrentDate, 0); + DateFilterCalc.CreateFiscalYearFilter(BankAccDateFilter[3], BankAccDateName[3], CurrentDate, -1); + end; + + BankAcc.SetRange("Date Filter"); + BankAcc.SetRange("Dealing Type Filter", 1); + // Discount + BankAcc.CalcFields("Posted Receiv. Bills Rmg. Amt."); + DocsForDiscRmgAmt := BankAcc."Posted Receiv. Bills Rmg. Amt."; + if BankAcc."Credit Limit for Discount" = 0 then + if DocsForDiscRmgAmt = 0 then + RiskPerc := 0 + else + RiskPerc := 100 + else + RiskPerc := DocsForDiscRmgAmt / BankAcc."Credit Limit for Discount" * 100; + + BankAcc.SetRange("Dealing Type Filter", 0); + // Collection + BankAcc.CalcFields("Posted Receiv. Bills Rmg. Amt.", "Posted Pay. Bills Rmg. Amt.", "Posted Pay. Inv. Rmg. Amt."); + DocsForCollRmgAmt := BankAcc."Posted Receiv. Bills Rmg. Amt."; + PayableDocsRmgAmt := BankAcc."Posted Pay. Bills Rmg. Amt." + BankAcc."Posted Pay. Inv. Rmg. Amt."; + + BankAcc.SetRange("Date Filter", 0D, CurrentDate); + + for CTRi := 1 to 4 do begin + BankAcc.SetFilter("Honored/Rejtd. at Date Filter", BankAccDateFilter[CTRi]); + BankAcc.SetRange("Status Filter", BankAcc."Status Filter"::Honored); + BankAcc.CalcFields( + "Closed Receiv. Bills Amt.", "Posted Receiv. Bills Amt.", "Clos. Receivable Inv. Amt.", "Post. Receivable Inv. Amt.", + "Closed Pay. Bills Amt.", "Posted Pay. Bills Amt.", "Closed Pay. Invoices Amt.", "Posted Pay. Invoices Amt."); + TotalHonoredDocs[CTRi] := BankAcc."Closed Receiv. Bills Amt." + BankAcc."Posted Receiv. Bills Amt."; + TotalHonoredInvoices[CTRi] := BankAcc."Clos. Receivable Inv. Amt." + BankAcc."Post. Receivable Inv. Amt."; + TotalHonoredPayableDoc[CTRi] := BankAcc."Closed Pay. Bills Amt." + BankAcc."Closed Pay. Invoices Amt." + + BankAcc."Posted Pay. Bills Amt." + BankAcc."Posted Pay. Invoices Amt."; + BankAcc.SetRange("Status Filter", BankAcc."Status Filter"::Rejected); + BankAcc.CalcFields( + "Closed Receiv. Bills Amt.", "Posted Receiv. Bills Amt.", "Clos. Receivable Inv. Amt.", "Post. Receivable Inv. Amt.", + "Closed Pay. Bills Amt.", "Posted Pay. Bills Amt.", "Closed Pay. Invoices Amt.", "Posted Pay. Invoices Amt."); + TotalRejectedInvoices[CTRi] := BankAcc."Clos. Receivable Inv. Amt." + BankAcc."Post. Receivable Inv. Amt."; + TotalRejectedDocs[CTRi] := BankAcc."Closed Receiv. Bills Amt." + BankAcc."Posted Receiv. Bills Amt."; + TotalRejectedPayableDoc[CTRi] := BankAcc."Closed Pay. Bills Amt." + BankAcc."Closed Pay. Invoices Amt." + + BankAcc."Posted Pay. Bills Amt." + BankAcc."Posted Pay. Invoices Amt."; + end; + + for CTRi := 1 to 4 do begin + DocCollExpAmt[CTRi] := BankAcc.CollectionFeesTotalAmt(BankAccDateFilter[CTRi]); + DocDiscExpAmt[CTRi] := BankAcc.ServicesFeesTotalAmt(BankAccDateFilter[CTRi]); + DocDiscIntAmt[CTRi] := BankAcc.DiscInterestsTotalAmt(BankAccDateFilter[CTRi]); + DocRejExpAmt[CTRi] := BankAcc.RejExpensesAmt(BankAccDateFilter[CTRi]); + FactDiscIntAmt[CTRi] := BankAcc.DiscInterestFactTotalAmt(BankAccDateFilter[CTRi]); + RiskFactExpAmt[CTRi] := BankAcc.RiskFactFeesTotalAmt(BankAccDateFilter[CTRi]); + UnriskFactExpAmt[CTRi] := BankAcc.UnriskFactFeesTotalAmt(BankAccDateFilter[CTRi]); + PmtOrdExpAmt[CTRi] := BankAcc.PaymentOrderFeesTotalAmt(BankAccDateFilter[CTRi]); + end; + end; + + var + BankAcc: Record "Bank Account"; + DateFilterCalc: Codeunit "DateFilter-Calc"; + BankAccDateFilter: array[4] of Text[30]; + BankAccDateName: array[4] of Text[30]; + CurrentDate: Date; + PlaceholderESLbl: Label 'Placeholder'; + DocsForDiscRmgAmt: Decimal; + DocsForCollRmgAmt: Decimal; + PayableDocsRmgAmt: Decimal; + DocCollExpAmt: array[4] of Decimal; + DocDiscIntAmt: array[4] of Decimal; + DocDiscExpAmt: array[4] of Decimal; + DocRejExpAmt: array[4] of Decimal; + TotalHonoredDocs: array[4] of Decimal; + TotalRejectedDocs: array[4] of Decimal; + RiskPerc: Decimal; + TotalHonoredInvoices: array[4] of Decimal; + TotalRejectedInvoices: array[4] of Decimal; + FactDiscIntAmt: array[4] of Decimal; + RiskFactExpAmt: array[4] of Decimal; + UnriskFactExpAmt: array[4] of Decimal; + TotalHonoredPayableDoc: array[4] of Decimal; + TotalRejectedPayableDoc: array[4] of Decimal; + PmtOrdExpAmt: array[4] of Decimal; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTPaymentMethod.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTPaymentMethod.TableExt.al new file mode 100644 index 00000000000..0a6afe071c1 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTPaymentMethod.TableExt.al @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +using Microsoft.Sales.Receivables; + +tableextension 7000083 "CRT Payment Method" extends "Payment Method" +{ + fields + { + field(7000000; "Create Bills"; Boolean) + { + Caption = 'Create Bills'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if "Invoices to Cartera" and "Create Bills" then + Error(MustBeSetEqualToErr, FieldCaption("Invoices to Cartera")); + end; + } + field(7000001; "Collection Agent"; Option) + { + Caption = 'Collection Agent'; + DataClassification = CustomerContent; + OptionCaption = 'Direct,Bank'; + OptionMembers = Direct,Bank; + } + field(7000002; "Submit for Acceptance"; Boolean) + { + Caption = 'Submit for Acceptance'; + DataClassification = CustomerContent; + } + field(7000003; "Bill Type"; Enum "ES Bill Type") + { + Caption = 'Bill Type'; + DataClassification = CustomerContent; + } + field(7000004; "Invoices to Cartera"; Boolean) + { + Caption = 'Invoices to Cartera'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if "Create Bills" and "Invoices to Cartera" then + Error(MustBeSetEqualToErr, FieldCaption("Create Bills")); + end; + } + } + + var + MustBeSetEqualToErr: Label '%1 must be set equal to False', Comment = '%1 - field caption'; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTPaymentMethods.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTPaymentMethods.PageExt.al new file mode 100644 index 00000000000..79b61c3026e --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/BankAccount/CRTPaymentMethods.PageExt.al @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.BankAccount; + +pageextension 7000156 "CRT Payment Methods" extends "Payment Methods" +{ + layout + { + addafter("Bal. Account No.") + { + field("Invoices to Cartera"; Rec."Invoices to Cartera") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a check mark in this field to send the invoices to Portfolio for this specific payment method.'; + } + field("Create Bills"; Rec."Create Bills") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a check mark so that this payment method creates bills.'; + } + field("Bill Type"; Rec."Bill Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document that originated from this specific payment method.'; + } + field("Collection Agent"; Rec."Collection Agent") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the collection agent to which you will deliver the document that originated from this specific payment method.'; + } + field("Submit for Acceptance"; Rec."Submit for Acceptance") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a check mark in this field if the bill must be sent to the customer for acceptance first.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/Ledger/CRTBankAccountLedgerEntries.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/Ledger/CRTBankAccountLedgerEntries.PageExt.al new file mode 100644 index 00000000000..91b04f1f72d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/Ledger/CRTBankAccountLedgerEntries.PageExt.al @@ -0,0 +1,21 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Ledger; + +pageextension 7000157 "CRT BankAccountLedgerEntries" extends "Bank Account Ledger Entries" +{ + layout + { + addafter("Document No.") + { + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of the bill related to this bank ledger entry.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/Ledger/CRTBankAccountLedgerEntry.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/Ledger/CRTBankAccountLedgerEntry.TableExt.al new file mode 100644 index 00000000000..56c02767052 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/Ledger/CRTBankAccountLedgerEntry.TableExt.al @@ -0,0 +1,17 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Ledger; + +tableextension 7000084 "CRT Bank Account Ledger Entry" extends "Bank Account Ledger Entry" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = CustomerContent; + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/Reports/BankRisk.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Bank/Reports/BankRisk.Report.al new file mode 100644 index 00000000000..13216583e35 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/Reports/BankRisk.Report.al @@ -0,0 +1,279 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Bank.Reports; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Sales.Receivables; + +report 7000005 "Bank - Risk" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Bank/Reports/BankRisk.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'Bank - Risk'; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(BankAcc; "Bank Account") + { + CalcFields = "Posted Receiv. Bills Rmg. Amt."; + DataItemTableView = sorting("No."); + RequestFilterFields = "No.", "Search Name", "Bank Acc. Posting Group"; + column(USERID; UserId) + { + } + column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) + { + } + column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) + { + } + column(PrintAmountsInLCY; PrintAmountsInLCY) + { + } + column(BankAcc_TABLECAPTION__________BankAccTableFilter; TableCaption + ': ' + BankAccTableFilter) + { + } + column(BankAccTableFilter; BankAccTableFilter) + { + } + column(BankAcc__No__; "No.") + { + } + column(BankAcc_Name; Name) + { + } + column(BankAcc__Credit_Limit_for_Discount_; "Credit Limit for Discount") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__Posted_Receiv__Bills_Rmg__Amt__; "Posted Receiv. Bills Rmg. Amt.") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(NonPostedDiscAmt; NonPostedDiscAmt) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt; ("Credit Limit for Discount" - "Posted Receiv. Bills Rmg. Amt." + Abs("Credit Limit for Discount" - "Posted Receiv. Bills Rmg. Amt.")) / 2) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt; (("Credit Limit for Discount" - "Posted Receiv. Bills Rmg. Amt." - NonPostedDiscAmt) + Abs("Credit Limit for Discount" - "Posted Receiv. Bills Rmg. Amt." - NonPostedDiscAmt)) / 2) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__Currency_Code_; "Currency Code") + { + } + column(CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY; ((CreditLimitForDiscLCY - "Posted R.Bills Rmg. Amt. (LCY)" - NonPostedDiscAmtLCY) + Abs(CreditLimitForDiscLCY - "Posted R.Bills Rmg. Amt. (LCY)" - NonPostedDiscAmtLCY)) / 2) + { + AutoFormatType = 1; + } + column(NonPostedDiscAmtLCY; NonPostedDiscAmtLCY) + { + AutoFormatType = 1; + } + column(CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY_____ABS_CreditLimitForDiscLCY; (CreditLimitForDiscLCY - "Posted R.Bills Rmg. Amt. (LCY)" + Abs(CreditLimitForDiscLCY - "Posted R.Bills Rmg. Amt. (LCY)")) / 2) + { + AutoFormatType = 1; + } + column(BankAcc__Posted_R_Bills_Rmg__Amt___LCY__; "Posted R.Bills Rmg. Amt. (LCY)") + { + AutoFormatType = 1; + } + column(CreditLimitForDiscLCY; CreditLimitForDiscLCY) + { + AutoFormatType = 1; + } + column(BankAcc__Currency_Code__Control35; "Currency Code") + { + } + column(BankAcc_Name_Control36; Name) + { + } + column(BankAcc__No___Control37; "No.") + { + } + column(BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt; "Credit Limit for Discount" - "Posted Receiv. Bills Rmg. Amt." - NonPostedDiscAmt) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(NonPostedDiscAmt_Control24; NonPostedDiscAmt) + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt__; "Credit Limit for Discount" - "Posted Receiv. Bills Rmg. Amt.") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(BankAcc_BankAcc__Posted_Receiv__Bills_Rmg__Amt__; "Posted Receiv. Bills Rmg. Amt.") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(BankAcc_BankAcc__Credit_Limit_for_Discount_; "Credit Limit for Discount") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY; CreditLimitForDiscLCY - "Posted R.Bills Rmg. Amt. (LCY)" - NonPostedDiscAmtLCY) + { + AutoFormatType = 1; + } + column(NonPostedDiscAmtLCY_Control39; NonPostedDiscAmtLCY) + { + AutoFormatType = 1; + } + column(CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__; CreditLimitForDiscLCY - "Posted R.Bills Rmg. Amt. (LCY)") + { + AutoFormatType = 1; + } + column(BankAcc_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__; "Posted R.Bills Rmg. Amt. (LCY)") + { + AutoFormatType = 1; + } + column(CreditLimitForDiscLCY_Control42; CreditLimitForDiscLCY) + { + AutoFormatType = 1; + } + column(Bank___RiskCaption; Bank___RiskCaptionLbl) + { + } + column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) + { + } + column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) + { + } + column(BankAcc__No__Caption; FieldCaption("No.")) + { + } + column(BankAcc_NameCaption; FieldCaption(Name)) + { + } + column(BankAcc__Credit_Limit_for_Discount_Caption; FieldCaption("Credit Limit for Discount")) + { + } + column(BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption; FieldCaption("Posted Receiv. Bills Rmg. Amt.")) + { + } + column(NonPostedDiscAmtCaption; NonPostedDiscAmtCaptionLbl) + { + } + column(Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt_____ABS__Credit_Limit_for_Discount_Caption; DiscountPossibleLbl) + { + } + column(Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt__ABS__Credit_Limit_for_Discount_Caption; DiscPossibleAfterPostingLbl) + { + } + column(BankAcc__Currency_Code_Caption; FieldCaption("Currency Code")) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + column(TotalCaption_Control43; TotalCaption_Control43Lbl) + { + } + + trigger OnAfterGetRecord() + begin + NonPostedDiscAmt := 0; + NonPostedDiscAmtLCY := 0; + + if PrintAmountsInLCY then + CreditLimitForDiscLCY := + CurrExchRate.ExchangeAmount("Credit Limit for Discount", "Currency Code", '', WorkDate()); + BillGr.SetRange("Bank Account No.", "No."); + BillGr.SetRange("Dealing Type", DealingType::Discount); + if BillGr.FindSet() then + if PrintAmountsInLCY then + repeat + BillGr.CalcFields("Amount (LCY)"); + NonPostedDiscAmtLCY := NonPostedDiscAmtLCY + BillGr."Amount (LCY)"; + until BillGr.Next() = 0 + else + repeat + BillGr.CalcFields(Amount); + NonPostedDiscAmt := NonPostedDiscAmt + BillGr.Amount; + until BillGr.Next() = 0; + end; + + trigger OnPreDataItem() + begin + SetRange("Dealing Type Filter", DealingType::Discount); + Clear(NonPostedDiscAmt); + Clear(NonPostedDiscAmtLCY); + Clear("Credit Limit for Discount"); + Clear(CreditLimitForDiscLCY); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PrintAmountsInLCY; PrintAmountsInLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show amounts in LCY'; + ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnPreReport() + begin + BankAccTableFilter := BankAcc.GetFilters(); + end; + + var + BillGr: Record "Bill Group"; + CurrExchRate: Record "Currency Exchange Rate"; + BankAccTableFilter: Code[250]; + NonPostedDiscAmt: Decimal; + NonPostedDiscAmtLCY: Decimal; + PrintAmountsInLCY: Boolean; + CreditLimitForDiscLCY: Decimal; + DealingType: Option Collection,Discount; + Bank___RiskCaptionLbl: Label 'Bank - Risk'; + CurrReport_PAGENOCaptionLbl: Label 'Page'; + All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; + NonPostedDiscAmtCaptionLbl: Label 'Non-posted Bills for Discount (Amt.)'; + DiscountPossibleLbl: Label 'Discount Possible'; + DiscPossibleAfterPostingLbl: Label 'Disc. Possible after Posting'; + TotalCaptionLbl: Label 'Total'; + TotalCaption_Control43Lbl: Label 'Total'; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Bank/Reports/BankRisk.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Bank/Reports/BankRisk.rdlc new file mode 100644 index 00000000000..9a2fd7d5c21 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Bank/Reports/BankRisk.rdlc @@ -0,0 +1,1791 @@ + + + 0 + + + + SQL + + + None + 40b102b0-6d8e-4b19-b2ed-de9bd4fdea81 + + + + + + + + + + + 1.65cm + + + 4.65cm + + + 1.65cm + + + 2.05cm + + + 2.05cm + + + 2.05cm + + + 2.05cm + + + 2.05cm + + + + + 0.423cm + + + + + true + + + + + =First(Fields!All_amounts_are_in_LCYCaption.Value) + + + + + + 41 + + =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) + + NoOutput + + + 8 + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!BankAcc_TABLECAPTION__________BankAccTableFilter.Value) + + + + + + 40 + + =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) + + NoOutput + + + 8 + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!BankAcc__No__Caption.Value) + + + + + + 39 + + + + + + + + true + + + + + =First(Fields!BankAcc_NameCaption.Value) + + + + + + 38 + + + + + + + + true + + + + + =First(Fields!BankAcc__Currency_Code_Caption.Value) + + + + + + 37 + + + + + + + + true + + + + + =First(Fields!BankAcc__Credit_Limit_for_Discount_Caption.Value) + + + + + + + 36 + + + + + + + + true + + + + + =First(Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption.Value) + + + + + + + 35 + + + + + + + + true + + + + + =First(Fields!Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt_____ABS__Credit_Limit_for_Discount_Caption.Value) + + + + + + + 34 + + + + + + + + true + + + + + =First(Fields!NonPostedDiscAmtCaption.Value) + + + + + + + 33 + + + + + + + + true + + + + + =First(Fields!Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt__ABS__Credit_Limit_for_Discount_Caption.Value) + + + + + + + 32 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__No__.Value + + + + + + 30 + + + + + + + + true + + + + + =Fields!BankAcc_Name.Value + + + + + + 29 + + + + + + + + true + + + + + =Fields!BankAcc__Currency_Code_.Value + + + + + + 28 + + + + + + + + true + true + + + + + =Fields!BankAcc__Credit_Limit_for_Discount_.Value + + + + + + 27 + + + + + + + + true + true + + + + + =Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value + + + + + + 26 + + + + + + + + true + true + + + + + =Fields!Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt.Value + + + + + + 25 + + + + + + + + true + true + + + + + =Fields!NonPostedDiscAmt.Value + + + + + + 24 + + + + + + + + true + true + + + + + =Fields!Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt.Value + + + + + + 23 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__No__.Value + + + + + + 7 + + + + + + + + true + + + + + =Fields!BankAcc_Name.Value + + + + + + 6 + + + + + + + + true + + + + + =Fields!BankAcc__Currency_Code_.Value + + + + + + 5 + + + + + + + + true + true + + + + + =Fields!CreditLimitForDiscLCY.Value + + + + + + 4 + + + + + + + + true + true + + + + + =Fields!BankAcc__Posted_R_Bills_Rmg__Amt___LCY__.Value + + + + + + 3 + + + + + + + + true + true + + + + + =Fields!CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY_____ABS_CreditLimitForDiscLCY.Value + + + + + + 2 + + + + + + + + true + true + + + + + =Fields!NonPostedDiscAmtLCY.Value + + + + + + 1 + + + + + + + + true + true + + + + + =Fields!CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY.Value + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox2 + 8 + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!TotalCaption.Value) + + + + + + 15 + + + + + + + + true + + + + + + + + 2 + + + + + + + true + true + + + + + =Sum(Fields!BankAcc__Credit_Limit_for_Discount_.Value) + + + + + + 13 + + + + + + + + true + true + + + + + =Sum(Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value) + + + + + + 12 + + + + + + + + true + true + + + + + =Code.BlankNeg(Sum(Fields!BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value)) + + + + + + 11 + + + + + + + + true + true + + + + + =Sum(Fields!NonPostedDiscAmt.Value) + + + + + + 10 + + + + + + + + true + true + + + + + =Code.BlankNeg(Sum(Fields!BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt.Value)) + + + + + + 9 + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!TotalCaption_Control43.Value) + + + + + + 22 + + + + + + + + true + + + + + + + + 2 + + + + + + + true + true + + + + + =Sum(Fields!CreditLimitForDiscLCY.Value) + + + + + + 20 + + + + + + + + true + true + + + + + =Sum(Fields!BankAcc__Posted_R_Bills_Rmg__Amt___LCY__.Value) + + + + + + 19 + + + + + + + + true + true + + + + + =Code.BlankNeg(Sum(Fields!CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__.Value)) + + + + + + 18 + + + + + + + + true + true + + + + + =Sum(Fields!NonPostedDiscAmtLCY.Value) + + + + + + 17 + + + + + + + + true + true + + + + + =Code.BlankNeg(Sum(Fields!CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY.Value)) + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + + =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) + + After + true + + + + =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) + + After + true + + + After + true + + + After + true + + + + Detail + + + + + =iif(Fields!PrintAmountsInLCY.Value=TRUE,TRUE,FALSE) + + + + + =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) + + + + Detail_Collection + Output + true + + + Before + true + + + + =iif(Fields!PrintAmountsInLCY.Value=TRUE,TRUE,FALSE) + + Before + true + + + + =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) + + Before + true + + + + DataSet_Result + 1.692cm + 6 + + + true + true + + + + + =User!UserID + + + + + + + 0.84656cm + 14.92063cm + 0.423cm + 3.25001cm + 5 + + + + true + + + + + =Fields!FORMAT_TODAY_0_4_.Value + + + + + + + 0.00056cm + 15.02064cm + 0.423cm + 3.15cm + 3 + + + + true + + + + + =Fields!COMPANYNAME.Value + + + + + + 0.423cm + 0.02064cm + 0.423cm + 7.5cm + 2 + + + + true + + + + + =Fields!Bank___RiskCaption.Value + + + + + + 0.02064cm + 0.423cm + 7.5cm + 1 + + + + true + + + + + =Fields!CurrReport_PAGENOCaption.Value + + + + + + 0.42356cm + 16.97064cm + 0.423cm + 0.75cm + + + + 6.345cm + + 18.2cm + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + + =User!Language + true + Invalid + 1bbfd5a8-35df-4e81-9d36-4f096ef3013f + + + + + USERID + + + COMPANYNAME + + + FORMAT_TODAY_0_4_ + + + PrintAmountsInLCY + + + BankAcc_TABLECAPTION__________BankAccTableFilter + + + BankAccTableFilter + + + BankAcc__No__ + + + BankAcc_Name + + + BankAcc__Credit_Limit_for_Discount_ + + + BankAcc__Credit_Limit_for_Discount_Format + + + BankAcc__Posted_Receiv__Bills_Rmg__Amt__ + + + BankAcc__Posted_Receiv__Bills_Rmg__Amt__Format + + + NonPostedDiscAmt + + + NonPostedDiscAmtFormat + + + Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt + + + Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__AmtFormat + + + Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt + + + Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmtFormat + + + BankAcc__Currency_Code_ + + + CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY + + + CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCYFormat + + + NonPostedDiscAmtLCY + + + NonPostedDiscAmtLCYFormat + + + CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY_____ABS_CreditLimitForDiscLCY + + + CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY_____ABS_CreditLimitForDiscLCYFormat + + + BankAcc__Posted_R_Bills_Rmg__Amt___LCY__ + + + BankAcc__Posted_R_Bills_Rmg__Amt___LCY__Format + + + CreditLimitForDiscLCY + + + CreditLimitForDiscLCYFormat + + + BankAcc__Currency_Code__Control35 + + + BankAcc_Name_Control36 + + + BankAcc__No___Control37 + + + BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt + + + BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmtFormat + + + NonPostedDiscAmt_Control24 + + + NonPostedDiscAmt_Control24Format + + + BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt__ + + + BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt__Format + + + BankAcc_BankAcc__Posted_Receiv__Bills_Rmg__Amt__ + + + BankAcc_BankAcc__Posted_Receiv__Bills_Rmg__Amt__Format + + + BankAcc_BankAcc__Credit_Limit_for_Discount_ + + + BankAcc_BankAcc__Credit_Limit_for_Discount_Format + + + CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY + + + CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCYFormat + + + NonPostedDiscAmtLCY_Control39 + + + NonPostedDiscAmtLCY_Control39Format + + + CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__ + + + CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__Format + + + BankAcc_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__ + + + BankAcc_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__Format + + + CreditLimitForDiscLCY_Control42 + + + CreditLimitForDiscLCY_Control42Format + + + Bank___RiskCaption + + + CurrReport_PAGENOCaption + + + All_amounts_are_in_LCYCaption + + + BankAcc__No__Caption + + + BankAcc_NameCaption + + + BankAcc__Credit_Limit_for_Discount_Caption + + + BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption + + + NonPostedDiscAmtCaption + + + Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt_____ABS__Credit_Limit_for_Discount_Caption + + + Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt__ABS__Credit_Limit_for_Discount_Caption + + + BankAcc__Currency_Code_Caption + + + TotalCaption + + + TotalCaption_Control43 + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/Currency/CRTExchRateAdjmtSubscribers.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/Currency/CRTExchRateAdjmtSubscribers.Codeunit.al new file mode 100644 index 00000000000..afccafd6458 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/Currency/CRTExchRateAdjmtSubscribers.Codeunit.al @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.Currency; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.Receivables; + +/// +/// Reserved codeunit for implementing country-specific exchange rate adjustment logic. +/// Provides a placeholder for localization-specific event subscribers and customizations +/// related to exchange rate adjustment processing. +/// +/// +/// Intended for use by localization partners to implement region-specific requirements +/// for exchange rate adjustments without modifying core adjustment procedures. +/// Event subscribers can be added to handle local compliance and calculation rules. +/// +codeunit 7000097 "CRT ExchRateAdjmtSubscribers" +{ + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Exch. Rate Adjmt. Process", 'OnBeforeGetLocalCustAccountNo', '', false, false)] + local procedure GetLocalCustAccountNo(CustLedgerEntry: Record "Cust. Ledger Entry"; var AccountNo: Code[20]; var IsHandled: Boolean) + var + CustPostingGr: Record "Customer Posting Group"; + PostedCarteraDoc: Record "Posted Cartera Doc."; + begin + AccountNo := ''; + IsHandled := false; + Clear(PostedCarteraDoc); + CustLedgerEntry.TestField("Customer Posting Group"); + CustPostingGr.Get(CustLedgerEntry."Customer Posting Group"); + case true of + (CustLedgerEntry."Document Type" = CustLedgerEntry."Document Type"::Invoice) and + (CustLedgerEntry."Document Status" = CustLedgerEntry."Document Status"::" ") and + (CustLedgerEntry."Document Situation" = CustLedgerEntry."Document Situation"::" "): + AccountNo := CustPostingGr.GetReceivablesAccount(); + (CustLedgerEntry."Document Type" = CustLedgerEntry."Document Type"::Invoice) and + (CustLedgerEntry."Document Status" = CustLedgerEntry."Document Status"::Rejected) and + (CustLedgerEntry."Document Situation" in [CustLedgerEntry."Document Situation"::"Posted BG/PO", + CustLedgerEntry."Document Situation"::"Closed BG/PO"]): + AccountNo := CustPostingGr.GetRejectedFactoringAcc(); + (CustLedgerEntry."Document Type" = CustLedgerEntry."Document Type"::Invoice) and + (CustLedgerEntry."Document Status" = CustLedgerEntry."Document Status"::Open) and + (CustLedgerEntry."Document Situation" = CustLedgerEntry."Document Situation"::"Posted BG/PO"): + begin + PostedCarteraDoc.Get("Cartera Document Type"::Receivable, CustLedgerEntry."Entry No."); + AccountNo := CustPostingGr.GetFactoringForCollectionAcc(); + if PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount then + AccountNo := CustPostingGr.GetFactoringForDiscountAcc(); + end; + (CustLedgerEntry."Document Type" = CustLedgerEntry."Document Type"::Bill) and + (CustLedgerEntry."Document Status" = CustLedgerEntry."Document Status"::Open) and + (CustLedgerEntry."Document Situation" in [CustLedgerEntry."Document Situation"::Cartera, + CustLedgerEntry."Document Situation"::"BG/PO"]): + AccountNo := CustPostingGr.GetBillsAccount(false); + (CustLedgerEntry."Document Type" = CustLedgerEntry."Document Type"::Bill) and + (CustLedgerEntry."Document Status" = CustLedgerEntry."Document Status"::Rejected) and + (CustLedgerEntry."Document Situation" in [CustLedgerEntry."Document Situation"::"Posted BG/PO", + CustLedgerEntry."Document Situation"::"Closed BG/PO", + CustLedgerEntry."Document Situation"::"Closed Documents"]): + AccountNo := CustPostingGr.GetBillsAccount(true); + (CustLedgerEntry."Document Type" = CustLedgerEntry."Document Type"::Bill) and + (CustLedgerEntry."Document Status" = CustLedgerEntry."Document Status"::Open) and + (CustLedgerEntry."Document Situation" = CustLedgerEntry."Document Situation"::"Posted BG/PO"): + begin + AccountNo := CustPostingGr.GetBillsOnCollAccount(); + PostedCarteraDoc.Get("Cartera Document Type"::Receivable, CustLedgerEntry."Entry No."); + if PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount then + AccountNo := CustPostingGr.GetDiscountedBillsAcc(); + end; + end; + IsHandled := AccountNo <> ''; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Exch. Rate Adjmt. Process", 'OnAdjustCustomerLedgerEntryOnAfterPrepareAdjust', '', false, false)] + local procedure CreateLocalCustDocuments(var CustLedgerEntry: Record "Cust. Ledger Entry"; CurrAdjAmount: Decimal; OldAdjAmount: Decimal) + begin + CreateCustCarteraDocuments(CustLedgerEntry, CurrAdjAmount, OldAdjAmount); + end; + + local procedure CreateCustCarteraDocuments(var CustLedgerEntry: Record "Cust. Ledger Entry"; CurrAdjAmount: Decimal; OldAdjAmount: Decimal) + var + CarteraDoc: Record "Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + PostedCarteraDoc: Record "Posted Cartera Doc."; + begin + if CustLedgerEntry."Document Situation" = CustLedgerEntry."Document Situation"::" " then + exit; + + CustLedgerEntry.CalcFields( + Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)", "Original Amt. (LCY)", + "Debit Amount", "Credit Amount", "Debit Amount (LCY)", "Credit Amount (LCY)"); + case CustLedgerEntry."Document Situation" of + CustLedgerEntry."Document Situation"::Cartera: + if CarteraDoc.Get(CarteraDoc.Type::Receivable, CustLedgerEntry."Entry No.") then begin + CarteraDoc."Remaining Amt. (LCY)" := CustLedgerEntry."Remaining Amt. (LCY)" + CurrAdjAmount; + CarteraDoc."Original Amount (LCY)" := CustLedgerEntry."Original Amt. (LCY)" + CurrAdjAmount; + CarteraDoc."Adjusted Amount" := CurrAdjAmount; + CarteraDoc.Adjusted := true; + CarteraDoc.Modify(); + end; + CustLedgerEntry."Document Situation"::"Posted BG/PO": + if PostedCarteraDoc.Get(PostedCarteraDoc.Type::Receivable, CustLedgerEntry."Entry No.") then begin + PostedCarteraDoc."Remaining Amt. (LCY)" := CustLedgerEntry."Remaining Amt. (LCY)"; + PostedCarteraDoc."Adjusted Amount" := CurrAdjAmount + OldAdjAmount; + PostedCarteraDoc.ReAdjusted := true; + PostedCarteraDoc.Modify(); + end; + CustLedgerEntry."Document Situation"::"Closed BG/PO", + CustLedgerEntry."Document Situation"::"Closed Documents": + if ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Receivable, CustLedgerEntry."Entry No.") then begin + ClosedCarteraDoc."Remaining Amt. (LCY)" := CustLedgerEntry."Remaining Amt. (LCY)"; + ClosedCarteraDoc.Modify(); + end; + end; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Exch. Rate Adjmt. Process", 'OnBeforeGetLocalVendAccountNo', '', false, false)] + local procedure GetLocalVendAccountNo(VendLedgerEntry: Record "Vendor Ledger Entry"; var AccountNo: Code[20]; var IsHandled: Boolean) + var + VendPostingGr: Record "Vendor Posting Group"; + begin + AccountNo := ''; + IsHandled := false; + VendLedgerEntry.TestField("Vendor Posting Group"); + VendPostingGr.Get(VendLedgerEntry."Vendor Posting Group"); + case true of + (VendLedgerEntry."Document Type" = VendLedgerEntry."Document Type"::Invoice) and + (VendLedgerEntry."Document Status" = VendLedgerEntry."Document Status"::" ") and + (VendLedgerEntry."Document Situation" = VendLedgerEntry."Document Situation"::" "): + AccountNo := VendPostingGr.GetPayablesAccount(); + (VendLedgerEntry."Document Type" = VendLedgerEntry."Document Type"::Invoice) and + (VendLedgerEntry."Document Status" = VendLedgerEntry."Document Status"::Open) and + (VendLedgerEntry."Document Situation" = VendLedgerEntry."Document Situation"::"Posted BG/PO"): + AccountNo := VendPostingGr.GetInvoicesInPmtOrderAccount(); + (VendLedgerEntry."Document Type" = VendLedgerEntry."Document Type"::Bill) and + (VendLedgerEntry."Document Status" = VendLedgerEntry."Document Status"::Open) and + (VendLedgerEntry."Document Situation" in [VendLedgerEntry."Document Situation"::Cartera, + VendLedgerEntry."Document Situation"::"BG/PO"]): + AccountNo := VendPostingGr.GetBillsAccount(); + (VendLedgerEntry."Document Type" = VendLedgerEntry."Document Type"::Bill) and + (VendLedgerEntry."Document Status" = VendLedgerEntry."Document Status"::Open) and + (VendLedgerEntry."Document Situation" = VendLedgerEntry."Document Situation"::"Posted BG/PO"): + AccountNo := VendPostingGr.GetBillsInPmtOrderAccount(); + end; + IsHandled := AccountNo <> ''; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Exch. Rate Adjmt. Process", 'OnAdjustVendorLedgerEntryOnAfterPrepareAdjust', '', false, false)] + local procedure CreateLocalVendDocuments(var VendorLedgerEntry: Record "Vendor Ledger Entry"; CurrAdjAmount: Decimal; OldAdjAmount: Decimal) + begin + CreateVendCarteraDocuments(VendorLedgerEntry, CurrAdjAmount, OldAdjAmount); + end; + + local procedure CreateVendCarteraDocuments(var VendorLedgerEntry: Record "Vendor Ledger Entry"; CurrAdjAmount: Decimal; OldAdjAmount: Decimal) + var + CarteraDoc: Record "Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + PostedCarteraDoc: Record "Posted Cartera Doc."; + begin + VendorLedgerEntry.CalcFields( + Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)", "Original Amt. (LCY)", + "Debit Amount", "Credit Amount", "Debit Amount (LCY)", "Credit Amount (LCY)"); + if VendorLedgerEntry."Document Situation" <> VendorLedgerEntry."Document Situation"::" " then + case VendorLedgerEntry."Document Situation" of + VendorLedgerEntry."Document Situation"::Cartera: + if CarteraDoc.Get(CarteraDoc.Type::Payable, VendorLedgerEntry."Entry No.") then begin + CarteraDoc."Remaining Amt. (LCY)" := Abs(VendorLedgerEntry."Remaining Amt. (LCY)" + CurrAdjAmount); + CarteraDoc."Original Amount (LCY)" := Abs(VendorLedgerEntry."Original Amt. (LCY)" + CurrAdjAmount); + CarteraDoc."Adjusted Amount" := -CurrAdjAmount; + CarteraDoc.Adjusted := true; + CarteraDoc.Modify(); + end; + VendorLedgerEntry."Document Situation"::"Posted BG/PO": + if PostedCarteraDoc.Get(PostedCarteraDoc.Type::Payable, VendorLedgerEntry."Entry No.") then begin + PostedCarteraDoc."Remaining Amt. (LCY)" := VendorLedgerEntry."Remaining Amt. (LCY)"; + PostedCarteraDoc."Adjusted Amount" := CurrAdjAmount + OldAdjAmount; + PostedCarteraDoc.ReAdjusted := true; + PostedCarteraDoc.Modify(); + end; + VendorLedgerEntry."Document Situation"::"Closed BG/PO", + VendorLedgerEntry."Document Situation"::"Closed Documents": + if ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Payable, VendorLedgerEntry."Entry No.") then begin + ClosedCarteraDoc."Remaining Amt. (LCY)" := VendorLedgerEntry."Remaining Amt. (LCY)"; + ClosedCarteraDoc.Modify(); + end; + end; + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTCashReceiptJournal.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTCashReceiptJournal.PageExt.al new file mode 100644 index 00000000000..462161199f2 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTCashReceiptJournal.PageExt.al @@ -0,0 +1,29 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; + +pageextension 7000165 "CRT Cash Receipt Journal" extends "Cash Receipt Journal" +{ + layout + { + addafter("Document No.") + { + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a number for this bill generated from the journal.'; + Visible = false; + } + } + addafter("Applies-to Doc. No.") + { + field("Applies-to Bill No."; Rec."Applies-to Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bill to be settled.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGenJournalLine.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGenJournalLine.Codeunit.al new file mode 100644 index 00000000000..24431583764 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGenJournalLine.Codeunit.al @@ -0,0 +1,61 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; + +using Microsoft.Foundation.PaymentTerms; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Receivables; + +codeunit 7000094 "CRT Gen. Journal Line" +{ + [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", OnLookUpAppliesToDocCustOnAfterUpdateDocumentTypeAndAppliesTo, '', false, false)] + local procedure OnLookUpAppliesToDocCustOnAfterUpdateDocumentTypeAndAppliesTo(var GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry") + begin + GenJournalLine."Applies-to Bill No." := CustLedgerEntry."Bill No."; + end; + + [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", OnLookUpAppliesToDocVendOnAfterUpdateDocumentTypeAndAppliesTo, '', false, false)] + local procedure OnLookUpAppliesToDocVendOnAfterUpdateDocumentTypeAndAppliesTo(var GenJournalLine: Record "Gen. Journal Line"; VendorLedgerEntry: Record "Vendor Ledger Entry") + begin + GenJournalLine."Applies-to Bill No." := VendorLedgerEntry."Bill No."; + end; + + [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", OnFindFirstCustLedgEntryWithAppliesToDocNoOnAfterSetFilters, '', false, false)] + local procedure OnFindFirstCustLedgEntryWithAppliesToDocNoOnAfterSetFilters(var GenJournalLine: Record "Gen. Journal Line"; AccNo: Code[20]; var CustLedgEntry: Record "Cust. Ledger Entry") + begin + CustLedgEntry.SetRange("Bill No.", GenJournalLine."Applies-to Bill No."); + end; + + [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", OnFindFirstVendLedgEntryWithAppliesToDocNoOnAfterSetFilters, '', false, false)] + local procedure OnFindFirstVendLedgEntryWithAppliesToDocNoOnAfterSetFilters(var GenJournalLine: Record "Gen. Journal Line"; AccNo: Code[20]; var VendorLedgerEntry: Record "Vendor Ledger Entry") + begin + VendorLedgerEntry.SetRange("Bill No.", GenJournalLine."Applies-to Bill No."); + end; + + [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", OnValidatePaymentTermsCodeOnBeforeCalculatePmtDiscountDate, '', false, false)] + local procedure OnValidatePaymentTermsCodeOnBeforeCalculatePmtDiscountDate(var GenJournalLine: Record "Gen. Journal Line"; PaymentTerms: Record "Payment Terms"; var IsHandled: Boolean) + begin + case GenJournalLine."Document Type" of + GenJournalLine."Document Type"::Invoice: + GenJournalLine.AdjustDueDate(PaymentTerms.CalculateMaxDueDate(GenJournalLine."Document Date")); + GenJournalLine."Document Type"::"Credit Memo": + GenJournalLine.AdjustDueDate(99991231D); + end; + end; + + [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", OnValidatePaymentTermsCodeOnElseCase, '', false, false)] + local procedure OnValidatePaymentTermsCodeOnElseCase(var Rec: Record "Gen. Journal Line"; var PaymentTerms: Record "Payment Terms"; var IsHandled: Boolean) + begin + if not (Rec."Document Type" = Rec."Document Type"::Bill) then + exit; + + if (Rec."Payment Terms Code" <> '') and (Rec."Document Date" <> 0D) then begin + PaymentTerms.Get(Rec."Payment Terms Code"); + Rec."Due Date" := CalcDate(PaymentTerms."Due Date Calculation", Rec."Document Date"); + Rec.AdjustDueDate(99991231D); + end else + Rec."Due Date" := Rec."Document Date"; + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGenJournalLine.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGenJournalLine.TableExt.al new file mode 100644 index 00000000000..7826068c576 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGenJournalLine.TableExt.al @@ -0,0 +1,50 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; + +using Microsoft.Finance.ReceivablesPayables; + +tableextension 7000090 "CRT Gen. Journal Line" extends "Gen. Journal Line" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = CustomerContent; + } + field(7000001; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } +#if not CLEANSCHEMA25 + field(7000003; "Pmt. Address Code"; Code[10]) + { + Caption = 'Pmt. Address Code'; + DataClassification = CustomerContent; + ObsoleteReason = 'Address is taken from the fields Address, City, etc. of Customer/Vendor table.'; + ObsoleteState = Removed; + ObsoleteTag = '25.0'; + } +#endif + } + + [Scope('OnPrem')] + procedure AdjustDueDate(MaxDate: Date) + var + DueDateAdjust: Codeunit "Due Date-Adjust"; + begin + case "Account Type" of + "Account Type"::Customer: + if "Bill-to/Pay-to No." <> '' then + DueDateAdjust.SalesAdjustDueDate("Due Date", "Document Date", MaxDate, "Bill-to/Pay-to No.") + else + DueDateAdjust.SalesAdjustDueDate("Due Date", "Document Date", MaxDate, "Account No."); + "Account Type"::Vendor: + DueDateAdjust.PurchAdjustDueDate("Due Date", "Document Date", MaxDate, "Account No."); + end; + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGeneralJournal.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGeneralJournal.PageExt.al new file mode 100644 index 00000000000..1ce443098de --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTGeneralJournal.PageExt.al @@ -0,0 +1,30 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; + +pageextension 7000166 "CRT General Journal" extends "General Journal" +{ + layout + { + addafter("Document No.") + { + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a number for this bill generated from the journal.'; + Visible = false; + } + } + addafter("Applies-to Doc. No.") + { + field("Applies-to Bill No."; Rec."Applies-to Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bill to be settled.'; + Visible = false; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPaymentJournal.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPaymentJournal.PageExt.al new file mode 100644 index 00000000000..5d91ab63f9e --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPaymentJournal.PageExt.al @@ -0,0 +1,29 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; + +pageextension 7000167 "CRT Payment Journal" extends "Payment Journal" +{ + layout + { + addafter("Document No.") + { + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a number for this bill generated from the journal.'; + Visible = false; + } + } + addafter(AppliesToDocNo) + { + field("Applies-to Bill No."; Rec."Applies-to Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bill to be settled.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPostedGenJournalLine.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPostedGenJournalLine.TableExt.al new file mode 100644 index 00000000000..6bffba5d5b0 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPostedGenJournalLine.TableExt.al @@ -0,0 +1,22 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; + +tableextension 7000092 "CRT Posted Gen. Journal Line" extends "Posted Gen. Journal Line" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = CustomerContent; + } + field(7000001; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPurchaseJournal.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPurchaseJournal.PageExt.al new file mode 100644 index 00000000000..eee587e1f82 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTPurchaseJournal.PageExt.al @@ -0,0 +1,29 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; + +pageextension 7000168 "CRT Purchase Journal" extends "Purchase Journal" +{ + layout + { + addafter("Document No.") + { + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a number for this bill generated from the journal.'; + Visible = false; + } + } + addafter("Applies-to Doc. No.") + { + field("Applies-to Bill No."; Rec."Applies-to Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bill to be settled.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTSalesJournal.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTSalesJournal.PageExt.al new file mode 100644 index 00000000000..6aa256609ee --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Journal/CRTSalesJournal.PageExt.al @@ -0,0 +1,29 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Journal; + +pageextension 7000169 "CRT Sales Journal" extends "Sales Journal" +{ + layout + { + addafter("Document No.") + { + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a number for this bill generated from the journal.'; + Visible = false; + } + } + addafter("Applies-to Doc. No.") + { + field("Applies-to Bill No."; Rec."Applies-to Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bill to be settled.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CRTGLEntry.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CRTGLEntry.TableExt.al new file mode 100644 index 00000000000..b511b5ffd1b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CRTGLEntry.TableExt.al @@ -0,0 +1,17 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Ledger; + +tableextension 7000085 "CRT G/L Entry" extends "G/L Entry" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = CustomerContent; + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CRTGeneralLedgerEntries.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CRTGeneralLedgerEntries.PageExt.al new file mode 100644 index 00000000000..ce3b09f0729 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CRTGeneralLedgerEntries.PageExt.al @@ -0,0 +1,21 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Ledger; + +pageextension 7000158 "CRT General Ledger Entries" extends "General Ledger Entries" +{ + layout + { + addafter("Document No.") + { + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the bill number related to the ledger entry.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CarteraGeneralLedger.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CarteraGeneralLedger.Codeunit.al new file mode 100644 index 00000000000..b6c1a7cbd32 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/GeneralLedger/Ledger/CarteraGeneralLedger.Codeunit.al @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.GeneralLedger.Ledger; + +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.Payables; + +codeunit 7000081 "Cartera General Ledger" +{ + + [EventSubscriber(ObjectType::Table, Database::"G/L Entry", 'OnAfterCopyGLEntryFromGenJnlLine', '', true, true)] + local procedure OnAfterCopyGLEntryFromGenJnlLine(var GLEntry: Record "G/L Entry"; var GenJournalLine: Record "Gen. Journal Line") + begin + GLEntry."Bill No." := GenJournalLine."Bill No."; + end; + + [EventSubscriber(ObjectType::Table, Database::"CV Ledger Entry Buffer", 'OnAfterCopyFromVendLedgerEntry', '', true, true)] + local procedure OnAfterCopyFromVendLedgerEntry(var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer"; VendorLedgerEntry: Record "Vendor Ledger Entry") + begin + CVLedgerEntryBuffer."Bill No." := VendorLedgerEntry."Bill No."; + CVLedgerEntryBuffer."Document Situation" := VendorLedgerEntry."Document Situation"; + CVLedgerEntryBuffer."Applies-to Bill No." := VendorLedgerEntry."Applies-to Bill No."; + CVLedgerEntryBuffer."Document Status" := VendorLedgerEntry."Document Status"; + end; + + [EventSubscriber(ObjectType::Table, Database::"Detailed CV Ledg. Entry Buffer", 'OnAfterCopyFromGenJnlLine', '', true, true)] + local procedure OnAfterCopyFromGenJnlLine(var DtldCVLedgEntryBuffer: Record "Detailed CV Ledg. Entry Buffer"; GenJnlLine: Record "Gen. Journal Line") + begin + DtldCVLedgEntryBuffer."Bill No." := GenJnlLine."Bill No."; + DtldCVLedgEntryBuffer."Applies-to Bill No." := GenJnlLine."Applies-to Bill No."; + end; + + [EventSubscriber(ObjectType::Table, Database::"Detailed CV Ledg. Entry Buffer", 'OnBeforeCreateDtldCVLedgEntryBuf', '', true, true)] + local procedure OnBeforeCreateDtldCVLedgEntryBuf(var DtldCVLedgEntryBuf: Record "Detailed CV Ledg. Entry Buffer"; var NewDtldCVLedgEntryBuf: Record "Detailed CV Ledg. Entry Buffer"; var NextDtldBufferEntryNo: Integer; var IsHandled: Boolean; var CVLedgEntryBuf: Record "CV Ledger Entry Buffer") + begin + DtldCVLedgEntryBuf.SetRange("Bill No.", NewDtldCVLedgEntryBuf."Bill No."); + DtldCVLedgEntryBuf.SetRange("Document Situation", NewDtldCVLedgEntryBuf."Document Situation"); + DtldCVLedgEntryBuf.SetRange("Document Status", NewDtldCVLedgEntryBuf."Document Status"); + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentLine.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentLine.Table.al new file mode 100644 index 00000000000..6daf9e6335a --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentLine.Table.al @@ -0,0 +1,114 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +table 7000008 "BG/PO Comment Line" +{ + Caption = 'BG/PO Comment Line'; + DrillDownPageID = "BG/PO Comment List"; + LookupPageID = "BG/PO Comment List"; + DataClassification = CustomerContent; + + fields + { + field(2; "BG/PO No."; Code[20]) + { + Caption = 'BG/PO No.'; + NotBlank = true; + } + field(3; "Line No."; Integer) + { + Caption = 'Line No.'; + } + field(4; Date; Date) + { + Caption = 'Date'; + } + field(5; "Code"; Code[10]) + { + Caption = 'Code'; + } + field(6; Comment; Text[80]) + { + Caption = 'Comment'; + } + field(7; Type; Enum "Cartera Document Type") + { + Caption = 'Type'; + } + } + + keys + { + key(Key1; "BG/PO No.", Type, "Line No.") + { + Clustered = true; + } + } + + fieldgroups + { + } + + [Scope('OnPrem')] + procedure SetUpNewLine() + var + BGPOCommentLine: Record "BG/PO Comment Line"; + begin + BGPOCommentLine.SetRange("BG/PO No.", "BG/PO No."); + BGPOCommentLine.SetRange(Type, Type); + if not BGPOCommentLine.FindFirst() then + Date := WorkDate(); + end; + + procedure Caption(): Text + var + BillGr: Record "Bill Group"; + PostedBillGr: Record "Posted Bill Group"; + ClosedBillGr: Record "Closed Bill Group"; + PmtOrd: Record "Payment Order"; + PostedPmtOrd: Record "Posted Payment Order"; + ClosedPmtOrd: Record "Closed Payment Order"; + begin + case true of + BillGr.Get("BG/PO No."): + begin + BillGr.CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', BillGr."No.", BillGr."Bank Account Name")); + end; + PostedBillGr.Get("BG/PO No."): + begin + PostedBillGr.CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', PostedBillGr."No.", PostedBillGr."Bank Account Name")); + end; + ClosedBillGr.Get("BG/PO No."): + begin + ClosedBillGr.CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', ClosedBillGr."No.", ClosedBillGr."Bank Account Name")); + end; + PmtOrd.Get("BG/PO No."): + begin + PmtOrd.CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', PmtOrd."No.", PmtOrd."Bank Account Name")); + end; + PostedPmtOrd.Get("BG/PO No."): + begin + PostedPmtOrd.CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', PostedPmtOrd."No.", PostedPmtOrd."Bank Account Name")); + end; + ClosedPmtOrd.Get("BG/PO No."): + begin + ClosedPmtOrd.CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', ClosedPmtOrd."No.", ClosedPmtOrd."Bank Account Name")); + end; + end; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentList.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentList.Page.al new file mode 100644 index 00000000000..5cc9af9ce48 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentList.Page.al @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 7000024 "BG/PO Comment List" +{ + Caption = 'BG/PO Comment List'; + DataCaptionExpression = Rec.Caption(); + Editable = false; + PageType = List; + SourceTable = "BG/PO Comment Line"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("BG/PO No."; Rec."BG/PO No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bill group/payment order in which the comment line is included.'; + } + field(Date; Rec.Date) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date when the comment was entered.'; + } + field(Comment; Rec.Comment) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the comment text to include in the comment line for the bill group/payment order.'; + } + } + } + } + + actions + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentSheet.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentSheet.Page.al new file mode 100644 index 00000000000..ed106703634 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOCommentSheet.Page.al @@ -0,0 +1,60 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 7000025 "BG/PO Comment Sheet" +{ + AutoSplitKey = true; + Caption = 'BG/PO Comment Sheet'; + DataCaptionExpression = Rec.Caption(); + MultipleNewLines = true; + PageType = List; + SourceTable = "BG/PO Comment Line"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field(Date; Rec.Date) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date when the comment was entered.'; + } + field(Comment; Rec.Comment) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the comment text to include in the comment line for the bill group/payment order.'; + } + field("Code"; Rec.Code) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a code identifying this comment line to include in a bill group/payment order.'; + Visible = false; + } + } + } + area(factboxes) + { + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + } + + trigger OnNewRecord(BelowxRec: Boolean) + begin + Rec.SetUpNewLine(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOMaturityLines.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOMaturityLines.Page.al new file mode 100644 index 00000000000..4026b06e0a9 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOMaturityLines.Page.al @@ -0,0 +1,176 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Foundation.Enums; +using Microsoft.Foundation.Period; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Receivables; +using System.Utilities; + +page 7000032 "BG/PO Maturity Lines" +{ + Caption = 'Lines'; + PageType = ListPart; + SourceTable = Date; + + layout + { + area(content) + { + repeater(Control1) + { + Editable = false; + ShowCaption = false; + field("Period Start"; Rec."Period Start") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the starting date of the period that you want to view.'; + } + field("Period Name"; Rec."Period Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the period shown on the line.'; + } + field(DocAmount; DocAmount) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = CurrCode; + AutoFormatType = 1; + Caption = 'Amount'; + DrillDown = true; + ToolTip = 'Specifies the amount for the bill group or payment order for the period.'; + + trigger OnDrillDown() + begin + ShowDocEntries(); + end; + } + field(DocAmountLCY; DocAmountLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount (LCY)'; + ToolTip = 'Specifies the amount for the bill group or payment order for the period.'; + + trigger OnDrillDown() + begin + ShowDocEntries(); + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + SetDateFilter(); + if Type = Type::Receivable then begin + BillGr.CalcFields(Amount, "Amount (LCY)"); + DocAmount := BillGr.Amount; + DocAmountLCY := BillGr."Amount (LCY)"; + end; + if Type = Type::Payable then begin + PmtOrd.CalcFields(Amount, "Amount (LCY)"); + DocAmount := PmtOrd.Amount; + DocAmountLCY := PmtOrd."Amount (LCY)"; + end; + end; + + trigger OnFindRecord(Which: Text): Boolean + begin + exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); + end; + + trigger OnNextRecord(Steps: Integer): Integer + begin + exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); + end; + + trigger OnOpenPage() + begin + Rec.Reset(); + end; + + var + BillGr: Record "Bill Group"; + PmtOrd: Record "Payment Order"; + Doc: Record "Cartera Doc."; + PeriodPageManagement: Codeunit PeriodPageManagement; + PeriodLength: Enum "Analysis Period Type"; + AmountType: Enum "Analysis Amount Type"; + DocAmount: Decimal; + DocAmountLCY: Decimal; + Type: Option Receivable,Payable; + CurrCode: Code[10]; + + [Scope('OnPrem')] + procedure SetReceivable(var NewBillGr: Record "Bill Group"; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") + begin + BillGr.Copy(NewBillGr); + PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); + AmountType := "Analysis Amount Type".FromInteger(NewAmountType); + Type := Type::Receivable; + CurrCode := BillGr."Currency Code"; + CurrPage.Update(false); + end; + + [Scope('OnPrem')] + procedure SetPayable(var NewPmtOrd: Record "Payment Order"; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") + begin + PmtOrd.Copy(NewPmtOrd); + PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); + AmountType := "Analysis Amount Type".FromInteger(NewAmountType); + Type := Type::Payable; + CurrCode := PmtOrd."Currency Code"; + CurrPage.Update(false); + end; + + [Scope('OnPrem')] + procedure SetDateFilter() + begin + if Type = Type::Receivable then + if AmountType = AmountType::"Net Change" then + BillGr.SetRange("Due Date Filter", Rec."Period Start", Rec."Period End") + else + BillGr.SetRange("Due Date Filter", 0D, Rec."Period End"); + if Type = Type::Payable then + if AmountType = AmountType::"Net Change" then + PmtOrd.SetRange("Due Date Filter", Rec."Period Start", Rec."Period End") + else + PmtOrd.SetRange("Due Date Filter", 0D, Rec."Period End"); + end; + + local procedure ShowDocEntries() + begin + SetDateFilter(); + if Type = Type::Receivable then begin + Doc.SetRange(Type, Type::Receivable); + Doc.SetRange("Bill Gr./Pmt. Order No.", BillGr."No."); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetFilter("Due Date", BillGr.GetFilter("Due Date Filter")); + Doc.SetFilter("Global Dimension 1 Code", BillGr.GetFilter("Global Dimension 1 Filter")); + Doc.SetFilter("Global Dimension 2 Code", BillGr.GetFilter("Global Dimension 2 Filter")); + Doc.SetFilter("Category Code", BillGr.GetFilter("Category Filter")); + end; + if Type = Type::Payable then begin + Doc.SetRange(Type, Type::Payable); + Doc.SetRange("Bill Gr./Pmt. Order No.", PmtOrd."No."); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetFilter("Due Date", PmtOrd.GetFilter("Due Date Filter")); + Doc.SetFilter("Global Dimension 1 Code", PmtOrd.GetFilter("Global Dimension 1 Filter")); + Doc.SetFilter("Global Dimension 2 Code", PmtOrd.GetFilter("Global Dimension 2 Filter")); + Doc.SetFilter("Category Code", PmtOrd.GetFilter("Category Filter")); + end; + + PAGE.RunModal(0, Doc); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOPostBuffer.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOPostBuffer.Table.al new file mode 100644 index 00000000000..51f6d0d2107 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOPostBuffer.Table.al @@ -0,0 +1,75 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.Dimension; + +table 7000012 "BG/PO Post. Buffer" +{ + Caption = 'BG/PO Post. Buffer'; + DataClassification = CustomerContent; + + fields + { + field(1; Account; Code[20]) + { + Caption = 'Account'; + DataClassification = SystemMetadata; + } + field(2; "Balance Account"; Code[20]) + { + Caption = 'Balance Account'; + DataClassification = SystemMetadata; + } + field(3; Amount; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount'; + DataClassification = SystemMetadata; + } + field(4; "Gain - Loss Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Gain - Loss Amount (LCY)'; + DataClassification = SystemMetadata; + } + field(5; "Global Dimension 1 Code"; Code[20]) + { + Caption = 'Global Dimension 1 Code'; + DataClassification = SystemMetadata; + } + field(6; "Global Dimension 2 Code"; Code[20]) + { + Caption = 'Global Dimension 2 Code'; + DataClassification = SystemMetadata; + } + field(7; "Entry No."; Integer) + { + Caption = 'Entry No.'; + DataClassification = SystemMetadata; + } + field(480; "Dimension Set ID"; Integer) + { + Caption = 'Dimension Set ID'; + DataClassification = SystemMetadata; + TableRelation = "Dimension Set Entry"; + } + } + + keys + { + key(Key1; Account, "Balance Account", "Entry No.") + { + Clustered = true; + } + } + + fieldgroups + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOPostandPrint.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOPostandPrint.Codeunit.al new file mode 100644 index 00000000000..814962588d5 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/BGPOPostandPrint.Codeunit.al @@ -0,0 +1,184 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +codeunit 7000003 "BG/PO-Post and Print" +{ + Permissions = TableData "Bill Group" = rm, + TableData "Posted Bill Group" = rm, + TableData "Closed Bill Group" = rm, + TableData "Payment Order" = rm, + TableData "Posted Payment Order" = rm, + TableData "Closed Payment Order" = rm; + + trigger OnRun() + begin + end; + + var + Text1100000: Label 'This Bill Group has not been printed. Do you want to continue?'; + Text1100001: Label 'The posting process has been cancelled by the user.'; + Text1100002: Label 'Do you want to post the Bill Group?'; + Text1100003: Label 'This Payment Order has not been printed. Do you want to continue?'; + Text1100004: Label 'Do you want to post the Payment Order?'; + CarteraReportSelection: Record "Cartera Report Selections"; + + procedure ReceivablePostOnly(BillGr: Record "Bill Group") + begin + if BillGr."No. Printed" = 0 then begin + if not Confirm(Text1100000) then + Error(Text1100001); + end else + if not Confirm(Text1100002, false) then + Error(Text1100001); + + BillGr.SetRecFilter(); + REPORT.RunModal(REPORT::"Post Bill Group", BillGr."Dealing Type" = BillGr."Dealing Type"::Discount, false, BillGr); + end; + + procedure ReceivablePostAndPrint(BillGr: Record "Bill Group") + var + PostedBillGr: Record "Posted Bill Group"; + begin + BillGr.SetRecFilter(); + REPORT.RunModal(REPORT::"Post Bill Group", BillGr."Dealing Type" = BillGr."Dealing Type"::Discount, false, BillGr); + + Commit(); + + if PostedBillGr.Get(BillGr."No.") then begin + PostedBillGr.SetRecFilter(); + CarteraReportSelection.Reset(); + CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Posted Bill Group"); + CarteraReportSelection.Find('-'); + repeat + CarteraReportSelection.TestField("Report ID"); + REPORT.Run(CarteraReportSelection."Report ID", false, false, PostedBillGr); + until CarteraReportSelection.Next() = 0; + end; + end; + + procedure PayablePostOnly(PmtOrd: Record "Payment Order") + var + IsHandled: Boolean; + begin + OnBeforePayablePostOnly(PmtOrd, IsHandled); + if not IsHandled then + if PmtOrd."No. Printed" = 0 then begin + if not Confirm(Text1100003) then + Error(Text1100001); + end else + if not Confirm(Text1100004, false) then + Error(Text1100001); + + PmtOrd.SetRecFilter(); + REPORT.RunModal(REPORT::"Post Payment Order", false, false, PmtOrd); + + OnAfterPayablePostOnly(PmtOrd); + end; + + procedure PayablePostAndPrint(PmtOrd: Record "Payment Order") + var + PostedPmtOrd: Record "Posted Payment Order"; + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforePayablePostAndPrint(PmtOrd, IsHandled); + if not IsHandled then begin + PmtOrd.SetRecFilter(); + REPORT.RunModal(REPORT::"Post Payment Order", false, false, PmtOrd); + + Commit(); + + if PostedPmtOrd.Get(PmtOrd."No.") then begin + PostedPmtOrd.SetRecFilter(); + CarteraReportSelection.Reset(); + CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Posted Payment Order"); + CarteraReportSelection.Find('-'); + repeat + CarteraReportSelection.TestField("Report ID"); + REPORT.Run(CarteraReportSelection."Report ID", false, false, PostedPmtOrd); + until CarteraReportSelection.Next() = 0; + end; + end; + + OnAfterPayablePostAndPrint(PmtOrd); + end; + + procedure PrintCounter("Table": Integer; Number: Code[20]) + var + PostedBillGr: Record "Posted Bill Group"; + ClosedBillGr: Record "Closed Bill Group"; + PostedPaymentOrder: Record "Posted Payment Order"; + ClosedPaymentOrder: Record "Closed Payment Order"; + BillGr: Record "Bill Group"; + PaymentOrder: Record "Payment Order"; + begin + case true of + Table = DATABASE::"Bill Group": + begin + BillGr.Get(Number); + BillGr."No. Printed" := BillGr."No. Printed" + 1; + BillGr.Modify(); + end; + Table = DATABASE::"Payment Order": + begin + PaymentOrder.Get(Number); + PaymentOrder."No. Printed" := PaymentOrder."No. Printed" + 1; + PaymentOrder.Modify(); + end; + Table = DATABASE::"Posted Bill Group": + begin + PostedBillGr.Get(Number); + PostedBillGr."No. Printed" := PostedBillGr."No. Printed" + 1; + PostedBillGr.Modify(); + end; + Table = DATABASE::"Closed Bill Group": + begin + ClosedBillGr.Get(Number); + ClosedBillGr."No. Printed" := ClosedBillGr."No. Printed" + 1; + ClosedBillGr.Modify(); + end; + Table = DATABASE::"Posted Payment Order": + begin + PostedPaymentOrder.Get(Number); + PostedPaymentOrder."No. Printed" := PostedPaymentOrder."No. Printed" + 1; + PostedPaymentOrder.Modify(); + end; + Table = DATABASE::"Closed Payment Order": + begin + ClosedPaymentOrder.Get(Number); + ClosedPaymentOrder."No. Printed" := ClosedPaymentOrder."No. Printed" + 1; + ClosedPaymentOrder.Modify(); + end; + end; + Commit(); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterPayablePostOnly(var PaymentOrder: Record "Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterPayablePostAndPrint(var PaymentOrder: Record "Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforePayablePostOnly(var PaymentOrder: Record "Payment Order"; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforePayablePostAndPrint(var PaymentOrder: Record "Payment Order"; var IsHandled: Boolean) + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CRTCVLedgerEntryBuffer.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CRTCVLedgerEntryBuffer.TableExt.al new file mode 100644 index 00000000000..a38d1c2ae39 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CRTCVLedgerEntryBuffer.TableExt.al @@ -0,0 +1,42 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft; +using Microsoft.Sales.Receivables; + +tableextension 7000086 "CRT CVLedgerEntryBuffer" extends "CV Ledger Entry Buffer" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = SystemMetadata; + } + field(7000001; "Document Situation"; Enum "ES Document Situation") + { + Caption = 'Document Situation'; + DataClassification = SystemMetadata; + } + field(7000002; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = SystemMetadata; + } + field(7000003; "Document Status"; Enum "ES Document Status") + { + Caption = 'Document Status'; + DataClassification = SystemMetadata; + } + field(7000004; "CV Ledger Entry Type"; Option) + { + Caption = 'CV Ledger Entry Type'; + DataClassification = SystemMetadata; + OptionCaption = 'Customer,Vendor'; + OptionMembers = Customer,Vendor; + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CRTDetailedCVLedgEntryBuffer.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CRTDetailedCVLedgEntryBuffer.TableExt.al new file mode 100644 index 00000000000..02aa5b96a75 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CRTDetailedCVLedgEntryBuffer.TableExt.al @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft; +using Microsoft.Sales.Receivables; + +tableextension 7000088 "CRT DetailedCVLedgEntryBuffer" extends "Detailed CV Ledg. Entry Buffer" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = SystemMetadata; + } + field(7000001; "Document Situation"; Enum "ES Document Situation") + { + Caption = 'Document Situation'; + DataClassification = SystemMetadata; + } + field(7000002; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = SystemMetadata; + } + field(7000003; "Document Status"; Enum "ES Document Status") + { + Caption = 'Document Status'; + DataClassification = SystemMetadata; + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDealingType.Enum.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDealingType.Enum.al new file mode 100644 index 00000000000..82e5823cba2 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDealingType.Enum.al @@ -0,0 +1,14 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +enum 7000026 "Cartera Dealing Type" +{ + Extensible = true; + AssignmentCompatibility = true; + + value(0; "Collection") { Caption = 'Collection'; } + value(1; "Discount") { Caption = 'Discount'; } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDoc.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDoc.Table.al new file mode 100644 index 00000000000..870ac3a6d7d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDoc.Table.al @@ -0,0 +1,449 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.DirectDebit; +using Microsoft.EServices.EDocument; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.PaymentTerms; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +table 7000002 "Cartera Doc." +{ + Caption = 'Cartera Doc.'; + DrillDownPageID = "Cartera Documents"; + LookupPageID = "Cartera Documents"; + Permissions = TableData "Cartera Doc." = rm; + DataClassification = CustomerContent; + + fields + { + field(1; Type; Enum "Cartera Document Type") + { + Caption = 'Type'; + } + field(2; "Entry No."; Integer) + { + Caption = 'Entry No.'; + } + field(3; "No."; Code[20]) + { + Caption = 'No.'; + } + field(4; "Posting Date"; Date) + { + Caption = 'Posting Date'; + } + field(5; "Document No."; Code[20]) + { + Caption = 'Document No.'; + } + field(6; Description; Text[100]) + { + Caption = 'Description'; + } + field(9; "Remaining Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Remaining Amount'; + } + field(10; "Remaining Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Remaining Amt. (LCY)'; + } + field(11; "Due Date"; Date) + { + Caption = 'Due Date'; + + trigger OnValidate() + var + DocEdit: Codeunit "Document-Edit"; + begin + CheckDueDate(); + DocEdit.EditDueDate(Rec); + + Modify(); + ResetNoPrinted(); + end; + } + field(12; "Payment Method Code"; Code[10]) + { + Caption = 'Payment Method Code'; + TableRelation = "Payment Method"; + } + field(13; Accepted; Option) + { + Caption = 'Accepted'; + OptionCaption = 'Not Required,Yes,No'; + OptionMembers = "Not Required",Yes,No; + } + field(14; Place; Boolean) + { + Caption = 'Place'; + } + field(15; "Collection Agent"; Option) + { + Caption = 'Collection Agent'; + OptionCaption = 'Direct,Bank'; + OptionMembers = Direct,Bank; + } + field(16; "Bill Gr./Pmt. Order No."; Code[20]) + { + Caption = 'Bill Gr./Pmt. Order No.'; + TableRelation = if (Type = const(Receivable)) "Bill Group"."No." + else + if (Type = const(Payable)) "Payment Order"."No."; + } + field(17; "Category Code"; Code[10]) + { + Caption = 'Category Code'; + TableRelation = "Category Code"; + } + field(18; "Account No."; Code[20]) + { + Caption = 'Account No.'; + TableRelation = if (Type = const(Receivable)) Customer + else + if (Type = const(Payable)) Vendor; + } + field(19; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + TableRelation = Currency; + } + field(20; "Cust./Vendor Bank Acc. Code"; Code[20]) + { + Caption = 'Cust./Vendor Bank Acc. Code'; + TableRelation = if (Type = const(Receivable)) "Customer Bank Account".Code where("Customer No." = field("Account No.")) + else + if (Type = const(Payable)) "Vendor Bank Account".Code where("Vendor No." = field("Account No.")); + + trigger OnValidate() + begin + ResetNoPrinted(); + UpdateDirectDebitMandate(); + end; + } +#if not CLEANSCHEMA25 + field(21; "Pmt. Address Code"; Code[10]) + { + Caption = 'Pmt. Address Code'; + ObsoleteReason = 'Address is taken from the fields Address, City, etc. of Customer/Vendor table.'; + ObsoleteState = Removed; + ObsoleteTag = '25.0'; + } +#endif + field(22; "Global Dimension 1 Code"; Code[20]) + { + CaptionClass = '1,1,1'; + Caption = 'Global Dimension 1 Code'; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(23; "Global Dimension 2 Code"; Code[20]) + { + CaptionClass = '1,1,2'; + Caption = 'Global Dimension 2 Code'; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(29; "Original Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Original Amount'; + } + field(30; "Original Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Original Amount (LCY)'; + } + field(40; "Document Type"; Enum "Cartera Document Doc. Type") + { + Caption = 'Document Type'; + Editable = false; + } + field(45; "On Hold"; Boolean) + { + CalcFormula = exist("Vendor Ledger Entry" where("On Hold" = filter(<> ''), + "Entry No." = field("Entry No."))); + Caption = 'On Hold'; + FieldClass = FlowField; + } + field(46; Adjusted; Boolean) + { + Caption = 'Adjusted'; + } + field(48; "Adjusted Amount"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Adjusted Amount'; + } + field(49; "From Journal"; Boolean) + { + Caption = 'From Journal'; + } + field(50; "Elect. Pmts Exported"; Boolean) + { + Caption = 'Elect. Pmts Exported'; + } + field(51; "Export File Name"; Text[30]) + { + Caption = 'Export File Name'; + } + field(52; "Transfer Type"; Option) + { + Caption = 'Transfer Type'; + OptionCaption = 'National,International,Special'; + OptionMembers = National,International,Special; + } + field(480; "Dimension Set ID"; Integer) + { + Caption = 'Dimension Set ID'; + Editable = false; + TableRelation = "Dimension Set Entry"; + + trigger OnLookup() + begin + Rec.ShowDimensions(); + end; + + trigger OnValidate() + var + DimMgt: Codeunit DimensionManagement; + begin + DimMgt.UpdateGlobalDimFromDimSetID("Dimension Set ID", "Global Dimension 1 Code", "Global Dimension 2 Code"); + end; + } + field(1200; "Direct Debit Mandate ID"; Code[35]) + { + Caption = 'Direct Debit Mandate ID'; + TableRelation = "SEPA Direct Debit Mandate".ID where("Customer No." = field("Account No.")); + + trigger OnValidate() + begin + CODEUNIT.Run(CODEUNIT::"Document-Edit", Rec); + UpdateBankAccountCode(); + Modify(); + ResetNoPrinted(); + end; + } + field(10700; "Original Document No."; Code[20]) + { + Caption = 'Original Document No.'; + } + } + + keys + { + key(Key1; Type, "Entry No.") + { + Clustered = true; + } + key(Key2; Type, "Document No.") + { + } + key(Key3; Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place) + { + SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; + } + key(Key4; Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date") + { + SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; + } + key(Key5; Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Currency Code", Accepted, "Due Date", Place) + { + Enabled = false; + SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; + } + key(Key6; Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Category Code", "Currency Code", Accepted, "Due Date") + { + Enabled = false; + SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; + } + key(Key7; Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", "Account No.", "Due Date", "Document Type") + { + SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; + } + key(Key8; Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Account No.", "Due Date", "Document Type") + { + SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; + } + key(Key9; Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place, "Document Type") + { + SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; + } + key(Key10; Type, "Bill Gr./Pmt. Order No.", "Collection Agent", "Due Date", "Global Dimension 1 Code", "Global Dimension 2 Code", "Category Code", "Posting Date", "Document No.", Accepted, "Currency Code", "Document Type", "Payment Method Code") + { + SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; + } + key(Key11; Type, "Bill Gr./Pmt. Order No.", "Transfer Type") + { + } + key(Key12; Type, "Bill Gr./Pmt. Order No.", "Transfer Type", "Account No.") + { + } + key(Key13; Type, "Original Document No.") + { + } + } + + fieldgroups + { + } + + trigger OnDelete() + var + CarteraManagement: Codeunit CarteraManagement; + begin + TestField("Elect. Pmts Exported", false); + SetRange(Type, Type); + SetRange("Entry No.", "Entry No."); + case Type of + Type::Payable: + CarteraManagement.RemovePayableDocs(Rec); + Type::Receivable: + CarteraManagement.RemoveReceivableDocs(Rec); + end; + end; + + trigger OnInsert() + begin + if Type = Type::Payable then + ElectPmtMgmt.GetTransferType("Account No.", "Remaining Amount", "Transfer Type", false); + end; + + trigger OnModify() + begin + TestField("Elect. Pmts Exported", false); + end; + + trigger OnRename() + begin + TestField("Elect. Pmts Exported", false); + end; + + var + BillGr: Record "Bill Group"; + PmtOrd: Record "Payment Order"; + ElectPmtMgmt: Codeunit "Elect. Pmts Management"; + Text001: Label '%1 is more than the legal limit of %2 days after the document date %3 for the original document'; + + [Scope('OnPrem')] + procedure ResetNoPrinted() + begin + if "Bill Gr./Pmt. Order No." <> '' then + if Type = Type::Receivable then begin + BillGr.Get("Bill Gr./Pmt. Order No."); + BillGr."No. Printed" := 0; + BillGr.Modify(); + end else begin + PmtOrd.Get("Bill Gr./Pmt. Order No."); + PmtOrd."No. Printed" := 0; + PmtOrd.Modify(); + end; + end; + + [Scope('OnPrem')] + procedure ShowDimensions() + var + DimMgt: Codeunit DimensionManagement; + begin + DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo('%1 %2 %3', Type, "Entry No.", "Document No.")); + end; + + [Scope('OnPrem')] + procedure CheckDueDate() + var + InvoiceSplitPayment: Codeunit "Invoice-Split Payment"; + DocumentDate: Date; + MaxNoOfDaysTillDueDate: Integer; + begin + GetDocumentDates(DocumentDate, MaxNoOfDaysTillDueDate); + + if not InvoiceSplitPayment.CheckDueDate("Due Date", DocumentDate, MaxNoOfDaysTillDueDate) then + FieldError("Due Date", StrSubstNo(Text001, "Due Date", MaxNoOfDaysTillDueDate, DocumentDate)); + end; + + local procedure GetDocumentDates(var DocumentDate: Date; var MaxNoOfDaysTillDueDate: Integer) + var + PaymentTerms: Record "Payment Terms"; + SalesInvoiceHeader: Record "Sales Invoice Header"; + PurchInvHeader: Record "Purch. Inv. Header"; + begin + case Type of + Type::Receivable: + if SalesInvoiceHeader.Get("Document No.") then begin + PaymentTerms.Get(SalesInvoiceHeader."Payment Terms Code"); + DocumentDate := SalesInvoiceHeader."Document Date"; + end else + OnGetDocumentDateFromServiceInvoice(Rec."Document No.", DocumentDate); + Type::Payable: + if PurchInvHeader.Get("Document No.") then begin + PaymentTerms.Get(PurchInvHeader."Payment Terms Code"); + DocumentDate := PurchInvHeader."Document Date"; + end; + end; + + MaxNoOfDaysTillDueDate := PaymentTerms."Max. No. of Days till Due Date"; + end; + + [Scope('OnPrem')] + procedure UpdatePaymentMethodCode(DocumentNo: Code[20]; AccountNo: Code[20]; BillNo: Code[20]; PaymentMethodCode: Code[10]) + var + CarteraDoc: Record "Cartera Doc."; + begin + CarteraDoc.SetRange("Document No.", DocumentNo); + CarteraDoc.SetRange("Account No.", AccountNo); + if BillNo <> '' then begin + CarteraDoc.SetRange("Document Type", CarteraDoc."Document Type"::Bill); + CarteraDoc.SetRange("No.", BillNo); + end else + CarteraDoc.SetRange("Document Type", CarteraDoc."Document Type"::Invoice); + if CarteraDoc.FindFirst() and (CarteraDoc."Bill Gr./Pmt. Order No." = '') then begin + CarteraDoc.Validate("Payment Method Code", PaymentMethodCode); + CarteraDoc.Modify(true); + end; + end; + + procedure UpdateDirectDebitMandate() + var + SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate"; + begin + if (Rec."Bill Gr./Pmt. Order No." <> '') or (Rec.Type = Rec.Type::Payable) then + exit; + SEPADirectDebitMandate.SetRange("Customer No.", Rec."Account No."); + SEPADirectDebitMandate.SetRange("Customer Bank Account Code", Rec."Cust./Vendor Bank Acc. Code"); + if SEPADirectDebitMandate.FindFirst() then + Rec.Validate("Direct Debit Mandate ID", SEPADirectDebitMandate.ID); + end; + + procedure UpdateBankAccountCode() + var + SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate"; + begin + if (Rec."Bill Gr./Pmt. Order No." = '') or (Rec.Type = Rec.Type::Payable) then + exit; + if SEPADirectDebitMandate.Get(Rec."Direct Debit Mandate ID") then + Rec.Validate("Cust./Vendor Bank Acc. Code", SEPADirectDebitMandate."Customer Bank Account Code"); + end; + + [IntegrationEvent(false, false)] + local procedure OnGetDocumentDateFromServiceInvoice(DocumentNo: Code[20]; var DocumentDate: Date) + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentDocType.Enum.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentDocType.Enum.al new file mode 100644 index 00000000000..02389b6eac5 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentDocType.Enum.al @@ -0,0 +1,15 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +enum 7000025 "Cartera Document Doc. Type" +{ + Extensible = true; + AssignmentCompatibility = true; + + value(0; "Invoice") { Caption = 'Invoice'; } + value(1; "Credit Memo") { Caption = 'Credit Memo'; } + value(2; "Bill") { Caption = 'Bill'; } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentStatus.Enum.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentStatus.Enum.al new file mode 100644 index 00000000000..0d621f22dac --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentStatus.Enum.al @@ -0,0 +1,15 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +enum 10724 "Cartera Document Status" +{ + Extensible = true; + AssignmentCompatibility = true; + + value(0; "Open") { Caption = 'Open'; } + value(1; "Honored") { Caption = 'Honored'; } + value(2; "Rejected") { Caption = 'Rejected'; } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentType.Enum.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentType.Enum.al new file mode 100644 index 00000000000..593b1eef9b6 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocumentType.Enum.al @@ -0,0 +1,14 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +enum 7000000 "Cartera Document Type" +{ + Extensible = true; + AssignmentCompatibility = true; + + value(0; "Receivable") { Caption = 'Receivable'; } + value(1; "Payable") { Caption = 'Payable'; } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocuments.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocuments.Page.al new file mode 100644 index 00000000000..287f3ad4edd --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraDocuments.Page.al @@ -0,0 +1,442 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Sales.Customer; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +page 7000003 "Cartera Documents" +{ + Caption = 'Cartera Documents'; + DeleteAllowed = false; + InsertAllowed = false; + PageType = Worksheet; + Permissions = TableData "Cartera Doc." = m; + SaveValues = true; + SourceTable = "Cartera Doc."; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + } + repeater(Control1) + { + ShowCaption = false; + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field("Collection Agent"; Rec."Collection Agent") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the agent in which this document is settled.'; + } + field(Accepted; Rec.Accepted) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the Acceptance status required for a bill.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the when the creation of this document was posted.'; + Visible = false; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this document.'; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the payment method code defined for the document number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of the document used to generate this document.'; + } + field("No."; Rec."No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number associated with a specific bill.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the description associated with this document.'; + } + field("Original Amount (LCY)"; Rec."Original Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the initial amount of this document, in LCY.'; + Visible = false; + } + field("Original Amount"; Rec."Original Amount") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the initial amount of this document.'; + Visible = false; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending amount, in order for the document to be settled in full.'; + Visible = false; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending payment amount for the document to be settled in full.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the currency code in which this document was generated.'; + Visible = false; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + Visible = false; + } + field("Category Code"; Rec."Category Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a category code for this document.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the account number of the customer/vendor associated with this document.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the ledger entry number associated with the posting of this document.'; + } + field("Direct Debit Mandate ID"; Rec."Direct Debit Mandate ID") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the direct-debit mandate that the customer has signed to allow direct debit collection of payments.'; + } + } + group(Control49) + { + ShowCaption = false; + field(CurrTotalAmount; CurrTotalAmountLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Total Rmg. Amt. (LCY)'; + Editable = false; + ToolTip = 'Specifies the sum of amounts that remain to be paid.'; + Visible = CurrTotalAmountVisible; + } + } + } + } + + actions + { + area(navigation) + { + group("&Docs.") + { + Caption = '&Docs.'; + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + + trigger OnAction() + begin + Doc.Copy(Rec); + PAGE.Run(PAGE::"Documents Analysis", Doc); + end; + } + action(Maturity) + { + ApplicationArea = Basic, Suite; + Caption = 'Maturity'; + Image = Aging; + ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; + + trigger OnAction() + begin + Doc.Copy(Rec); + PAGE.RunModal(PAGE::"Documents Maturity", Doc); + end; + } + separator(Action55) + { + } + action("Dime&nsions") + { + ApplicationArea = Basic, Suite; + Caption = 'Dime&nsions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + separator(Action58) + { + } + action(Categorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Categorize'; + Ellipsis = true; + Image = Category; + ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(Doc); + CarteraManagement.CategorizeDocs(Doc); + end; + } + action(Decategorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Decategorize'; + Image = UndoCategory; + ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(Doc); + CarteraManagement.DecategorizeDocs(Doc); + end; + } + separator(Action37) + { + } + action(Reject) + { + ApplicationArea = Basic, Suite; + Caption = 'Reject'; + Ellipsis = true; + Image = Reject; + ToolTip = 'Post document rejections.'; + + trigger OnAction() + var + Cust: Record Customer; + begin + if Doc.Type = Doc.Type::Receivable then + if Cust.Get(Rec."Account No.") then + Cust.CheckBlockedCustOnJnls(Cust, "Gen. Journal Document Type".FromInteger(Rec."Document Type".AsInteger()), false); + RejectDocs(); + end; + } + separator(Action39) + { + } + action(Print) + { + ApplicationArea = Basic, Suite; + Caption = 'Print'; + Ellipsis = true; + Image = Print; + ToolTip = 'Print the document.'; + + trigger OnAction() + begin + PrintDoc(); + end; + } + } + } + area(processing) + { + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + CarteraManagement.NavigateDoc(Rec); + end; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Navigate_Promoted"; "&Navigate") + { + } + } + } + } + + trigger OnAfterGetCurrRecord() + begin + xRec := Rec; + UpdateStatistics(); + end; + + trigger OnInit() + begin + CurrTotalAmountVisible := true; + end; + + trigger OnModifyRecord(): Boolean + begin + CODEUNIT.Run(CODEUNIT::"Document-Edit", Rec); + exit(false); + end; + + trigger OnOpenPage() + begin + CategoryFilter := Rec.GetFilter("Category Code"); + end; + + var + Text1100000: Label 'Payable Bills cannot be printed.'; + Text1100001: Label 'Only Receivable Bills can be rejected.'; + Text1100002: Label 'Only Bills can be rejected.'; + Doc: Record "Cartera Doc."; + CustLedgEntry: Record "Cust. Ledger Entry"; + SalesInvHeader: Record "Sales Invoice Header"; + PurchInvHeader: Record "Purch. Inv. Header"; + CarteraManagement: Codeunit CarteraManagement; + CategoryFilter: Code[250]; + CurrTotalAmountLCY: Decimal; + ShowCurrent: Boolean; + CurrTotalAmountVisible: Boolean; + + procedure UpdateStatistics() + begin + Doc.Copy(Rec); + CarteraManagement.UpdateStatistics(Doc, CurrTotalAmountLCY, ShowCurrent); + CurrTotalAmountVisible := ShowCurrent; + end; + + procedure GetSelected(var NewDoc: Record "Cartera Doc.") + begin + CurrPage.SetSelectionFilter(NewDoc); + end; + + procedure PrintDoc() + begin + CurrPage.SetSelectionFilter(Doc); + if not Doc.Find('-') then + exit; + + if (Doc.Type <> Doc.Type::Receivable) and (Doc."Document Type" = Doc."Document Type"::Bill) then + Error(Text1100000); + + if Doc.Type = Doc.Type::Receivable then begin + if Doc."Document Type" = Doc."Document Type"::Bill then begin + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(Doc."Entry No."); + CustLedgEntry.Mark(true); + until Doc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + CustLedgEntry.PrintBill(true); + end else begin + SalesInvHeader.Reset(); + repeat + SalesInvHeader.Get(Doc."Document No."); + SalesInvHeader.Mark(true); + until Doc.Next() = 0; + + SalesInvHeader.MarkedOnly(true); + SalesInvHeader.PrintRecords(true); + end; + end else begin + PurchInvHeader.Reset(); + repeat + PurchInvHeader.Get(Doc."Document No."); + PurchInvHeader.Mark(true); + until Doc.Next() = 0; + + PurchInvHeader.MarkedOnly(true); + PurchInvHeader.PrintRecords(true); + end; + end; + + + procedure RejectDocs() + begin + if Doc.Type <> Doc.Type::Receivable then + Error(Text1100001); + if Doc."Document Type" <> Rec."Document Type"::Bill then + Error(Text1100002); + + CurrPage.SetSelectionFilter(Doc); + if not Doc.Find('-') then + exit; + + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(Doc."Entry No."); + CustLedgEntry.Mark(true); + until Doc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Reject Docs.", true, false, CustLedgEntry); + end; + + local procedure CategoryFilterOnAfterValidate() + begin + Rec.SetFilter("Category Code", CategoryFilter); + CurrPage.Update(false); + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraFactStatisticsFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraFactStatisticsFB.Page.al new file mode 100644 index 00000000000..1d2dfc0c5a3 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraFactStatisticsFB.Page.al @@ -0,0 +1,291 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Sales.Customer; +using Microsoft.Sales.Receivables; + +page 35306 "Cartera Fact. Statistics FB" +{ + Caption = 'Cartera Fact. Statistics FB'; + Editable = false; + PageType = CardPart; + SourceTable = Customer; + + layout + { + area(content) + { + group("No. of Invoices") + { + Caption = 'No. of Invoices'; + field("NoOpen[5]"; NoOpen[5]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field("NoHonored[5]"; NoHonored[5]) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field("NoRejected[5]"; NoRejected[5]) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + group("Remaining Amt. (LCY)") + { + Caption = 'Remaining Amt. (LCY)'; + field("OpenRemainingAmtLCY[5]"; OpenRemainingAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(0, 0); + end; + } + field("HonoredRemainingAmtLCY[5]"; HonoredRemainingAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(0, 0); + end; + } + field("RejectedRemainingAmtLCY[5]"; RejectedRemainingAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + + trigger OnDrillDown() + begin + DrillDownRejected(0, 0); + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateDocStatistics(); + end; + + var + DocumentSituationFilter: array[3] of Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; + NoOpen: array[5] of Integer; + NoHonored: array[5] of Integer; + NoRejected: array[5] of Integer; + NoRedrawn: array[5] of Integer; + OpenAmtLCY: array[5] of Decimal; + HonoredAmtLCY: array[5] of Decimal; + RejectedAmtLCY: array[5] of Decimal; + RedrawnAmtLCY: array[5] of Decimal; + OpenRemainingAmtLCY: array[5] of Decimal; + RejectedRemainingAmtLCY: array[5] of Decimal; + HonoredRemainingAmtLCY: array[5] of Decimal; + RedrawnRemainingAmtLCY: array[5] of Decimal; + j: Integer; + + local procedure UpdateDocStatistics() + var + CustLedgEntry: Record "Cust. Ledger Entry"; + begin + DocumentSituationFilter[1] := DocumentSituationFilter::Cartera; + DocumentSituationFilter[2] := DocumentSituationFilter::"BG/PO"; + DocumentSituationFilter[3] := DocumentSituationFilter::"Posted BG/PO"; + + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + for j := 1 to 5 do begin + case j of + 4: + // Closed Bill Group and Closed Documents + begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + end; + 5: + // Invoices + begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + else begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + CustLedgEntry.SetRange("Document Situation", DocumentSituationFilter[j]); + end; + end; + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + OpenAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + OpenRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoOpen[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + HonoredAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + HonoredRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoHonored[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + RejectedAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + RejectedRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoRejected[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Redrawn); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + RedrawnAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + RedrawnRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoRedrawn[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Situation"); + end; + end; + + local procedure DrillDownOpen(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; + + local procedure DrillDownHonored(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; + + local procedure DrillDownRejected(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraJournal.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraJournal.Page.al new file mode 100644 index 00000000000..e23693cd618 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraJournal.Page.al @@ -0,0 +1,625 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Foundation.Reporting; + +page 7000036 "Cartera Journal" +{ + ApplicationArea = Basic, Suite; + AutoSplitKey = true; + Caption = 'Cartera Journal'; + DataCaptionFields = "Journal Batch Name"; + DelayedInsert = true; + PageType = Worksheet; + SaveValues = true; + SourceTable = "Gen. Journal Line"; + UsageCategory = Tasks; + + layout + { + area(content) + { + field(CurrentJnlBatchName; CurrentJnlBatchName) + { + ApplicationArea = Basic, Suite; + Caption = 'Batch Name'; + Lookup = true; + ToolTip = 'Specifies the name of the journal batch.'; + + trigger OnLookup(var Text: Text): Boolean + begin + CurrPage.SaveRecord(); + GenJnlManagement.LookupName(CurrentJnlBatchName, Rec); + CurrPage.Update(false); + end; + + trigger OnValidate() + begin + GenJnlManagement.CheckName(CurrentJnlBatchName, Rec); + CurrentJnlBatchNameOnAfterVali(); + end; + } + repeater(Control1) + { + ShowCaption = false; + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies when the journal line will be posted. '; + } + field("Transaction No."; Rec."Transaction No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the transaction number for the journal line being processed.'; + } + field("Document Date"; Rec."Document Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date when the document represented by the journal line was created.'; + Visible = false; + } + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the document in a posted bill group/payment order, from which this document was generated.'; + } + field("Bill No."; Rec."Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a number for this bill generated from the journal.'; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies how payment for the document must be submitted, such as bank transfer or check.'; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this document in a posted bill group/payment order.'; + } + field("External Document No."; Rec."External Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a document number that refers to the customer''s or vendor''s numbering system.'; + Visible = false; + } + field("Account Type"; Rec."Account Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account type, such as Customer.'; + + trigger OnValidate() + begin + GenJnlManagement.GetAccounts(Rec, AccName, BalAccName); + end; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account number of the customer/vendor.'; + + trigger OnValidate() + begin + GenJnlManagement.GetAccounts(Rec, AccName, BalAccName); + end; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a description of the record.'; + } + field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code") + { + ApplicationArea = Dimensions; + ToolTip = 'Specifies the code for Shortcut Dimension 1, which is one of two global dimension codes that you set up in the General Ledger Setup window.'; + Visible = false; + } + field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code") + { + ApplicationArea = Dimensions; + ToolTip = 'Specifies the code for Shortcut Dimension 2, which is one of two global dimension codes that you set up in the General Ledger Setup window.'; + Visible = false; + } + field("Business Unit Code"; Rec."Business Unit Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a code for the business unit, in case the company is part of a group.'; + Visible = false; + } + field("Salespers./Purch. Code"; Rec."Salespers./Purch. Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the salesperson or purchaser who is linked to the sale or purchase on the journal line.'; + Visible = false; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code of the currency for the amounts on the journal line.'; + Visible = false; + + trigger OnAssistEdit() + begin + ChangeExchangeRate.SetParameter(Rec."Currency Code", Rec."Currency Factor", Rec."Posting Date"); + if ChangeExchangeRate.RunModal() = ACTION::OK then + Rec.Validate("Currency Factor", ChangeExchangeRate.GetParameter()); + + Clear(ChangeExchangeRate); + end; + } + field("Currency Factor"; Rec."Currency Factor") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the relationship between the additional reporting currency and the local currency. Amounts are recorded in both LCY and the additional reporting currency, using the relevant exchange rate and the currency factor.'; + Visible = false; + } + field("Gen. Posting Type"; Rec."Gen. Posting Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the typical posting type for the historical general ledger account.'; + } + field("Gen. Bus. Posting Group"; Rec."Gen. Bus. Posting Group") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the vendor''s or customer''s trade type to link transactions made for this business partner with the appropriate general ledger account according to the general posting setup.'; + } + field("Gen. Prod. Posting Group"; Rec."Gen. Prod. Posting Group") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the item''s product type to link transactions made for this item with the appropriate general ledger account according to the general posting setup.'; + } + field("Debit Amount"; Rec."Debit Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount (including VAT) that the journal line consists of, if it is a debit amount.'; + } + field("Credit Amount"; Rec."Credit Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount (including VAT) that the journal line consists of, if it is a credit amount.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total on the journal line.'; + Visible = false; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount on the journal line in LCY.'; + } + field("Bal. Account Type"; Rec."Bal. Account Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the balancing account type that should be used in this journal line.'; + } + field("Bal. Account No."; Rec."Bal. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the general ledger, customer, vendor, or bank account to which a balancing entry for the journal line will posted.'; + + trigger OnValidate() + begin + GenJnlManagement.GetAccounts(Rec, AccName, BalAccName); + end; + } + field("Bal. Gen. Posting Type"; Rec."Bal. Gen. Posting Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the general posting type that will be used when you post the entry on the journal line.'; + } + field("Bal. Gen. Bus. Posting Group"; Rec."Bal. Gen. Bus. Posting Group") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code of the general business posting group that will be used when you post the entry on the journal line.'; + } + field("Bal. Gen. Prod. Posting Group"; Rec."Bal. Gen. Prod. Posting Group") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code of the general product posting group that will be used when you post the entry on the journal line.'; + } + field("Payment Terms Code"; Rec."Payment Terms Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code that represents the payments terms that apply to the entry on the journal line.'; + Visible = false; + } + field("Applies-to Doc. Type"; Rec."Applies-to Doc. Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of the posted document that this document or journal line will be applied to when you post, for example to register payment.'; + Visible = false; + } + field("Applies-to Doc. No."; Rec."Applies-to Doc. No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the posted document that this document or journal line will be applied to when you post, for example to register payment.'; + } + field("Applies-to Bill No."; Rec."Applies-to Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bill to be settled.'; + } + field("Applies-to ID"; Rec."Applies-to ID") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the ID of entries that will be applied to when you choose the Apply Entries action.'; + Visible = false; + } + field("On Hold"; Rec."On Hold") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies that the On Hold check box is selected for this transaction in the Vendor Ledger Entries window. The payable document cannot be included in a payment order nor can it be settled until the check box is deselected on the vendor ledger entry.'; + Visible = false; + } + field("Bank Payment Type"; Rec."Bank Payment Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the payment type, for the entry on the payment journal line.'; + Visible = false; + } + field("Reason Code"; Rec."Reason Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; + Visible = false; + } + field("Recipient Bank Account"; Rec."Recipient Bank Account") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the bank account that the amount will be transferred to after it has been exported from the journal.'; + Visible = false; + } + field("Direct Debit Mandate ID"; Rec."Direct Debit Mandate ID") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the direct-debit mandate that the customer has signed to allow direct debit collection of payments.'; + } + } + group(Control30) + { + ShowCaption = false; + fixed(Control1901776101) + { + ShowCaption = false; + group("Account Name") + { + Caption = 'Account Name'; + field(AccName; AccName) + { + ApplicationArea = Basic, Suite; + Caption = 'Account Name'; + Editable = false; + ToolTip = 'Specifies the name of the account that has been entered on the journal line.'; + } + } + group("Bal. Account Name") + { + Caption = 'Bal. Account Name'; + field(BalAccName; BalAccName) + { + ApplicationArea = Basic, Suite; + Caption = 'Bal. Account Name'; + Editable = false; + ToolTip = 'Specifies the name of the balancing account that has been entered on the journal line.'; + } + } + group(Control1902759701) + { + Caption = 'Balance'; + field(Balance; Balance + Rec."Balance (LCY)" - xRec."Balance (LCY)") + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Balance'; + Editable = false; + ToolTip = 'Specifies the balance on the journal line.'; + Visible = BalanceVisible; + } + } + group("Total Balance") + { + Caption = 'Total Balance'; + field(TotalBalance; TotalBalance + Rec."Balance (LCY)" - xRec."Balance (LCY)") + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Total Balance'; + Editable = false; + ToolTip = 'Specifies the sum of balances. '; + Visible = TotalBalanceVisible; + } + } + } + } + } + } + + actions + { + area(navigation) + { + group("&Line") + { + Caption = '&Line'; + Image = Line; + action(Dimensions) + { + ApplicationArea = Basic, Suite; + Caption = 'Dimensions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + } + group("A&ccount") + { + Caption = 'A&ccount'; + Image = ChartOfAccounts; + action(Card) + { + ApplicationArea = Basic, Suite; + Caption = 'Card'; + Image = EditLines; + RunObject = Codeunit "Gen. Jnl.-Show Card"; + ShortCutKey = 'Shift+F7'; + ToolTip = 'View or change detailed information about the record that is being processed on the document or journal line.'; + } + action(LedgerEntries) + { + ApplicationArea = Basic, Suite; + Caption = 'Ledger E&ntries'; + RunObject = Codeunit "Gen. Jnl.-Show Entries"; + ShortCutKey = 'Ctrl+F7'; + ToolTip = 'View the history of transactions that have been posted for the selected record.'; + } + } + } + area(processing) + { + action("&Apply Entries") + { + ApplicationArea = Basic, Suite; + Caption = '&Apply Entries'; + Ellipsis = true; + Image = ApplyEntries; + RunObject = Codeunit "Gen. Jnl.-Apply"; + ShortCutKey = 'Shift+F11'; + ToolTip = 'Select one or more ledger entries that you want to apply this record to so that the related posted documents are closed as paid or refunded.'; + } + group("P&osting") + { + Caption = 'P&osting'; + Image = Post; + action(Reconcile) + { + ApplicationArea = Basic, Suite; + Caption = 'Reconcile'; + Image = Reconcile; + ShortCutKey = 'Ctrl+F11'; + ToolTip = 'View the balances on bank accounts that are marked for reconciliation, usually liquid accounts.'; + + trigger OnAction() + begin + GLReconcile.SetGenJnlLine(Rec); + GLReconcile.Run(); + end; + } + action(TestReport) + { + ApplicationArea = Basic, Suite; + Caption = 'Test Report'; + Ellipsis = true; + Image = TestReport; + ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; + + trigger OnAction() + begin + ReportPrint.PrintGenJnlLine(Rec); + end; + } + action(Post) + { + ApplicationArea = Basic, Suite; + Caption = 'P&ost'; + Image = Post; + ShortCutKey = 'F9'; + ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; + + trigger OnAction() + var + OldLinDiaCar: Record "Gen. Journal Line"; + DocPost: Codeunit "Document-Post"; + begin + Clear(OldLinDiaCar); + OldLinDiaCar.Copy(Rec); + PostOk := false; + DocPost.PostLines(OldLinDiaCar, PostOk, false); + Rec := OldLinDiaCar; + CurrentJnlBatchName := Rec.GetRangeMax("Journal Batch Name"); + if PostOk then begin + Rec.DeleteAll(); + ClosingForbidden := false; + Commit(); + end; + Rec.MarkedOnly(false); + CurrPage.Update(false); + end; + } + action(PostandPrint) + { + ApplicationArea = Basic, Suite; + Caption = 'Post and &Print'; + Image = PostPrint; + ShortCutKey = 'Shift+F9'; + ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; + + trigger OnAction() + var + OldLinDiaCar: Record "Gen. Journal Line"; + DocPost: Codeunit "Document-Post"; + begin + Clear(OldLinDiaCar); + OldLinDiaCar.Copy(Rec); + PostOk := false; + DocPost.PostLines(OldLinDiaCar, PostOk, true); + Rec := OldLinDiaCar; + CurrentJnlBatchName := Rec.GetRangeMax("Journal Batch Name"); + if PostOk then begin + Rec.DeleteAll(); + ClosingForbidden := false; + Commit(); + end; + Rec.MarkedOnly(false); + CurrPage.Update(false); + end; + } + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Apply Entries_Promoted"; "&Apply Entries") + { + } + actionref(Post_Promoted; Post) + { + } + actionref(PostandPrint_Promoted; PostandPrint) + { + } + actionref(Reconcile_Promoted; Reconcile) + { + } + actionref(Dimensions_Promoted; Dimensions) + { + } + } + } + } + + trigger OnAfterGetRecord() + begin + AfterGetCurrentRecord(); + end; + + trigger OnInit() + begin + TotalBalanceVisible := true; + BalanceVisible := true; + end; + + trigger OnNewRecord(BelowxRec: Boolean) + begin + UpdateBalance(); + Rec.SetUpNewLine(xRec, Balance, BelowxRec); + AfterGetCurrentRecord(); + end; + + trigger OnOpenPage() + var + JnlSelected: Boolean; + begin + BalAccName := ''; + if PassedCurrentJnlBatchName <> '' then + CurrentJnlBatchName := PassedCurrentJnlBatchName; + OpenedFromBatch := (Rec."Journal Batch Name" <> '') and (Rec."Journal Template Name" = ''); + if OpenedFromBatch then begin + CurrentJnlBatchName := Rec."Journal Batch Name"; + GenJnlManagement.OpenJnl(CurrentJnlBatchName, Rec); + exit; + end; + GenJnlManagement.TemplateSelection(PAGE::"Cartera Journal", "Gen. Journal Template Type"::Cartera, false, Rec, JnlSelected); + if not JnlSelected then + Error(''); + GenJnlManagement.OpenJnl(CurrentJnlBatchName, Rec); + end; + + trigger OnQueryClosePage(CloseAction: Action): Boolean + var + CarteraJnlForm: Page "Cartera Journal"; + begin + if ClosingForbidden then begin + Message(Text1100000Msg); + CarteraJnlForm.SetJnlBatchName(Rec."Journal Batch Name"); + CarteraJnlForm.SetTableView(Rec); + CarteraJnlForm.SetRecord(Rec); + CarteraJnlForm.AllowClosing(true); + CarteraJnlForm.RunModal(); + end; + end; + + var + GenJnlManagement: Codeunit GenJnlManagement; + ReportPrint: Codeunit "Test Report-Print"; + GLReconcile: Page Reconciliation; + ChangeExchangeRate: Page "Change Exchange Rate"; + CurrentJnlBatchName: Code[10]; + PassedCurrentJnlBatchName: Code[10]; + AccName: Text[100]; + BalAccName: Text[100]; + Balance: Decimal; + TotalBalance: Decimal; + ShowBalance: Boolean; + ShowTotalBalance: Boolean; + ClosingForbidden: Boolean; + PostOk: Boolean; + OpenedFromBatch: Boolean; + BalanceVisible: Boolean; + TotalBalanceVisible: Boolean; + Text1100000Msg: Label 'Please, post the journal lines. Otherwise, inconsistencies can appear in your data.'; + + local procedure UpdateBalance() + begin + GenJnlManagement.CalcBalance(Rec, xRec, Balance, TotalBalance, ShowBalance, ShowTotalBalance); + BalanceVisible := ShowBalance; + TotalBalanceVisible := ShowTotalBalance; + end; + + procedure SetJnlBatchName(NewJnlBatchName: Code[10]) + begin + PassedCurrentJnlBatchName := NewJnlBatchName; + end; + + procedure AllowClosing(FromBatch: Boolean) + begin + ClosingForbidden := FromBatch; + end; + + local procedure CurrentJnlBatchNameOnAfterVali() + begin + CurrPage.SaveRecord(); + GenJnlManagement.SetName(CurrentJnlBatchName, Rec); + CurrPage.Update(false); + end; + + local procedure AfterGetCurrentRecord() + begin + xRec := Rec; + GenJnlManagement.GetAccounts(Rec, AccName, BalAccName); + UpdateBalance(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraManagement.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraManagement.Codeunit.al new file mode 100644 index 00000000000..b8c9dc20db4 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraManagement.Codeunit.al @@ -0,0 +1,1321 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.Payment; +using Microsoft.EServices.EDocument; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.VAT.Ledger; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.Navigate; +using Microsoft.Foundation.PaymentTerms; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +codeunit 7000000 CarteraManagement +{ + Permissions = TableData "Cust. Ledger Entry" = m, + TableData "Vendor Ledger Entry" = m, + TableData "VAT Entry" = imd, + TableData "Cartera Doc." = m, + TableData "Posted Cartera Doc." = m, + TableData "Closed Cartera Doc." = m, + TableData "Bill Group" = m; + + trigger OnRun() + begin + end; + + var + Text1100000: Label 'The Bill Group does not exist.'; + Text1100001: Label 'This Bill Group has already been printed. Proceed anyway?'; + Text1100002: Label 'The process has been interrupted to respect the warning.'; + Text1100003: Label 'The Payment Order does not exist.'; + Text1100004: Label 'This Payment Order has already been printed. Proceed anyway?'; + Text1100005: Label 'The update has been interrupted to respect the warning.'; + Text1100006: Label 'Document settlement %1/%2'; + Text1100007: Label 'Bill %1/%2 settl. rev.'; + Text1100008: Label 'Redrawing a settled bill is only possible for bills in posted or closed bill groups.'; + Text1100009: Label 'Redrawing a settled bill is only possible for bills in posted or closed payment orders.'; + VATPostingSetup: Record "VAT Posting Setup"; + VATEntryNo: Integer; + VATUnrealAcc: Code[20]; + VATAcc: Code[20]; + TotalVATAmount: Decimal; + EntryIsAppliedErr: Label 'The document %1/%2 is marked to apply.'; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + ElectPmtMgmt: Codeunit "Elect. Pmts Management"; + + procedure CategorizeDocs(var Doc: Record "Cartera Doc.") + begin + REPORT.RunModal(REPORT::"Categorize Documents", true, false, Doc); + end; + + procedure DecategorizeDocs(var Doc: Record "Cartera Doc.") + begin + Doc.ModifyAll("Category Code", ''); + end; + + [Scope('OnPrem')] + procedure CategorizePostedDocs(var PostedDoc: Record "Posted Cartera Doc.") + begin + REPORT.RunModal(REPORT::"Categorize Posted Documents", true, false, PostedDoc); + end; + + [Scope('OnPrem')] + procedure DecategorizePostedDocs(var PostedDoc: Record "Posted Cartera Doc.") + begin + PostedDoc.ModifyAll("Category Code", ''); + end; + + [Scope('OnPrem')] + procedure UpdateStatistics(var Doc2: Record "Cartera Doc."; var CurrTotalAmount: Decimal; var ShowCurrent: Boolean) + var + Doc: Record "Cartera Doc."; + begin + Doc.Copy(Doc2); + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Collection Agent", "Due Date", "Global Dimension 1 Code", + "Global Dimension 2 Code", "Category Code", "Posting Date", "Document No.", Accepted, "Currency Code", "Document Type"); + ShowCurrent := Doc.CalcSums("Remaining Amt. (LCY)"); + if ShowCurrent then + CurrTotalAmount := Doc."Remaining Amt. (LCY)" + else + CurrTotalAmount := 0; + end; + + procedure NavigateDoc(var CarteraDoc: Record "Cartera Doc.") + var + Navigate: Page Navigate; + VendLedgEntry: Record "Vendor Ledger Entry"; + CustLedgEntry: Record "Cust. Ledger Entry"; + begin + case CarteraDoc.Type of + CarteraDoc.Type::Receivable: + begin + if not CustLedgEntry.Get(CarteraDoc."Entry No.") then + exit; + Navigate.SetDoc(CustLedgEntry."Posting Date", CustLedgEntry."Document No."); + end; + CarteraDoc.Type::Payable: + begin + if not VendLedgEntry.Get(CarteraDoc."Entry No.") then + exit; + Navigate.SetDoc(VendLedgEntry."Posting Date", VendLedgEntry."Document No."); + end; + end; + Navigate.Run(); + end; + + procedure NavigatePostedDoc(var PostedCarteraDoc: Record "Posted Cartera Doc.") + var + Navigate: Page Navigate; + VendLedgEntry: Record "Vendor Ledger Entry"; + CustLedgEntry: Record "Cust. Ledger Entry"; + begin + case PostedCarteraDoc.Type of + PostedCarteraDoc.Type::Receivable: + begin + if not CustLedgEntry.Get(PostedCarteraDoc."Entry No.") then + exit; + Navigate.SetDoc(CustLedgEntry."Posting Date", CustLedgEntry."Document No."); + end; + PostedCarteraDoc.Type::Payable: + begin + if not VendLedgEntry.Get(PostedCarteraDoc."Entry No.") then + exit; + Navigate.SetDoc(VendLedgEntry."Posting Date", VendLedgEntry."Document No."); + end; + end; + Navigate.Run(); + end; + + procedure NavigateClosedDoc(var ClosedCarteraDoc: Record "Closed Cartera Doc.") + var + Navigate: Page Navigate; + VendLedgEntry: Record "Vendor Ledger Entry"; + CustLedgEntry: Record "Cust. Ledger Entry"; + begin + case ClosedCarteraDoc.Type of + ClosedCarteraDoc.Type::Receivable: + begin + if not CustLedgEntry.Get(ClosedCarteraDoc."Entry No.") then + exit; + Navigate.SetDoc(CustLedgEntry."Posting Date", CustLedgEntry."Document No."); + end; + ClosedCarteraDoc.Type::Payable: + begin + if not VendLedgEntry.Get(ClosedCarteraDoc."Entry No.") then + exit; + Navigate.SetDoc(VendLedgEntry."Posting Date", VendLedgEntry."Document No."); + end; + end; + Navigate.Run(); + end; + + procedure InsertReceivableDocs(var CarteraDoc2: Record "Cartera Doc.") + var + CarteraDoc: Record "Cartera Doc."; + CarteraDocToProcess: Record "Cartera Doc."; + BankAcc: Record "Bank Account"; + BillGr: Record "Bill Group"; + CarteraSetup: Record "Cartera Setup"; + Cust: Record Customer; + CustLedgEntry: Record "Cust. Ledger Entry"; + CarteraDocuments: Page "Cartera Documents"; + CheckDiscCreditLimit: Page "Check Discount Credit Limit"; + SelectedEntryNos: List of [Integer]; + EntryNo: Integer; + SelectedAmount: Decimal; + GroupNo: Code[20]; + CustLedgEntryFound: Boolean; + begin + CarteraDoc2.FilterGroup(2); + CarteraDoc2.SetRange("Bill Gr./Pmt. Order No."); + CarteraDoc2.FilterGroup(0); + GroupNo := CarteraDoc2.GetRangeMin("Bill Gr./Pmt. Order No."); + if not BillGr.Get(GroupNo) then + Error(Text1100000); + + if BillGr."No. Printed" <> 0 then + if not Confirm(Text1100001, false) then + exit; + + CarteraDoc.Reset(); + CarteraDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted); + CarteraDoc.FilterGroup(2); + CarteraDoc.SetRange(Type, CarteraDoc.Type::Receivable); + CarteraDoc.FilterGroup(0); + CarteraDoc.SetRange("Bill Gr./Pmt. Order No.", ''); + CarteraDoc.SetRange("Currency Code", BillGr."Currency Code"); + CarteraDoc.SetFilter(Accepted, '<>%1', CarteraDoc.Accepted::No); + CarteraDoc.SetRange("Collection Agent", CarteraDoc."Collection Agent"::Bank); + if BillGr.Factoring <> BillGr.Factoring::" " then + CarteraDoc.SetFilter("Document Type", '<>%1', CarteraDoc."Document Type"::Bill) + else + CarteraDoc.SetRange("Document Type", CarteraDoc."Document Type"::Bill); + OnInsertReceivableDocsOnAfterSetFilters(CarteraDoc, BillGr); + CarteraDocuments.SetTableView(CarteraDoc); + CarteraDocuments.LookupMode(true); + if CarteraDocuments.RunModal() <> ACTION::LookupOK then + exit; + CarteraDocuments.GetSelected(CarteraDoc); + Clear(CarteraDocuments); + if not CarteraDoc.Find('-') then + exit; + + if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and + BankAcc.Get(BillGr."Bank Account No.") and + (BillGr.Factoring = BillGr.Factoring::" ") + then begin + CarteraSetup.Get(); + if CarteraSetup."Bills Discount Limit Warnings" then begin + SelectedAmount := 0; + repeat + SelectedAmount := SelectedAmount + CarteraDoc."Remaining Amt. (LCY)"; + until CarteraDoc.Next() = 0; + BillGr.CalcFields(Amount); + BankAcc.CalcFields("Posted Receiv. Bills Rmg. Amt."); + if BillGr.Amount + SelectedAmount + BankAcc."Posted Receiv. Bills Rmg. Amt." > BankAcc."Credit Limit for Discount" + then begin + CheckDiscCreditLimit.SetRecord(BankAcc); + CheckDiscCreditLimit.SetValues(BillGr.Amount, SelectedAmount); + if CheckDiscCreditLimit.RunModal() <> ACTION::Yes then + Error(Text1100002); + Clear(CheckDiscCreditLimit); + end; + end; + end; + if not SnapshotSelectedEntryNos(CarteraDoc, CarteraDoc.Type::Receivable, SelectedEntryNos) then + exit; + + CustLedgEntry.SetLoadFields("Applies-to ID", "Document Situation", "Direct Debit Mandate ID"); + foreach EntryNo in SelectedEntryNos do begin + CarteraDocToProcess.Get(CarteraDocToProcess.Type::Receivable, EntryNo); + CustLedgEntryFound := CustLedgEntry.Get(EntryNo); + if CustLedgEntryFound then + if CustLedgEntry."Applies-to ID" <> '' then + Error(EntryIsAppliedErr, CarteraDocToProcess."Document No.", CarteraDocToProcess."No."); + + CarteraDocToProcess.TestField("Bill Gr./Pmt. Order No.", ''); + CarteraDocToProcess.TestField("Currency Code", BillGr."Currency Code"); + if Cust."No." <> CarteraDocToProcess."Account No." then + Cust.Get(CarteraDocToProcess."Account No."); + Cust.CheckBlockedCustOnJnls(Cust, GetDocType(CarteraDocToProcess."Document Type"), false); + if CarteraDocToProcess.Accepted = CarteraDocToProcess.Accepted::No then + CarteraDocToProcess.FieldError(Accepted); + CarteraDocToProcess.TestField("Collection Agent", CarteraDocToProcess."Collection Agent"::Bank); + CarteraDocToProcess."Bill Gr./Pmt. Order No." := GroupNo; + CarteraDocToProcess.Modify(); + if CustLedgEntryFound then begin + CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::"BG/PO"; + CustLedgEntry.Modify(); + CarteraDocToProcess."Direct Debit Mandate ID" := CustLedgEntry."Direct Debit Mandate ID"; + end; + OnAfterInsertReceivableDocs(CarteraDocToProcess, BillGr); + end; + + BillGr."No. Printed" := 0; + BillGr.Modify(); + end; + + procedure InsertPayableDocs(var CarteraDoc2: Record "Cartera Doc.") + var + CarteraDoc: Record "Cartera Doc."; + PmtOrd: Record "Payment Order"; + CarteraSetup: Record "Cartera Setup"; + Vendor: Record Vendor; + CarteraDocuments: Page "Cartera Documents"; + GroupNo: Code[20]; + begin + CarteraDoc2.FilterGroup(2); + CarteraDoc2.SetRange("Bill Gr./Pmt. Order No."); + CarteraDoc2.FilterGroup(0); + GroupNo := CarteraDoc2.GetRangeMin("Bill Gr./Pmt. Order No."); + if not PmtOrd.Get(GroupNo) then + Error(Text1100003); + + if PmtOrd."No. Printed" <> 0 then + if not Confirm(Text1100004, false) then + exit; + + CarteraSetup.Get(); + CarteraDoc.Reset(); + CarteraDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted); + CarteraDoc.FilterGroup(2); + CarteraDoc.SetRange(Type, CarteraDoc.Type::Payable); + CarteraDoc.FilterGroup(0); + CarteraDoc.SetRange("Bill Gr./Pmt. Order No.", ''); + CarteraDoc.SetRange("Currency Code", PmtOrd."Currency Code"); + CarteraDoc.SetFilter(Accepted, '<>%1', CarteraDoc.Accepted::No); + CarteraDoc.SetRange("Collection Agent", CarteraDoc."Collection Agent"::Bank); + CarteraDoc.SetRange("On Hold", false); + if CarteraDoc.FindSet() then + repeat + Vendor.SetLoadFields(Blocked); + if Vendor.Get(CarteraDoc."Account No.") then + if Vendor.Blocked = Vendor.Blocked::" " then + if not (PmtOrd."Export Electronic Payment") then + CarteraDoc.Mark(true) + else + if (CheckUseForElectronicPayments(Vendor."No.")) then + CarteraDoc.Mark(true); + until CarteraDoc.Next() = 0; + CarteraDoc.MarkedOnly(true); + OnInsertPayableDocsOnAfterSetFilters(CarteraDoc, CarteraDoc2); + CarteraDocuments.SetTableView(CarteraDoc); + CarteraDoc.MarkedOnly(false); + CarteraDocuments.LookupMode(true); + if CarteraDocuments.RunModal() <> ACTION::LookupOK then + exit; + CarteraDocuments.GetSelected(CarteraDoc); + Clear(CarteraDocuments); + if not CarteraDoc.Find('-') then + exit; + + ApplySelectedPayableDocsToPaymentOrder(CarteraDoc, PmtOrd, GroupNo); + end; + + /// + /// Applies the user-selected payable cartera documents to the given payment order. + /// Iterates the selection via a snapshot of "Entry No." values to avoid the marked-cursor + /// drop that occurs when Modify is called inside a loop over a page-supplied recordset. + /// + /// The cartera documents selected on the source page (filtered/marked recordset). + /// The target payment order to which the selected documents are assigned. + /// The payment order number assigned to each selected document. + internal procedure ApplySelectedPayableDocsToPaymentOrder(var CarteraDoc: Record "Cartera Doc."; var PmtOrd: Record "Payment Order"; GroupNo: Code[20]) + var + CarteraDocToProcess: Record "Cartera Doc."; + VendLedgEntry: Record "Vendor Ledger Entry"; + GenJournalLine: Record "Gen. Journal Line"; + Vendor: Record Vendor; + SelectedEntryNos: List of [Integer]; + EntryNo: Integer; + VendLedgEntryFound: Boolean; + begin + if not SnapshotSelectedEntryNos(CarteraDoc, CarteraDoc.Type::Payable, SelectedEntryNos) then + exit; + + VendLedgEntry.SetLoadFields("Applies-to ID", "Document No.", "Vendor No.", "Document Situation"); + foreach EntryNo in SelectedEntryNos do begin + CarteraDocToProcess.Get(CarteraDocToProcess.Type::Payable, EntryNo); + VendLedgEntryFound := VendLedgEntry.Get(EntryNo); + if VendLedgEntryFound then begin + if VendLedgEntry."Applies-to ID" <> '' then + Error(EntryIsAppliedErr, CarteraDocToProcess."Document No.", CarteraDocToProcess."No."); + GenJournalLine.Reset(); + GenJournalLine.SetRange("Applies-to Doc. No.", VendLedgEntry."Document No."); + GenJournalLine.SetRange("Account Type", GenJournalLine."Account Type"::Vendor); + GenJournalLine.SetRange("Account No.", VendLedgEntry."Vendor No."); + if not GenJournalLine.IsEmpty() then + Error(EntryIsAppliedErr, CarteraDocToProcess."Document No.", CarteraDocToProcess."No."); + end; + + CarteraDocToProcess.TestField("Bill Gr./Pmt. Order No.", ''); + CarteraDocToProcess.TestField("Currency Code", PmtOrd."Currency Code"); + if Vendor."No." <> CarteraDocToProcess."Account No." then + Vendor.Get(CarteraDocToProcess."Account No."); + + if PmtOrd."Export Electronic Payment" then + ElectPmtMgmt.GetTransferType(CarteraDocToProcess."Account No.", CarteraDocToProcess."Remaining Amount", CarteraDocToProcess."Transfer Type", false); + + Vendor.CheckBlockedVendOnJnls(Vendor, GetDocType(CarteraDocToProcess."Document Type"), false); + if CarteraDocToProcess.Accepted = CarteraDocToProcess.Accepted::No then + CarteraDocToProcess.FieldError(Accepted); + CarteraDocToProcess.TestField("Collection Agent", CarteraDocToProcess."Collection Agent"::Bank); + CarteraDocToProcess."Bill Gr./Pmt. Order No." := GroupNo; + CarteraDocToProcess.Modify(true); + if VendLedgEntryFound then begin + VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::"BG/PO"; + VendLedgEntry.Modify(); + end; + OnAfterInsertPayableDocs(CarteraDocToProcess, PmtOrd); + end; + + PmtOrd."No. Printed" := 0; + PmtOrd.Modify(); + end; + + /// + /// Snapshots the selected entry numbers from a page-supplied Cartera Doc. recordset + /// into a list, so callers can iterate independently of the page-supplied cursor and + /// avoid the marked-cursor drop that occurs when Modify is called on that recordset. + /// + /// The page-supplied selection to snapshot. + /// The Cartera Doc. Type the caller will process; rows of other types are skipped. + /// Output: list of selected entry numbers of the expected Type. + /// True when the resulting list is non-empty; false otherwise. + local procedure SnapshotSelectedEntryNos(var SourceCarteraDoc: Record "Cartera Doc."; ExpectedType: Enum "Cartera Document Type"; var SelectedEntryNos: List of [Integer]): Boolean + var + CarteraDocSnapshot: Record "Cartera Doc."; + begin + CarteraDocSnapshot.Copy(SourceCarteraDoc); + CarteraDocSnapshot.SetLoadFields("Entry No."); + if not CarteraDocSnapshot.FindSet() then + exit(false); + repeat + if CarteraDocSnapshot.Type = ExpectedType then + SelectedEntryNos.Add(CarteraDocSnapshot."Entry No."); + until CarteraDocSnapshot.Next() = 0; + exit(SelectedEntryNos.Count() > 0); + end; + + procedure RemoveReceivableDocs(var CarteraDoc2: Record "Cartera Doc.") + var + BillGr: Record "Bill Group"; + CustLedgEntry: Record "Cust. Ledger Entry"; + begin + if CarteraDoc2.Find('-') then begin + BillGr.Get(CarteraDoc2."Bill Gr./Pmt. Order No."); + if not CheckConfirmBillGroupAlreadyPrinted(BillGr) then + exit; + BillGr."No. Printed" := 0; + repeat + RemoveReceivableError(CarteraDoc2); + CarteraDoc2."Bill Gr./Pmt. Order No." := ''; + CarteraDoc2.Modify(); + if CustLedgEntry.Get(CarteraDoc2."Entry No.") then begin + CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera; + CustLedgEntry.Modify(); + end; + OnAfterRemoveReceivableDocs(CarteraDoc2, BillGr); + until CarteraDoc2.Next() = 0; + BillGr.Modify(); + end; + end; + + local procedure CheckConfirmBillGroupAlreadyPrinted(BillGr: Record "Bill Group") Result: Boolean + var + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeCheckConfirmBillGroupAlreadyPrinted(BillGr, Result, IsHandled); + if IsHandled then + exit(Result); + + if BillGr."No. Printed" <> 0 then + if not Confirm(Text1100001, false) then + exit(false); + + exit(true); + end; + + procedure RemovePayableDocs(var CarteraDoc2: Record "Cartera Doc.") + var + PaymentOrder: Record "Payment Order"; + VendLedgEntry: Record "Vendor Ledger Entry"; + begin + if CarteraDoc2.Find('-') then begin + PaymentOrder.Get(CarteraDoc2."Bill Gr./Pmt. Order No."); + if not CheckConfirmPaymentOrderAlreadyPrinted(PaymentOrder) then + exit; + PaymentOrder."No. Printed" := 0; + repeat + RemovePayableError(CarteraDoc2); + CarteraDoc2."Bill Gr./Pmt. Order No." := ''; + CarteraDoc2.Modify(); + if VendLedgEntry.Get(CarteraDoc2."Entry No.") then begin + VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera; + VendLedgEntry.Modify(); + end; + OnAfterRemovePayableDocs(CarteraDoc2, PaymentOrder); + until CarteraDoc2.Next() = 0; + PaymentOrder.Modify(); + end; + end; + + local procedure CheckConfirmPaymentOrderAlreadyPrinted(PaymentOrder: Record "Payment Order") Result: Boolean + var + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeCheckConfirmPaymentOrderAlreadyPrinted(PaymentOrder, Result, IsHandled); + if IsHandled then + exit(Result); + + if PaymentOrder."No. Printed" <> 0 then + if not Confirm(Text1100004, false) then + exit(false); + + exit(true); + end; + + procedure CheckDiscCreditLimit(var BillGr: Record "Bill Group") + var + CarteraSetup: Record "Cartera Setup"; + BankAcc: Record "Bank Account"; + CheckDiscCreditLimit: Page "Check Discount Credit Limit"; + begin + CarteraSetup.Get(); + if not CarteraSetup."Bills Discount Limit Warnings" then + exit; + if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and BankAcc.Get(BillGr."Bank Account No.") then begin + BankAcc.CalcFields("Posted Receiv. Bills Rmg. Amt."); + BillGr.CalcFields(Amount); + if BillGr.Amount + BankAcc."Posted Receiv. Bills Rmg. Amt." > BankAcc."Credit Limit for Discount" then begin + CheckDiscCreditLimit.SetRecord(BankAcc); + CheckDiscCreditLimit.SetValues(BillGr.Amount, 0); + if CheckDiscCreditLimit.RunModal() <> ACTION::Yes then + Error(Text1100005); + Clear(CheckDiscCreditLimit); + end; + end; + end; + + procedure CreateReceivableDocPayment(var GenJnlLine2: Record "Gen. Journal Line"; var CustLedgEntry: Record "Cust. Ledger Entry") + var + PostedDoc: Record "Posted Cartera Doc."; + begin + GenJnlLine2."Account Type" := GenJnlLine2."Account Type"::Customer; + GenJnlLine2.Validate("Account No.", CustLedgEntry."Customer No."); + GenJnlLine2."Document Type" := GenJnlLine2."Document Type"::" "; + GenJnlLine2."Document No." := CustLedgEntry."Document No."; + GenJnlLine2."Bill No." := CustLedgEntry."Bill No."; + GenJnlLine2.Description := StrSubstNo( + Text1100006, + CustLedgEntry."Document No.", + CustLedgEntry."Bill No."); + GenJnlLine2.Validate("Currency Code", CustLedgEntry."Currency Code"); + CustLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + case CustLedgEntry."Document Situation" of + CustLedgEntry."Document Situation"::"Posted BG/PO": + begin + PostedDoc.Get(PostedDoc.Type::Receivable, CustLedgEntry."Entry No."); + GenJnlLine2.Validate(Amount, -PostedDoc."Remaining Amount"); + end; + CustLedgEntry."Document Situation"::"Closed BG/PO", CustLedgEntry."Document Situation"::"Closed Documents": + GenJnlLine2.Validate(Amount, -CustLedgEntry."Remaining Amount"); + end; + GenJnlLine2."Dimension Set ID" := GetCombinedDimSetID(GenJnlLine2, CustLedgEntry."Dimension Set ID"); + GenJnlLine2."System-Created Entry" := true; + GenJnlLine2."Applies-to Doc. Type" := GenJnlLine2."Document Type"::Bill; + GenJnlLine2."Applies-to Doc. No." := CustLedgEntry."Document No."; + GenJnlLine2."Applies-to Bill No." := CustLedgEntry."Bill No."; + + OnAfterCreateReceivableDocPayment(GenJnlLine2, CustLedgEntry); + end; + + [Scope('OnPrem')] + procedure ReverseReceivableDocPayment(var GenJnlLine2: Record "Gen. Journal Line"; var CustLedgEntry: Record "Cust. Ledger Entry") + var + PostedDoc: Record "Posted Cartera Doc."; + ClosedDoc: Record "Closed Cartera Doc."; + PostedBillGr: Record "Posted Bill Group"; + ClosedBillGr: Record "Closed Bill Group"; + begin + GenJnlLine2."Account Type" := GenJnlLine2."Account Type"::"Bank Account"; + GenJnlLine2."Document No." := CustLedgEntry."Document No."; + GenJnlLine2."Bill No." := CustLedgEntry."Bill No."; + GenJnlLine2.Description := StrSubstNo( + Text1100007, + CustLedgEntry."Document No.", + CustLedgEntry."Bill No."); + GenJnlLine2.Validate("Currency Code", CustLedgEntry."Currency Code"); + GenJnlLine2."System-Created Entry" := true; + if PostedDoc.Get(PostedDoc.Type::Receivable, CustLedgEntry."Entry No.") then begin + PostedBillGr.Get(PostedDoc."Bill Gr./Pmt. Order No."); + GenJnlLine2.Validate("Account No.", PostedBillGr."Bank Account No."); + GenJnlLine2.Validate(Amount, -PostedDoc."Amount for Collection"); + PostedDoc.TestField(Redrawn, false); + PostedDoc.Redrawn := true; + PostedDoc.Modify(); + end else + if ClosedDoc.Get(ClosedDoc.Type::Receivable, CustLedgEntry."Entry No.") then begin + if ClosedDoc."Bill Gr./Pmt. Order No." = '' then + Error(Text1100008); + ClosedBillGr.Get(ClosedDoc."Bill Gr./Pmt. Order No."); + GenJnlLine2.Validate("Account No.", ClosedBillGr."Bank Account No."); + GenJnlLine2.Validate(Amount, -ClosedDoc."Amount for Collection"); + ClosedDoc.TestField(Redrawn, false); + ClosedDoc.Redrawn := true; + ClosedDoc.Modify(); + end; + GenJnlLine2."Dimension Set ID" := GetCombinedDimSetID(GenJnlLine2, CustLedgEntry."Dimension Set ID"); + + OnAfterReverseReceivableDocPayment(GenJnlLine2, CustLedgEntry); + end; + + [Scope('OnPrem')] + procedure CreatePayableDocPayment(var GenJnlLine2: Record "Gen. Journal Line"; var VendLedgEntry: Record "Vendor Ledger Entry") + var + PostedDoc: Record "Posted Cartera Doc."; + begin + GenJnlLine2."Account Type" := GenJnlLine2."Account Type"::Vendor; + GenJnlLine2.Validate("Account No.", VendLedgEntry."Vendor No."); + GenJnlLine2."Document Type" := GenJnlLine2."Document Type"::" "; + GenJnlLine2."Document No." := VendLedgEntry."Document No."; + GenJnlLine2."Bill No." := VendLedgEntry."Bill No."; + GenJnlLine2.Description := StrSubstNo( + Text1100006, + VendLedgEntry."Document No.", + VendLedgEntry."Bill No."); + GenJnlLine2.Validate("Currency Code", VendLedgEntry."Currency Code"); + case VendLedgEntry."Document Situation" of + VendLedgEntry."Document Situation"::"Posted BG/PO": + begin + PostedDoc.Get(PostedDoc.Type::Payable, VendLedgEntry."Entry No."); + GenJnlLine2.Validate(Amount, -PostedDoc."Remaining Amount"); + end; + VendLedgEntry."Document Situation"::"Closed BG/PO": + GenJnlLine2.Validate(Amount, -VendLedgEntry."Remaining Amount"); + end; + GenJnlLine2."Dimension Set ID" := GetCombinedDimSetID(GenJnlLine2, VendLedgEntry."Dimension Set ID"); + GenJnlLine2."System-Created Entry" := true; + GenJnlLine2."Applies-to Doc. Type" := GenJnlLine2."Document Type"::Bill; + GenJnlLine2."Applies-to Doc. No." := VendLedgEntry."Document No."; + GenJnlLine2."Applies-to Bill No." := VendLedgEntry."Bill No."; + + OnAfterCreatePayableDocPayment(GenJnlLine2, VendLedgEntry); + end; + + [Scope('OnPrem')] + procedure ReversePayableDocPayment(var GenJnlLine2: Record "Gen. Journal Line"; var VendLedgEntry: Record "Vendor Ledger Entry") + var + PostedDoc: Record "Posted Cartera Doc."; + ClosedDoc: Record "Closed Cartera Doc."; + PostedPmtOrd: Record "Posted Payment Order"; + ClosedPmtOrd: Record "Closed Payment Order"; + begin + GenJnlLine2."Account Type" := GenJnlLine2."Account Type"::"Bank Account"; + GenJnlLine2."Document No." := VendLedgEntry."Document No."; + GenJnlLine2."Bill No." := VendLedgEntry."Bill No."; + GenJnlLine2.Description := StrSubstNo( + Text1100007, + VendLedgEntry."Document No.", + VendLedgEntry."Bill No."); + GenJnlLine2.Validate("Currency Code", VendLedgEntry."Currency Code"); + GenJnlLine2."System-Created Entry" := true; + if PostedDoc.Get(PostedDoc.Type::Payable, VendLedgEntry."Entry No.") then begin + PostedPmtOrd.Get(PostedDoc."Bill Gr./Pmt. Order No."); + GenJnlLine2.Validate("Account No.", PostedPmtOrd."Bank Account No."); + GenJnlLine2.Validate(Amount, PostedDoc."Amount for Collection"); + PostedDoc.TestField(Redrawn, false); + PostedDoc.Redrawn := true; + PostedDoc.Modify(); + end else + if ClosedDoc.Get(ClosedDoc.Type::Payable, VendLedgEntry."Entry No.") then begin + if ClosedDoc."Bill Gr./Pmt. Order No." = '' then + Error(Text1100009); + ClosedPmtOrd.Get(ClosedDoc."Bill Gr./Pmt. Order No."); + GenJnlLine2.Validate("Account No.", ClosedPmtOrd."Bank Account No."); + GenJnlLine2.Validate(Amount, ClosedDoc."Amount for Collection"); + ClosedDoc.TestField(Redrawn, false); + ClosedDoc.Redrawn := true; + ClosedDoc.Modify(); + end; + GenJnlLine2."Dimension Set ID" := GetCombinedDimSetID(GenJnlLine2, VendLedgEntry."Dimension Set ID"); + + OnAfterReversePayableDocPayment(GenJnlLine2, VendLedgEntry); + end; + + procedure CustUnrealizedVAT2(CustLedgEntry2: Record "Cust. Ledger Entry"; AmountLCY: Decimal; GenJnlLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntry: Integer; var LastVATEntry: Integer; var NoRealVATBuffer: Record "BG/PO Post. Buffer"; IsFromJournal: Boolean; PostedDocumentNo: Code[20]) + var + CustLedgEntry3: Record "Cust. Ledger Entry"; + begin + if GenJnlPostLine.CustFindVATSetup(VATPostingSetup, CustLedgEntry2, IsFromJournal) then begin + CustLedgEntry3.SetCurrentKey("Document No.", "Document Type", "Customer No."); + CustLedgEntry3.SetRange("Document Type", CustLedgEntry3."Document Type"::Invoice); + CustLedgEntry3.SetRange("Document No.", CustLedgEntry2."Document No."); + + if CustLedgEntry3.FindFirst() then begin + CustLedgEntry3.Open := true; + CustUnrealizedVAT( + CustLedgEntry3, -AmountLCY, GenJnlLine, ExistVATEntry, FirstVATEntry, LastVATEntry, NoRealVATBuffer, PostedDocumentNo); + end; + end else + exit; + end; + + local procedure CustUnrealizedVAT(var CustLedgEntry2: Record "Cust. Ledger Entry"; SettledAmount: Decimal; GenJnlLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var NoRealVATBuffer: Record "BG/PO Post. Buffer"; PostedDocumentNo: Code[20]) + var + VATEntry: Record "VAT Entry"; + VATEntry2: Record "VAT Entry"; + VATEntry3: Record "VAT Entry"; + VATEntryLast: Record "VAT Entry"; + PaymentTerms: Record "Payment Terms"; + SalesInvHeader: Record "Sales Invoice Header"; + VATPart: Decimal; + VATAmount: Decimal; + VATBase: Decimal; + VATAmountAddCurr: Decimal; + VATBaseAddCurr: Decimal; + CurrencyFactor: Decimal; + SalesVATAccount: Code[20]; + SalesVATUnrealAccount: Code[20]; + LastConnectionNo: Integer; + Test1: Boolean; + Test2: Boolean; + IsLastEntry: Boolean; + PaymentTermsCode: Code[20]; + begin + OnBeforeCustUnrealizedVAT( + CustLedgEntry2, SettledAmount, GenJnlLine, ExistVATEntry, FirstVATEntryNo, LastVATEntryNo, + NoRealVATBuffer, PostedDocumentNo, PaymentTermsCode, VATPostingSetup); + + if PostedDocumentNo <> '' then begin + SalesInvHeader.Get(PostedDocumentNo); + PaymentTermsCode := SalesInvHeader."Payment Terms Code"; + end; + + CustLedgEntry2.CalcFields( + Amount, + "Amount (LCY)", + "Remaining Amount", + "Remaining Amt. (LCY)", + "Original Amt. (LCY)"); + CurrencyFactor := CustLedgEntry2.Amount / CustLedgEntry2."Amount (LCY)"; + VATEntry2.Reset(); + VATEntry2.SetCurrentKey("Transaction No."); + VATEntry2.SetRange("Transaction No.", CustLedgEntry2."Transaction No."); + + VATEntryLast.Copy(VATEntry2); + if VATEntryLast.FindLast() then; + + if VATEntry2.Find('-') then begin + LastConnectionNo := 0; + repeat + if LastConnectionNo <> VATEntry2."Sales Tax Connection No." then + LastConnectionNo := VATEntry2."Sales Tax Connection No."; + + VATEntry3.Reset(); + if VATEntry3.FindLast() then + VATEntryNo := VATEntry3."Entry No." + 1; + + if (VATEntry2.Type <> VATEntry2.Type::" ") and + (VATEntry2.Amount = 0) and + (VATEntry2.Base = 0) + then begin + case VATEntry2."VAT Calculation Type" of + VATEntry2."VAT Calculation Type"::"Normal VAT", + VATEntry2."VAT Calculation Type"::"Reverse Charge VAT", + VATEntry2."VAT Calculation Type"::"Full VAT": + VATPostingSetup.Get( + VATEntry2."VAT Bus. Posting Group", VATEntry2."VAT Prod. Posting Group"); + end; + if (VATPostingSetup."Unrealized VAT Type" > 0) and + ((VATEntry2."Remaining Unrealized Amount" <> 0) or + (VATEntry2."Remaining Unrealized Base" <> 0)) + then begin + if not CustLedgEntry2.Open then + VATPart := 1 + else + if CustLedgEntry2."Currency Code" = '' then + VATPart := -SettledAmount / CustLedgEntry2."Original Amt. (LCY)" + else + VATPart := + -SettledAmount * + (CustLedgEntry2."Original Amt. (LCY)" / CustLedgEntry2.Amount) / CustLedgEntry2."Original Amt. (LCY)"; + OnCustUnrealizedVATOnAfterVATPartCalculated(CustLedgEntry2, VATEntry2, VATPostingSetup, SettledAmount, VATPart); + end; + if VATPart <> 0 then begin + case VATEntry2."VAT Calculation Type" of + VATEntry2."VAT Calculation Type"::"Normal VAT", + VATEntry2."VAT Calculation Type"::"Reverse Charge VAT", + VATEntry2."VAT Calculation Type"::"Full VAT": + begin + VATPostingSetup.TestField("Sales VAT Account"); + VATPostingSetup.TestField("Sales VAT Unreal. Account"); + SalesVATAccount := VATPostingSetup."Sales VAT Account"; + SalesVATUnrealAccount := VATPostingSetup."Sales VAT Unreal. Account"; + end; + end; + PaymentTerms.Get(PaymentTermsCode); + if PaymentTerms."VAT distribution" = PaymentTerms."VAT distribution"::"First Installment" then + VATPart := 1; + + if VATPart = 1 then begin + VATAmount := VATEntry2."Remaining Unrealized Amount"; + VATBase := VATEntry2."Remaining Unrealized Base"; + VATAmountAddCurr := VATEntry2."Add.-Curr. Rem. Unreal. Amount"; + VATBaseAddCurr := VATEntry2."Add.-Curr. Rem. Unreal. Base"; + end else begin + VATAmount := Round(VATEntry2."Unrealized Amount" * VATPart); + VATBase := Round(VATEntry2."Unrealized Base" * VATPart); + end; + + VATUnrealAcc := SalesVATUnrealAccount; + VATAcc := SalesVATAccount; + if CustLedgEntry2."Currency Code" = '' then + TotalVATAmount := VATAmount + else + TotalVATAmount := VATAmount * CurrencyFactor; + + if NoRealVATBuffer.Get(SalesVATUnrealAccount, SalesVATAccount, VATEntry2."Entry No.") then + NoRealVATBuffer.Amount := NoRealVATBuffer.Amount + TotalVATAmount + else begin + NoRealVATBuffer.Init(); + NoRealVATBuffer.Account := SalesVATUnrealAccount; + NoRealVATBuffer."Balance Account" := SalesVATAccount; + NoRealVATBuffer.Amount := TotalVATAmount; + NoRealVATBuffer."Entry No." := VATEntry2."Entry No."; + NoRealVATBuffer.Insert(); + end; + + VATEntry := VATEntry2; + VATEntry."Entry No." := VATEntryNo; + VATEntry."Posting Date" := GenJnlLine."Posting Date"; + VATEntry.SetVATDateFromGenJnlLine(GenJnlLine); + VATEntry."Document No." := GenJnlLine."Document No."; + VATEntry."External Document No." := GenJnlLine."External Document No."; + VATEntry."Document Type" := GenJnlLine."Document Type"; + VATEntry.Amount := VATAmount; + VATEntry.Base := VATBase; + VATEntry."Unrealized Amount" := 0; + VATEntry."Unrealized Base" := 0; + VATEntry."Remaining Unrealized Amount" := 0; + VATEntry."Remaining Unrealized Base" := 0; + VATEntry."Additional-Currency Amount" := VATAmountAddCurr; + VATEntry."Additional-Currency Base" := VATBaseAddCurr; + VATEntry."Add.-Currency Unrealized Amt." := 0; + VATEntry."Add.-Currency Unrealized Base" := 0; + VATEntry."Add.-Curr. Rem. Unreal. Amount" := 0; + VATEntry."Add.-Curr. Rem. Unreal. Base" := 0; + VATEntry."User ID" := UserId; + VATEntry."Source Code" := GenJnlLine."Source Code"; + VATEntry."Reason Code" := GenJnlLine."Reason Code"; + VATEntry."Closed by Entry No." := 0; + VATEntry.Closed := false; + VATEntry."Transaction No." := CustLedgEntry2."Transaction No."; + VATEntry."Unrealized VAT Entry No." := VATEntry2."Entry No."; + VATEntry.UpdateRates(VATPostingSetup); + Test1 := VATEntry.Insert(); + + VATEntry2."Remaining Unrealized Amount" := + VATEntry2."Remaining Unrealized Amount" - VATEntry.Amount; + VATEntry2."Remaining Unrealized Base" := + VATEntry2."Remaining Unrealized Base" - VATEntry.Base; + VATEntry2."Add.-Curr. Rem. Unreal. Amount" := + VATEntry2."Add.-Curr. Rem. Unreal. Amount" - VATEntry."Additional-Currency Amount"; + VATEntry2."Add.-Curr. Rem. Unreal. Base" := + VATEntry2."Add.-Curr. Rem. Unreal. Base" - VATEntry."Additional-Currency Base"; + OnCustUnrealizedVATOnBeforeVATEntryModify(VATEntry, CustLedgEntry2, GenJnlLine); + Test2 := VATEntry2.Modify(); + LastVATEntryNo := VATEntryNo; + end; + end; + + if not ExistVATEntry then + FirstVATEntryNo := LastVATEntryNo; + ExistVATEntry := Test1 and Test2; + + IsLastEntry := VATEntryLast."Entry No." = VATEntry2."Entry No."; + + until (VATEntry2.Next() = 0) or IsLastEntry; + end; + end; + + procedure VendUnrealizedVAT2(VendLedgEntry2: Record "Vendor Ledger Entry"; AmountLCY: Decimal; GenJnlLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntry: Integer; var LastVATEntry: Integer; var NoRealVATBuffer: Record "BG/PO Post. Buffer"; IsFromJournal: Boolean; PostedDocumentNo: Code[20]) + var + VendLedgEntry3: Record "Vendor Ledger Entry"; + begin + if GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry2, IsFromJournal) then begin + VendLedgEntry3.SetCurrentKey("Document No.", "Document Type", "Vendor No."); + VendLedgEntry3.SetRange("Document Type", VendLedgEntry3."Document Type"::Invoice); + VendLedgEntry3.SetRange("Document No.", VendLedgEntry2."Document No."); + + OnVendUnrealizedVAT2OnAfterSetFilters( + VendLedgEntry2, VendLedgEntry3, AmountLCY, GenJnlLine, ExistVATEntry, FirstVATEntry, LastVATEntry, + NoRealVATBuffer, IsFromJournal, PostedDocumentNo); + if VendLedgEntry3.FindFirst() then begin + VendLedgEntry3.Open := true; + VendUnrealizedVAT( + VendLedgEntry3, -AmountLCY, GenJnlLine, ExistVATEntry, FirstVATEntry, LastVATEntry, NoRealVATBuffer, PostedDocumentNo); + end; + end else + exit; + end; + + local procedure VendUnrealizedVAT(var VendLedgEntry2: Record "Vendor Ledger Entry"; SettledAmount: Decimal; GenJnlLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var NoRealVATBuffer: Record "BG/PO Post. Buffer"; PostedDocumentNo: Code[20]) + var + VATEntry: Record "VAT Entry"; + VATEntry2: Record "VAT Entry"; + VATEntry3: Record "VAT Entry"; + VATEntryLast: Record "VAT Entry"; + PurchInvHeader: Record "Purch. Inv. Header"; + PaymentTerms: Record "Payment Terms"; + VATPart: Decimal; + VATAmount: Decimal; + VATBase: Decimal; + VATAmountAddCurr: Decimal; + VATBaseAddCurr: Decimal; + CurrencyFactor: Decimal; + PurchVATAccount: Code[20]; + PurchVATUnrealAccount: Code[20]; + LastConnectionNo: Integer; + Test1: Boolean; + Test2: Boolean; + IsLastEntry: Boolean; + PaymentTermsCode: Code[20]; + ReverseChrgVATAcc: Code[20]; + ReverseChrgVATUnrealAcc: Code[20]; + begin + OnBeforeVendUnrealizedVAT( + VendLedgEntry2, SettledAmount, GenJnlLine, ExistVATEntry, FirstVATEntryNo, LastVATEntryNo, + NoRealVATBuffer, PostedDocumentNo, PaymentTermsCode, VATPostingSetup); + + if PostedDocumentNo <> '' then begin + PurchInvHeader.Get(PostedDocumentNo); + PaymentTermsCode := PurchInvHeader."Payment Terms Code"; + end; + + VendLedgEntry2.CalcFields( + Amount, + "Amount (LCY)", + "Remaining Amount", + "Remaining Amt. (LCY)", + "Original Amt. (LCY)"); + CurrencyFactor := VendLedgEntry2.Amount / VendLedgEntry2."Amount (LCY)"; + VATEntry2.Reset(); + VATEntry2.SetCurrentKey("Transaction No."); + VATEntry2.SetRange("Transaction No.", VendLedgEntry2."Transaction No."); + + VATEntryLast.Copy(VATEntry2); + if VATEntryLast.FindLast() then; + + if VATEntry2.Find('-') then begin + LastConnectionNo := 0; + repeat + if LastConnectionNo <> VATEntry2."Sales Tax Connection No." then + LastConnectionNo := VATEntry2."Sales Tax Connection No."; + + VATEntry3.Reset(); + if VATEntry3.FindLast() then + VATEntryNo := VATEntry3."Entry No." + 1; + + if (VATEntry2.Type <> VATEntry2.Type::" ") and + (VATEntry2.Amount = 0) and + (VATEntry2.Base = 0) + then begin + case VATEntry2."VAT Calculation Type" of + VATEntry2."VAT Calculation Type"::"Normal VAT", + VATEntry2."VAT Calculation Type"::"Reverse Charge VAT", + VATEntry2."VAT Calculation Type"::"Full VAT": + VATPostingSetup.Get( + VATEntry2."VAT Bus. Posting Group", VATEntry2."VAT Prod. Posting Group"); + end; + if (VATPostingSetup."Unrealized VAT Type" > 0) and + ((VATEntry2."Remaining Unrealized Amount" <> 0) or + (VATEntry2."Remaining Unrealized Base" <> 0)) + then begin + if not VendLedgEntry2.Open then + VATPart := 1 + else + if VendLedgEntry2."Currency Code" = '' then + VATPart := -SettledAmount / VendLedgEntry2."Original Amt. (LCY)" + else + VATPart := + -SettledAmount * + (VendLedgEntry2."Original Amt. (LCY)" / VendLedgEntry2.Amount) / VendLedgEntry2."Original Amt. (LCY)"; + OnVendUnrealizedVATOnAfterVATPartCalculated(VendLedgEntry2, VATEntry2, VATPostingSetup, SettledAmount, VATPart); + end; + if VATPart <> 0 then begin + case VATEntry2."VAT Calculation Type" of + VATEntry2."VAT Calculation Type"::"Normal VAT", + VATEntry2."VAT Calculation Type"::"Reverse Charge VAT", + VATEntry2."VAT Calculation Type"::"Full VAT": + begin + VATPostingSetup.TestField("Purchase VAT Account"); + VATPostingSetup.TestField("Purch. VAT Unreal. Account"); + if VATEntry2."VAT Calculation Type" = VATEntry2."VAT Calculation Type"::"Reverse Charge VAT" then begin + VATPostingSetup.TestField("Reverse Chrg. VAT Acc."); + VATPostingSetup.TestField("Reverse Chrg. VAT Unreal. Acc."); + ReverseChrgVATAcc := VATPostingSetup."Reverse Chrg. VAT Acc."; + ReverseChrgVATUnrealAcc := VATPostingSetup."Reverse Chrg. VAT Unreal. Acc."; + end; + PurchVATAccount := VATPostingSetup."Purchase VAT Account"; + PurchVATUnrealAccount := VATPostingSetup."Purch. VAT Unreal. Account"; + end; + end; + PaymentTerms.Get(PaymentTermsCode); + if PaymentTerms."VAT distribution" = PaymentTerms."VAT distribution"::"First Installment" then + VATPart := 1; + + if VATPart = 1 then begin + VATAmount := VATEntry2."Remaining Unrealized Amount"; + VATBase := VATEntry2."Remaining Unrealized Base"; + VATAmountAddCurr := VATEntry2."Add.-Curr. Rem. Unreal. Amount"; + VATBaseAddCurr := VATEntry2."Add.-Curr. Rem. Unreal. Base"; + end else begin + VATAmount := Round(VATEntry2."Unrealized Amount" * VATPart); + VATBase := Round(VATEntry2."Unrealized Base" * VATPart); + end; + + VATUnrealAcc := PurchVATUnrealAccount; + VATAcc := PurchVATAccount; + if VendLedgEntry2."Currency Code" = '' then + TotalVATAmount := VATAmount + else + TotalVATAmount := VATAmount * CurrencyFactor; + + if NoRealVATBuffer.Get(PurchVATUnrealAccount, PurchVATAccount, VATEntry2."Entry No.") then + NoRealVATBuffer.Amount := NoRealVATBuffer.Amount + TotalVATAmount + else begin + NoRealVATBuffer.Init(); + NoRealVATBuffer.Account := PurchVATUnrealAccount; + NoRealVATBuffer."Balance Account" := PurchVATAccount; + NoRealVATBuffer.Amount := TotalVATAmount; + NoRealVATBuffer."Entry No." := VATEntry2."Entry No."; + NoRealVATBuffer.Insert(); + end; + + if VATEntry2."VAT Calculation Type" = VATEntry2."VAT Calculation Type"::"Reverse Charge VAT" then + if NoRealVATBuffer.Get(ReverseChrgVATAcc, ReverseChrgVATUnrealAcc, VATEntry2."Entry No.") then + NoRealVATBuffer.Amount := NoRealVATBuffer.Amount + TotalVATAmount + else begin + NoRealVATBuffer.Init(); + NoRealVATBuffer.Account := ReverseChrgVATAcc; + NoRealVATBuffer."Balance Account" := ReverseChrgVATUnrealAcc; + NoRealVATBuffer.Amount := TotalVATAmount; + NoRealVATBuffer."Entry No." := VATEntry2."Entry No."; + NoRealVATBuffer.Insert(); + end; + + VATEntry := VATEntry2; + VATEntry."Entry No." := VATEntryNo; + VATEntry."Posting Date" := GenJnlLine."Posting Date"; + VATEntry.SetVATDateFromGenJnlLine(GenJnlLine); + VATEntry."Document No." := GenJnlLine."Document No."; + VATEntry."External Document No." := GenJnlLine."External Document No."; + VATEntry."Document Type" := GenJnlLine."Document Type"; + VATEntry.Amount := VATAmount; + VATEntry.Base := VATBase; + VATEntry."Unrealized Amount" := 0; + VATEntry."Unrealized Base" := 0; + VATEntry."Remaining Unrealized Amount" := 0; + VATEntry."Remaining Unrealized Base" := 0; + VATEntry."Additional-Currency Amount" := VATAmountAddCurr; + VATEntry."Additional-Currency Base" := VATBaseAddCurr; + VATEntry."Add.-Currency Unrealized Amt." := 0; + VATEntry."Add.-Currency Unrealized Base" := 0; + VATEntry."Add.-Curr. Rem. Unreal. Amount" := 0; + VATEntry."Add.-Curr. Rem. Unreal. Base" := 0; + VATEntry."User ID" := UserId; + VATEntry."Source Code" := GenJnlLine."Source Code"; + VATEntry."Reason Code" := GenJnlLine."Reason Code"; + VATEntry."Closed by Entry No." := 0; + VATEntry.Closed := false; + VATEntry."Transaction No." := VendLedgEntry2."Transaction No."; + VATEntry."Unrealized VAT Entry No." := VATEntry2."Entry No."; + VATEntry.UpdateRates(VATPostingSetup); + Test1 := VATEntry.Insert(); + + VATEntry2."Remaining Unrealized Amount" := + VATEntry2."Remaining Unrealized Amount" - VATEntry.Amount; + VATEntry2."Remaining Unrealized Base" := + VATEntry2."Remaining Unrealized Base" - VATEntry.Base; + VATEntry2."Add.-Curr. Rem. Unreal. Amount" := + VATEntry2."Add.-Curr. Rem. Unreal. Amount" - VATEntry."Additional-Currency Amount"; + VATEntry2."Add.-Curr. Rem. Unreal. Base" := + VATEntry2."Add.-Curr. Rem. Unreal. Base" - VATEntry."Additional-Currency Base"; + OnVendUnrealizedVATOnBeforeVATEntry2Modify(VATEntry, VendLedgEntry2, GenJnlLine); + Test2 := VATEntry2.Modify(); + LastVATEntryNo := VATEntryNo; + end; + end; + + if not ExistVATEntry then + FirstVATEntryNo := LastVATEntryNo; + ExistVATEntry := Test1 and Test2; + + IsLastEntry := VATEntryLast."Entry No." = VATEntry2."Entry No."; + + until (VATEntry2.Next() = 0) or IsLastEntry; + end; + end; + + [Scope('OnPrem')] + procedure GetLastDate(CurrCode: Code[10]; DocPostDate: Date; Type: Option Receivable,Payable): Date + var + ExchRateAdjReg: Record "Exch. Rate Adjmt. Reg."; + begin + ExchRateAdjReg.SetRange("Currency Code", CurrCode); + if Type = Type::Receivable then + ExchRateAdjReg.SetRange("Account Type", ExchRateAdjReg."Account Type"::Customer) + else + ExchRateAdjReg.SetRange("Account Type", ExchRateAdjReg."Account Type"::Vendor); + if ExchRateAdjReg.FindLast() then + if ExchRateAdjReg."Creation Date" > DocPostDate then + exit(ExchRateAdjReg."Creation Date") + else + exit(DocPostDate) + else + exit(DocPostDate); + end; + + procedure GetGainLoss(PostingDate: Date; PostingDate2: Date; AmountFCY: Decimal; CurrencyCode: Code[10]): Decimal + begin + exit( + GetAmountLCYBasedOnCurrencyDate(PostingDate2, CurrencyCode, AmountFCY) - + GetAmountLCYBasedOnCurrencyDate(PostingDate, CurrencyCode, AmountFCY)); + end; + + procedure GetCurrFactorGainLoss(CurrFactor1: Decimal; CurrFactor2: Decimal; AmountFCY: Decimal; CurrencyCode: Code[10]): Decimal + begin + exit( + GetAmountLCYBasedOnCurrencyFactor(CurrencyCode, CurrFactor2, AmountFCY) - + GetAmountLCYBasedOnCurrencyFactor(CurrencyCode, CurrFactor1, AmountFCY)); + end; + + procedure CheckFromRedrawnDoc(DocNo: Code[20]): Boolean + begin + if StrPos(DocNo, '-') = 0 then + exit(false); + + exit(true); + end; + + local procedure GetDocType(Type: Enum "Cartera Document Doc. Type"): Enum "Gen. Journal Document Type" + begin + case Type of + Type::Invoice, Type::Bill: + exit("Gen. Journal Document Type"::Payment); + else + exit("Gen. Journal Document Type"::" "); + end; + end; + + local procedure RemovePayableError(CarteraDoc: Record "Cartera Doc.") + var + PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text"; + begin + PaymentJnlExportErrorText.SetRange("Document No.", CarteraDoc."Bill Gr./Pmt. Order No."); + PaymentJnlExportErrorText.SetRange("Journal Line No.", CarteraDoc."Entry No."); + PaymentJnlExportErrorText.DeleteAll(true); + end; + + local procedure RemoveReceivableError(CarteraDoc: Record "Cartera Doc.") + var + PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text"; + begin + PaymentJnlExportErrorText.SetRange("Journal Template Name", ''); + PaymentJnlExportErrorText.SetRange("Journal Batch Name", Format(DATABASE::"Bill Group")); + PaymentJnlExportErrorText.SetRange("Document No.", CarteraDoc."Bill Gr./Pmt. Order No."); + PaymentJnlExportErrorText.SetRange("Journal Line No.", CarteraDoc."Entry No."); + PaymentJnlExportErrorText.DeleteAll(true); + end; + + procedure GetDimSetIDFromCustLedgEntry(GenJnlLine: Record "Gen. Journal Line"; CustLedgEntry: Record "Cust. Ledger Entry"; IsPostedDoc: Boolean) DimSetID: Integer + var + PostedCarteraDoc: Record "Posted Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + begin + if IsPostedDoc then begin + PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Receivable); + PostedCarteraDoc.SetRange("Document No.", CustLedgEntry."Document No."); + if CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Bill then + PostedCarteraDoc.SetRange("No.", CustLedgEntry."Bill No."); + PostedCarteraDoc.FindLast(); + DimSetID := PostedCarteraDoc."Dimension Set ID"; + end else begin + ClosedCarteraDoc.SetRange(Type, ClosedCarteraDoc.Type::Receivable); + ClosedCarteraDoc.SetRange("Document No.", CustLedgEntry."Document No."); + if CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Bill then + ClosedCarteraDoc.SetRange("No.", CustLedgEntry."Bill No."); + ClosedCarteraDoc.FindLast(); + DimSetID := ClosedCarteraDoc."Dimension Set ID"; + end; + exit(GetCombinedDimSetID(GenJnlLine, DimSetID)); + end; + + procedure GetDimSetIDFromCustPostDocBuffer(GenJnlLine: Record "Gen. Journal Line"; CustLedgEntry: Record "Cust. Ledger Entry"; var PostDocBuffer: Record "Posted Cartera Doc."): Integer + begin + PostDocBuffer.SetRange(Type, PostDocBuffer.Type::Receivable); + PostDocBuffer.SetRange("Document No.", CustLedgEntry."Document No."); + if CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Bill then + PostDocBuffer.SetRange("No.", CustLedgEntry."Bill No."); + PostDocBuffer.FindLast(); + PostDocBuffer.Reset(); + exit(GetCombinedDimSetID(GenJnlLine, PostDocBuffer."Dimension Set ID")); + end; + + procedure GetCombinedDimSetID(GenJnlLine: Record "Gen. Journal Line"; DimSetID: Integer): Integer + var + DimensioMgt: Codeunit DimensionManagement; + DimensionSetIDArr: array[10] of Integer; + begin + DimensionSetIDArr[1] := GenJnlLine."Dimension Set ID"; + DimensionSetIDArr[2] := DimSetID; + exit( + DimensioMgt.GetCombinedDimensionSetID(DimensionSetIDArr, GenJnlLine."Shortcut Dimension 1 Code", GenJnlLine."Shortcut Dimension 2 Code")); + end; + + local procedure GetAmountLCYBasedOnCurrencyDate(PostingDate: Date; CurrencyCode: Code[10]; AmountFCY: Decimal): Decimal + var + TempGenJournalLine: Record "Gen. Journal Line" temporary; + begin + TempGenJournalLine.Init(); + TempGenJournalLine."Posting Date" := PostingDate; + TempGenJournalLine.Validate("Account Type", TempGenJournalLine."Account Type"::"G/L Account"); + TempGenJournalLine.Validate("Currency Code", CurrencyCode); + TempGenJournalLine.Validate(Amount, AmountFCY); + TempGenJournalLine.Insert(); + exit(TempGenJournalLine."Amount (LCY)"); + end; + + local procedure GetAmountLCYBasedOnCurrencyFactor(CurrencyCode: Code[10]; CurrencyFactor: Decimal; AmountFCY: Decimal): Decimal + var + TempGenJournalLine: Record "Gen. Journal Line" temporary; + begin + TempGenJournalLine.Init(); + TempGenJournalLine.Validate("Currency Code", CurrencyCode); + TempGenJournalLine.Validate("Currency Factor", CurrencyFactor); + TempGenJournalLine.Validate(Amount, AmountFCY); + TempGenJournalLine.Insert(); + exit(TempGenJournalLine."Amount (LCY)"); + end; + + local procedure CheckUseForElectronicPayments(No: Code[20]): Boolean + var + VendorBankAccount: Record "Vendor Bank Account"; + begin + VendorBankAccount.SetRange("Vendor No.", No); + VendorBankAccount.SetRange("Use For Electronic Payments", true); + exit(not VendorBankAccount.IsEmpty()); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCreatePayableDocPayment(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCreateReceivableDocPayment(var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterInsertPayableDocs(var CarteraDoc: Record "Cartera Doc."; var PaymentOrder: Record "Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterInsertReceivableDocs(var CarteraDoc: Record "Cartera Doc."; var BillGroup: Record "Bill Group") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterRemovePayableDocs(var CarteraDoc: Record "Cartera Doc."; var PaymentOrder: Record "Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterRemoveReceivableDocs(var CarteraDoc: Record "Cartera Doc."; var BillGroup: Record "Bill Group") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterReversePayableDocPayment(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterReverseReceivableDocPayment(var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCheckConfirmBillGroupAlreadyPrinted(BillGr: Record "Bill Group"; var Result: Boolean; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCheckConfirmPaymentOrderAlreadyPrinted(PaymentOrder: Record "Payment Order"; var Result: Boolean; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCustUnrealizedVAT(var CustLedgerEntry: Record "Cust. Ledger Entry"; var SettledAmount: Decimal; var GenJournalLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var PostedDocumentNo: Code[20]; var PaymentTermsCode: Code[20]; var VATPostingSetup: Record "VAT Posting Setup") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeVendUnrealizedVAT(var VendLedgEntry: Record "Vendor Ledger Entry"; var SettledAmount: Decimal; var GenJournalLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var PostedDocumentNo: Code[20]; var PaymentTermsCode: Code[20]; var VATPostingSetup: Record "VAT Posting Setup") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnCustUnrealizedVATOnAfterVATPartCalculated(CustLedgerEntry: Record "Cust. Ledger Entry"; VATEntry: Record "VAT Entry"; VATPostingSetup: Record "VAT Posting Setup"; var SettledAmount: Decimal; var VATPart: Decimal) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnCustUnrealizedVATOnBeforeVATEntryModify(var VATEntry: Record "VAT Entry"; CustLedgerEntry: Record "Cust. Ledger Entry"; GenJournalLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnInsertPayableDocsOnAfterSetFilters(var CarteraDoc: Record "Cartera Doc."; var CarteraDoc2: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnInsertReceivableDocsOnAfterSetFilters(var CarteraDoc: Record "Cartera Doc."; BillGroup: Record "Bill Group") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnVendUnrealizedVAT2OnAfterSetFilters(var VendLedgEntry2: Record "Vendor Ledger Entry"; var VendLedgEntry3: Record "Vendor Ledger Entry"; var SettledAmount: Decimal; var GenJournalLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var IsFromJournal: Boolean; var PostedDocumentNo: Code[20]) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnVendUnrealizedVATOnAfterVATPartCalculated(VendorLedgerEntry: Record "Vendor Ledger Entry"; VATEntry: Record "VAT Entry"; VATPostingSetup: Record "VAT Posting Setup"; var SettledAmount: Decimal; var VATPart: Decimal) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnVendUnrealizedVATOnBeforeVATEntry2Modify(var VATEntry: Record "VAT Entry"; VendLedgEntry2: Record "Vendor Ledger Entry"; GenJnlLine: Record "Gen. Journal Line") + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraReportSelections.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraReportSelections.Table.al new file mode 100644 index 00000000000..1d337b4861d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraReportSelections.Table.al @@ -0,0 +1,70 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using System.Reflection; + +table 7000013 "Cartera Report Selections" +{ + Caption = 'Cartera Report Selections'; + DataClassification = CustomerContent; + + fields + { + field(1; Usage; Enum "Report Selection Usage Cartera") + { + Caption = 'Usage'; + } + field(2; Sequence; Code[10]) + { + Caption = 'Sequence'; + Numeric = true; + } + field(3; "Report ID"; Integer) + { + Caption = 'Report ID'; + TableRelation = AllObjWithCaption."Object ID" where("Object Type" = const(Report)); + + trigger OnValidate() + begin + CalcFields("Report Name"); + end; + } + field(4; "Report Name"; Text[30]) + { + CalcFormula = lookup(Object.Name where(Type = const(Report), + ID = field("Report ID"))); + Caption = 'Report Name'; + Editable = false; + FieldClass = FlowField; + } + } + + keys + { + key(Key1; Usage, Sequence) + { + Clustered = true; + } + } + + fieldgroups + { + } + + var + CarteraReportSelection2: Record "Cartera Report Selections"; + + [Scope('OnPrem')] + procedure NewRecord() + begin + CarteraReportSelection2.SetRange(Usage, Usage); + if CarteraReportSelection2.FindLast() and (CarteraReportSelection2.Sequence <> '') then + Sequence := IncStr(CarteraReportSelection2.Sequence) + else + Sequence := '1'; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSetup.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSetup.Page.al new file mode 100644 index 00000000000..e25f1dc4d53 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSetup.Page.al @@ -0,0 +1,89 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.NoSeries; + +page 7000040 "Cartera Setup" +{ + ApplicationArea = Basic, Suite; + Caption = 'Cartera Setup'; + DeleteAllowed = false; + InsertAllowed = false; + PageType = Card; + SourceTable = "Cartera Setup"; + UsageCategory = Administration; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Bills Discount Limit Warnings"; Rec."Bills Discount Limit Warnings") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if a warning message is issued when the credit limit authorized by the selected bank for a bill group is exceeded.'; + } + field("Euro Currency Code"; Rec."Euro Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code that represents the euro.'; + } + } + group(Numbering) + { + Caption = 'Numbering'; + field("GenLedgerSetup.""Bank Account Nos."""; GenLedgerSetup."Bank Account Nos.") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank Account Nos.'; + TableRelation = "No. Series"; + ToolTip = 'Specifies the number series for bank accounts.'; + + trigger OnValidate() + begin + GenLedgerSetupBankAccountNosOn(); + end; + } + field("Bill Group Nos."; Rec."Bill Group Nos.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the numbering code used to assign numbers to bill groups.'; + } + field("Payment Order Nos."; Rec."Payment Order Nos.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the numbering code used to assign numbers to payment orders.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + GenLedgerSetup.Get(); + end; + + trigger OnOpenPage() + begin + GenLedgerSetup.Get(); + end; + + var + GenLedgerSetup: Record "General Ledger Setup"; + + local procedure GenLedgerSetupBankAccountNosOn() + begin + GenLedgerSetup.Modify(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSetup.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSetup.Table.al new file mode 100644 index 00000000000..5e2e80da5bc --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSetup.Table.al @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.Currency; +using Microsoft.Foundation.NoSeries; + +table 7000016 "Cartera Setup" +{ + Caption = 'Cartera Setup'; + DataClassification = CustomerContent; + + fields + { + field(1; "Primary Key"; Code[10]) + { + Caption = 'Primary Key'; + } + field(3; "Bill Group Nos."; Code[20]) + { + Caption = 'Bill Group Nos.'; + TableRelation = "No. Series"; + } + field(4; "Payment Order Nos."; Code[20]) + { + Caption = 'Payment Order Nos.'; + TableRelation = "No. Series"; + } + field(7; "Bills Discount Limit Warnings"; Boolean) + { + Caption = 'Bills Discount Limit Warnings'; + } + field(8; "CCC Ctrl Digits Check String"; Text[30]) + { + Caption = 'CCC Ctrl Digits Check String'; + } + field(9; "Euro Currency Code"; Code[10]) + { + Caption = 'Euro Currency Code'; + TableRelation = Currency; + } + } + + keys + { + key(Key1; "Primary Key") + { + Clustered = true; + } + } + + fieldgroups + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSourceCdSetup.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSourceCdSetup.Page.al new file mode 100644 index 00000000000..1f19d2eea76 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CarteraSourceCdSetup.Page.al @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Foundation.AuditCodes; + +page 7000041 "Cartera Source Cd. Setup" +{ + ApplicationArea = Basic, Suite; + Caption = 'Cartera Source Code Setup'; + PageType = Card; + SourceTable = "Source Code Setup"; + UsageCategory = Administration; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Cartera Journal"; Rec."Cartera Journal") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the source code related to the entries posted from the portfolio journal.'; + } + field("Compress Bank Acc. Ledger"; Rec."Compress Bank Acc. Ledger") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code linked to entries that are posted using the Date Compress Bank Acc. Ledger batch job.'; + } + field("Compress Check Ledger"; Rec."Compress Check Ledger") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code linked to entries that are posted using the Delete Check Ledger Entries batch job.'; + } + } + } + } + + actions + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CheckDiscountCreditLimit.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CheckDiscountCreditLimit.Page.al new file mode 100644 index 00000000000..24aaa134cf1 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CheckDiscountCreditLimit.Page.al @@ -0,0 +1,270 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.Check; +using Microsoft.Bank.Ledger; +using Microsoft.Bank.Statement; +using Microsoft.Foundation.Comment; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +page 7000037 "Check Discount Credit Limit" +{ + Caption = 'Check Discount Credit Limit'; + DeleteAllowed = false; + Editable = false; + InsertAllowed = false; + InstructionalText = 'The credit limit for discount with this bank will be exceeded. Do you still want to proceed?'; + ModifyAllowed = false; + PageType = ConfirmationDialog; + SourceTable = "Bank Account"; + + layout + { + area(content) + { + group(Details) + { + Caption = 'Details'; + field("No."; Rec."No.") + { + ApplicationArea = All; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + } + field("Posted Receiv. Bills Rmg. Amt."; Rec."Posted Receiv. Bills Rmg. Amt.") + { + ApplicationArea = Basic, Suite; + Caption = 'Discounted so far'; + ToolTip = 'Shows the amount pending from the receivables registered at this bank.'; + } + field(CurrBillGrAmount; CurrBillGrAmount) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Amount of this Bill Group'; + } + field(AmountSelected; AmountSelected) + { + ApplicationArea = All; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Amount Selected'; + Visible = AmountSelectedVisible; + } + field(TotalAmount; TotalAmount) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Total Amount'; + } + field("Credit Limit for Discount"; Rec."Credit Limit for Discount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the credit limit for the discount of bills available at this particular bank.'; + } + } + } + area(factboxes) + { + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("&Bank Acc.") + { + Caption = '&Bank Acc.'; + Image = Bank; + action("Ledger E&ntries") + { + ApplicationArea = Basic, Suite; + Caption = 'Ledger E&ntries'; + RunObject = Page "Bank Account Ledger Entries"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No.", "Posting Date"); + ShortCutKey = 'Ctrl+F7'; + } + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "Comment Sheet"; + RunPageLink = "Table Name" = const("Bank Account"), + "No." = field("No."); + } + action(Statistics) + { + ApplicationArea = Basic, Suite; + Caption = 'Statistics'; + Image = Statistics; + Promoted = true; + PromotedCategory = Process; + RunObject = Page "Bank Account Statistics"; + RunPageLink = "No." = field("No."), + "Date Filter" = field("Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); + ShortCutKey = 'F7'; + } + action(Balance) + { + ApplicationArea = Basic, Suite; + Caption = 'Balance'; + Image = Balance; + RunObject = Page "Bank Account Balance"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); + } + action("St&atements") + { + ApplicationArea = Basic, Suite; + Caption = 'St&atements'; + RunObject = Page "Bank Account Statement List"; + RunPageLink = "Bank Account No." = field("No."); + } + action("Chec&k Ledger Entries") + { + ApplicationArea = Basic, Suite; + Caption = 'Chec&k Ledger Entries'; + Image = CheckLedger; + RunObject = Page "Check Ledger Entries"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No.", "Entry Status", "Check No."); + } + separator(Action41) + { + } + action("&Operation Fees") + { + ApplicationArea = Basic, Suite; + Caption = '&Operation Fees'; + RunObject = Page "Operation Fees"; + RunPageLink = Code = field("Operation Fees Code"), + "Currency Code" = field("Currency Code"); + } + action("Customer Ratings") + { + ApplicationArea = Basic, Suite; + Caption = 'Customer Ratings'; + Image = CustomerRating; + RunObject = Page "Customer Ratings"; + RunPageLink = Code = field("Customer Ratings Code"), + "Currency Code" = field("Currency Code"); + } + separator(Action5) + { + Caption = ''; + } + action("Bill &Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill &Groups'; + Image = VoucherGroup; + RunObject = Page "Bill Groups List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + } + action("Posted Bill Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups'; + Image = PostedVoucherGroup; + RunObject = Page "Posted Bill Groups List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + } + separator(Action7) + { + Caption = ''; + } + action("Payment O&rders") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment O&rders'; + RunObject = Page "Payment Orders List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + } + action("Posted P&ayment Orders") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted P&ayment Orders'; + Image = PostedPayment; + RunObject = Page "Posted Payment Orders List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + } + separator(Action50) + { + } + action("Posted Recei&vable Bills") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Recei&vable Bills'; + Image = PostedReceivableVoucher; + RunObject = Page "Bank Cat. Posted Receiv. Bills"; + } + action("Posted Pa&yable Bills") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Pa&yable Bills'; + Image = PostedPayableVoucher; + RunObject = Page "Bank Cat. Posted Payable Bills"; + } + } + } + } + + trigger OnInit() + begin + AmountSelectedVisible := true; + end; + + trigger OnOpenPage() + begin + OnActivateForm(); + end; + + var + CurrBillGrAmount: Decimal; + AmountSelected: Decimal; + TotalAmount: Decimal; + AmountSelectedVisible: Boolean; + + [Scope('OnPrem')] + procedure SetValues(CurrAmount: Decimal; SelAmount: Decimal) + begin + CurrBillGrAmount := CurrAmount; + AmountSelected := SelAmount; + end; + + local procedure OnActivateForm() + begin + Rec.SetRange("Dealing Type Filter", Rec."Dealing Type Filter"::Discount); + Rec.SetRange("Status Filter", Rec."Status Filter"::Open); + Rec.CalcFields("Posted Receiv. Bills Amt."); + TotalAmount := Rec."Posted Receiv. Bills Rmg. Amt." + CurrBillGrAmount + AmountSelected; + AmountSelectedVisible := AmountSelected <> 0; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedCarteraDoc.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedCarteraDoc.Table.al new file mode 100644 index 00000000000..9c1c310e052 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedCarteraDoc.Table.al @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.Receivables; + +table 7000004 "Closed Cartera Doc." +{ + Caption = 'Closed Cartera Doc.'; + DrillDownPageID = "Closed Cartera Documents"; + LookupPageID = "Closed Cartera Documents"; + DataClassification = CustomerContent; + + fields + { + field(1; Type; Enum "Cartera Document Type") + { + Caption = 'Type'; + } + field(2; "Entry No."; Integer) + { + Caption = 'Entry No.'; + } + field(3; "No."; Code[20]) + { + Caption = 'No.'; + } + field(4; "Posting Date"; Date) + { + Caption = 'Posting Date'; + } + field(5; "Document No."; Code[20]) + { + Caption = 'Document No.'; + } + field(6; Description; Text[100]) + { + Caption = 'Description'; + } + field(7; "Bank Account No."; Code[20]) + { + Caption = 'Bank Account No.'; + TableRelation = "Bank Account"; + } + field(8; "Dealing Type"; Enum "Cartera Dealing Type") + { + Caption = 'Dealing Type'; + Editable = false; + } + field(9; "Amount for Collection"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Amount for Collection'; + } + field(10; "Amt. for Collection (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amt. for Collection (LCY)'; + } + field(11; "Due Date"; Date) + { + Caption = 'Due Date'; + } + field(12; "Payment Method Code"; Code[10]) + { + Caption = 'Payment Method Code'; + TableRelation = "Payment Method"; + } + field(13; Accepted; Option) + { + Caption = 'Accepted'; + OptionCaption = 'Not Required,Yes'; + OptionMembers = "Not Required",Yes; + } + field(14; Place; Boolean) + { + Caption = 'Place'; + } + field(15; "Collection Agent"; Option) + { + Caption = 'Collection Agent'; + OptionCaption = 'Direct,Bank'; + OptionMembers = Direct,Bank; + } + field(16; "Bill Gr./Pmt. Order No."; Code[20]) + { + Caption = 'Bill Gr./Pmt. Order No.'; + TableRelation = if (Type = const(Receivable)) "Closed Bill Group"."No." + else + if (Type = const(Payable)) "Closed Payment Order"."No."; + } + field(18; "Account No."; Code[20]) + { + Caption = 'Account No.'; + TableRelation = if (Type = const(Receivable)) Customer + else + if (Type = const(Payable)) Vendor; + } + field(19; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + TableRelation = Currency; + } + field(20; "Cust./Vendor Bank Acc. Code"; Code[20]) + { + Caption = 'Cust./Vendor Bank Acc. Code'; + TableRelation = if (Type = const(Receivable)) "Customer Bank Account".Code where("Customer No." = field("Account No.")) + else + if (Type = const(Payable)) "Vendor Bank Account".Code where("Vendor No." = field("Account No.")); + } +#if not CLEANSCHEMA25 + field(21; "Pmt. Address Code"; Code[10]) + { + Caption = 'Pmt. Address Code'; + ObsoleteReason = 'Address is taken from the fields Address, City, etc. of Customer/Vendor table.'; + ObsoleteState = Removed; + ObsoleteTag = '25.0'; + } +#endif + field(22; "Global Dimension 1 Code"; Code[20]) + { + CaptionClass = '1,1,1'; + Caption = 'Global Dimension 1 Code'; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(23; "Global Dimension 2 Code"; Code[20]) + { + CaptionClass = '1,1,2'; + Caption = 'Global Dimension 2 Code'; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(24; Status; Enum "Cartera Document Status") + { + Caption = 'Status'; + } + field(25; "Honored/Rejtd. at Date"; Date) + { + Caption = 'Honored/Rejtd. at Date'; + } + field(26; "Remaining Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Remaining Amount'; + } + field(27; "Remaining Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Remaining Amt. (LCY)'; + } + field(28; Redrawn; Boolean) + { + Caption = 'Redrawn'; + } + field(29; "Original Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Original Amount'; + } + field(30; "Original Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Original Amount (LCY)'; + } + field(40; "Document Type"; Enum "Cartera Document Doc. Type") + { + Caption = 'Document Type'; + Editable = false; + } + field(42; Factoring; Option) + { + Caption = 'Factoring'; + Editable = false; + OptionCaption = ' ,Unrisked,Risked'; + OptionMembers = " ",Unrisked,Risked; + } + field(49; "From Journal"; Boolean) + { + Caption = 'From Journal'; + } + field(480; "Dimension Set ID"; Integer) + { + Caption = 'Dimension Set ID'; + Editable = false; + TableRelation = "Dimension Set Entry"; + + trigger OnLookup() + begin + Rec.ShowDimensions(); + end; + } + field(10700; "Original Document No."; Code[20]) + { + Caption = 'Original Document No.'; + } + } + + keys + { + key(Key1; Type, "Entry No.") + { + Clustered = true; + } + key(Key2; Type, "Document No.") + { + } + key(Key3; "Account No.", "Honored/Rejtd. at Date") + { + } + key(Key4; Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn) + { + SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; + } + key(Key5; "Bank Account No.", "Dealing Type", "Currency Code", Status, Redrawn, "Due Date", "Honored/Rejtd. at Date") + { + SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; + } + key(Key6; Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Currency Code", Status, Redrawn) + { + SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; + } + key(Key7; "Bank Account No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Currency Code", "Dealing Type", Status, Redrawn, "Due Date", "Honored/Rejtd. at Date", "Document Type") + { + SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; + } + key(Key8; Type, "Bank Account No.", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn, "Document Type") + { + SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; + } + key(Key9; Type, "Original Document No.") + { + } + } + + fieldgroups + { + } + + [Scope('OnPrem')] + procedure ShowDimensions() + var + DimMgt: Codeunit DimensionManagement; + begin + DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo('%1 %2 %3', Type, "Entry No.", "Document No.")); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedCarteraDocuments.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedCarteraDocuments.Page.al new file mode 100644 index 00000000000..8bfd9b87cae --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedCarteraDocuments.Page.al @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Sales.Receivables; + +page 7000007 "Closed Cartera Documents" +{ + Caption = 'Closed Cartera Documents'; + Editable = false; + PageType = List; + SourceTable = "Closed Cartera Doc."; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date this closed document was created and posted.'; + Visible = false; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this closed document.'; + } + field(Status; Rec.Status) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status of the closed document.'; + } + field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date of payment or rejection of this closed document.'; + Visible = false; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment method code defined for the document number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the document that is the source of this closed document.'; + } + field("No."; Rec."No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the closed bill.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the description associated with this closed document.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code in which this closed document was generated.'; + Visible = false; + } + field("Original Amount"; Rec."Original Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the initial amount of this closed document.'; + } + field("Original Amount (LCY)"; Rec."Original Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the initial amount of this document, in LCY.'; + Visible = false; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for this closed document to be fully applied.'; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding, in order for this closed document to be fully settled.'; + Visible = false; + } + field(Redrawn; Rec.Redrawn) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if this document, which has come due and is now rejected, has been recirculated.'; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + Visible = false; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account number of the customer/vendor associated with this closed document.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the ledger entry number associated with the posting of this closed document.'; + } + } + } + } + + actions + { + area(navigation) + { + group("&Docs.") + { + Caption = '&Docs.'; + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + + trigger OnAction() + begin + ClosedDoc.Copy(Rec); + PAGE.Run(PAGE::"Closed Documents Analysis", ClosedDoc); + end; + } + action(Redraw) + { + ApplicationArea = Basic, Suite; + Caption = 'Redraw'; + Ellipsis = true; + Image = RefreshVoucher; + ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; + + trigger OnAction() + begin + RedrawDoc(); + end; + } + separator(Action1100000) + { + } + action("Dime&nsions") + { + ApplicationArea = Basic, Suite; + Caption = 'Dime&nsions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + } + } + area(processing) + { + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + CarteraManagement.NavigateClosedDoc(Rec); + end; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Navigate_Promoted"; "&Navigate") + { + } + } + } + } + + var + Text1100000: Label 'Only bills can be redrawn.'; + Text1100001: Label 'Only receivable bills can be redrawn.'; + Text1100002: Label 'No bills have been found that can be redrawn. \'; + Text1100003: Label 'Please check that at least one rejected bill was selected.'; + ClosedDoc: Record "Closed Cartera Doc."; + CustLedgEntry: Record "Cust. Ledger Entry"; + CarteraManagement: Codeunit CarteraManagement; + + [Scope('OnPrem')] + procedure RedrawDoc() + begin + CurrPage.SetSelectionFilter(ClosedDoc); + if not ClosedDoc.Find('=><') then + exit; + + ClosedDoc.SetRange("Document Type", ClosedDoc."Document Type"::Bill); + if not ClosedDoc.Find('-') then + Error( + Text1100000); + + ClosedDoc.SetRange(Type, ClosedDoc.Type::Receivable); + if not ClosedDoc.Find('-') then + Error( + Text1100001); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); + if not ClosedDoc.Find('-') then + Error( + Text1100002 + + Text1100003); + + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(ClosedDoc."Entry No."); + CustLedgEntry.Mark(true); + until ClosedDoc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Redraw Receivable Bills", true, false, CustLedgEntry); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocsAnalysisLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocsAnalysisLCYFB.Page.al new file mode 100644 index 00000000000..95582499c7d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocsAnalysisLCYFB.Page.al @@ -0,0 +1,151 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 35296 "Closed Docs Analysis LCY FB" +{ + Caption = 'Closed Docs Analysis LCY FB'; + DataCaptionExpression = Rec.GetFilter(Type); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SourceTable = "Closed Cartera Doc."; + + layout + { + area(content) + { + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + field(HonoredLCY; HonoredAmtLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + Visible = HonoredLCYVisible; + } + field(RejectedLCY; RejectedAmtLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + Visible = RejectedLCYVisible; + } + field(RedrawnLCY; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + trigger OnInit() + begin + RejectedLCYVisible := true; + HonoredLCYVisible := true; + end; + + trigger OnOpenPage() + begin + CurrencyFilter := Rec.GetFilter("Currency Code"); + UpdateStatistics(); + end; + + var + ClosedDoc: Record "Closed Cartera Doc."; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + CurrencyFilter: Code[250]; + Show: Boolean; + HonoredLCYVisible: Boolean; + RejectedLCYVisible: Boolean; + + local procedure UpdateStatistics() + begin + ClosedDoc.Copy(Rec); + ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); + ClosedDoc.SetFilter("Currency Code", CurrencyFilter); + ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); + ClosedDoc.SetRange(Redrawn, true); + Show := ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); + if Show then begin + RedrawnAmt := ClosedDoc."Original Amount"; + RedrawnAmtLCY := ClosedDoc."Original Amount (LCY)"; + end; + NoRedrawn := ClosedDoc.Count; + + ClosedDoc.SetRange(Redrawn, false); + if Show then begin + ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); + HonoredAmt := ClosedDoc."Original Amount"; + HonoredAmtLCY := ClosedDoc."Original Amount (LCY)"; + end; + NoHonored := ClosedDoc.Count; + ClosedDoc.SetRange(Redrawn); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); + if Show then begin + ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); + RejectedAmt := ClosedDoc."Original Amount"; + RejectedAmtLCY := ClosedDoc."Original Amount (LCY)"; + end; + NoRejected := ClosedDoc.Count; + ClosedDoc.SetRange(Status); + + if ClosedDoc.Find('=><') then; + // necessary to calculate decimal places + // CurrForm.Honored.VISIBLE(Show); + // CurrForm.Rejected.VISIBLE(Show); + HonoredLCYVisible := Show; + RejectedLCYVisible := Show; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocsAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocsAnalysisNonLCYFB.Page.al new file mode 100644 index 00000000000..ac561a0ec38 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocsAnalysisNonLCYFB.Page.al @@ -0,0 +1,151 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 35297 "Closed Docs Analysis NonLCY FB" +{ + Caption = 'Closed Docs Analysis NonLCY FB'; + DataCaptionExpression = Rec.GetFilter(Type); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SourceTable = "Closed Cartera Doc."; + + layout + { + area(content) + { + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + field(Honored; HonoredAmt) + { + ApplicationArea = All; + AutoFormatExpression = ClosedDoc."Currency Code"; + AutoFormatType = 1; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + Visible = HonoredVisible; + } + field(Rejected; RejectedAmt) + { + ApplicationArea = All; + AutoFormatExpression = ClosedDoc."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + Visible = RejectedVisible; + } + field(Redrawn; RedrawnAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = ClosedDoc."Currency Code"; + AutoFormatType = 1; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + trigger OnInit() + begin + RejectedVisible := true; + HonoredVisible := true; + end; + + trigger OnOpenPage() + begin + CurrencyFilter := Rec.GetFilter("Currency Code"); + UpdateStatistics(); + end; + + var + ClosedDoc: Record "Closed Cartera Doc."; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + CurrencyFilter: Code[250]; + Show: Boolean; + HonoredVisible: Boolean; + RejectedVisible: Boolean; + + local procedure UpdateStatistics() + begin + ClosedDoc.Copy(Rec); + ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); + ClosedDoc.SetFilter("Currency Code", CurrencyFilter); + ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); + ClosedDoc.SetRange(Redrawn, true); + Show := ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); + if Show then begin + RedrawnAmt := ClosedDoc."Original Amount"; + RedrawnAmtLCY := ClosedDoc."Original Amount (LCY)"; + end; + NoRedrawn := ClosedDoc.Count; + + ClosedDoc.SetRange(Redrawn, false); + if Show then begin + ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); + HonoredAmt := ClosedDoc."Original Amount"; + HonoredAmtLCY := ClosedDoc."Original Amount (LCY)"; + end; + NoHonored := ClosedDoc.Count; + ClosedDoc.SetRange(Redrawn); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); + if Show then begin + ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); + RejectedAmt := ClosedDoc."Original Amount"; + RejectedAmtLCY := ClosedDoc."Original Amount (LCY)"; + end; + NoRejected := ClosedDoc.Count; + ClosedDoc.SetRange(Status); + + if ClosedDoc.Find('=><') then; + // necessary to calculate decimal places + HonoredVisible := Show; + RejectedVisible := Show; + // CurrForm.HonoredLCY.VISIBLE(Show); + // CurrForm.RejectedLCY.VISIBLE(Show); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocumentsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocumentsAnalysis.Page.al new file mode 100644 index 00000000000..74d6923bd84 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ClosedDocumentsAnalysis.Page.al @@ -0,0 +1,226 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.Currency; + +page 7000044 "Closed Documents Analysis" +{ + Caption = 'Closed Documents Analysis'; + DataCaptionExpression = Rec.GetFilter(Type); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SourceTable = "Closed Cartera Doc."; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CurrencyFilter; CurrencyFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Currency Filter'; + TableRelation = Currency; + ToolTip = 'Specifies the currencies that the data is included for.'; + + trigger OnValidate() + begin + CurrencyFilterOnAfterValidate(); + end; + } + } + group(Control23) + { + ShowCaption = false; + fixed(Control1902115401) + { + ShowCaption = false; + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + group("Original Amount") + { + Caption = 'Original Amount'; + field(Honored; HonoredAmt) + { + ApplicationArea = All; + AutoFormatExpression = ClosedDoc."Currency Code"; + AutoFormatType = 1; + Caption = 'Original Amount'; + Editable = false; + ToolTip = 'Specifies the initial amount of this closed document.'; + Visible = HonoredVisible; + } + field(Rejected; RejectedAmt) + { + ApplicationArea = All; + AutoFormatExpression = ClosedDoc."Currency Code"; + AutoFormatType = 1; + Editable = false; + Visible = RejectedVisible; + } + field(Rejected2; RedrawnAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = ClosedDoc."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + group("Original Amt. (LCY)") + { + Caption = 'Original Amt. (LCY)'; + field(HonoredLCY; HonoredAmtLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Original Amt. (LCY)'; + Editable = false; + ToolTip = 'Specifies the initial amount of this closed document, in LCY.'; + Visible = HonoredLCYVisible; + } + field(RejectedLCY; RejectedAmtLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + Visible = RejectedLCYVisible; + } + field(RejectedLCY2; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + trigger OnInit() + begin + RejectedLCYVisible := true; + HonoredLCYVisible := true; + RejectedVisible := true; + HonoredVisible := true; + end; + + trigger OnOpenPage() + begin + CurrencyFilter := Rec.GetFilter("Currency Code"); + UpdateStatistics(); + end; + + var + ClosedDoc: Record "Closed Cartera Doc."; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + CurrencyFilter: Code[250]; + HonoredVisible: Boolean; + RejectedVisible: Boolean; + HonoredLCYVisible: Boolean; + RejectedLCYVisible: Boolean; + + local procedure UpdateStatistics() + begin + ClosedDoc.Copy(Rec); + ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); + ClosedDoc.SetFilter("Currency Code", CurrencyFilter); + ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); + ClosedDoc.SetRange(Redrawn, true); + RedrawnAmt := 0; + RedrawnAmtLCY := 0; + if ClosedDoc.FindSet() then + repeat + RedrawnAmt += ClosedDoc."Original Amount"; + RedrawnAmtLCY += ClosedDoc."Original Amount (LCY)"; + until ClosedDoc.Next() = 0; + NoRedrawn := ClosedDoc.Count; + + ClosedDoc.SetRange(Redrawn, false); + HonoredAmt := 0; + HonoredAmtLCY := 0; + if ClosedDoc.FindSet() then + repeat + HonoredAmt += ClosedDoc."Original Amount"; + HonoredAmtLCY += ClosedDoc."Original Amount (LCY)"; + until ClosedDoc.Next() = 0; + NoHonored := ClosedDoc.Count; + ClosedDoc.SetRange(Redrawn); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); + RejectedAmt := 0; + RejectedAmtLCY := 0; + if ClosedDoc.FindSet() then + repeat + RejectedAmt += ClosedDoc."Original Amount"; + RejectedAmtLCY += ClosedDoc."Original Amount (LCY)"; + until ClosedDoc.Next() = 0; + + NoRejected := ClosedDoc.Count; + ClosedDoc.SetRange(Status); + + if ClosedDoc.Find('=><') then; // necessary to calculate decimal places + end; + + local procedure CurrencyFilterOnAfterValidate() + begin + UpdateStatistics(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CompanyInitializeCartera.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CompanyInitializeCartera.Codeunit.al new file mode 100644 index 00000000000..1440e993972 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/CompanyInitializeCartera.Codeunit.al @@ -0,0 +1,62 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +codeunit 7000010 "Company-Initialize Cartera" +{ + + trigger OnRun() + begin + if not CarteraReportSelection.FindFirst() then begin + InsertBGPORepSelection(CarteraReportSelection.Usage::"Bill Group", '1', REPORT::"Bill Group Listing"); + InsertBGPORepSelection(CarteraReportSelection.Usage::"Posted Bill Group", '1', REPORT::"Posted Bill Group Listing"); + InsertBGPORepSelection(CarteraReportSelection.Usage::"Closed Bill Group", '1', REPORT::"Closed Bill Group Listing"); + InsertBGPORepSelection(CarteraReportSelection.Usage::Bill, '1', REPORT::"Receivable Bill"); + InsertBGPORepSelection(CarteraReportSelection.Usage::"Bill Group - Test", '1', REPORT::"Bill Group - Test"); + InsertBGPORepSelection(CarteraReportSelection.Usage::"Posted Payment Order", '1', REPORT::"Posted Payment Order Listing"); + InsertBGPORepSelection(CarteraReportSelection.Usage::"Closed Payment Order", '1', REPORT::"Closed Payment Order Listing"); + InsertBGPORepSelection(CarteraReportSelection.Usage::"Payment Order", '1', REPORT::"Payment Order Listing"); + InsertBGPORepSelection(CarteraReportSelection.Usage::"Payment Order - Test", '1', REPORT::"Payment Order - Test"); + end; + end; + + var + CarteraSetup: Record "Cartera Setup"; + CarteraReportSelection: Record "Cartera Report Selections"; + Text1100000: Label 'CARJNL'; + Text1100001: Label 'Cartera Journal'; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Company-Initialize", 'OnAfterInitSetupTables', '', true, false)] + local procedure OnAfterInitSetupTables() + begin + if not CarteraSetup.FindFirst() then begin + CarteraSetup.Init(); + CarteraSetup.Insert(); + end; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Company-Initialize", 'OnBeforeSourceCodeSetupInsert', '', true, false)] + local procedure OnBeforeSourceCodeSetupInsert(var SourceCodeSetup: Record "Source Code Setup"; sender: Codeunit "Company-Initialize") + begin + sender.InsertSourceCode(SourceCodeSetup."Cartera Journal", Text1100000, Text1100001); + end; + + local procedure InsertBGPORepSelection(ReportUsage: Enum "Report Selection Usage Cartera"; Sequence: Code[10]; ReportID: Integer) + begin + CarteraReportSelection.Init(); + CarteraReportSelection.Usage := ReportUsage; + CarteraReportSelection.Sequence := Sequence; + CarteraReportSelection."Report ID" := ReportID; + CarteraReportSelection.Insert(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocPostBuffer.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocPostBuffer.Table.al new file mode 100644 index 00000000000..1cfd7563ace --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocPostBuffer.Table.al @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +table 7000011 "Doc. Post. Buffer" +{ + Caption = 'Doc. Post. Buffer'; + DataClassification = CustomerContent; + + fields + { + field(1; "Entry No."; Integer) + { + Caption = 'Entry No.'; + DataClassification = SystemMetadata; + } + field(2; "No. of Days"; Integer) + { + Caption = 'No. of Days'; + DataClassification = SystemMetadata; + } + field(3; Amount; Decimal) + { + AutoFormatType = 0; + Caption = 'Amount'; + DataClassification = SystemMetadata; + } + } + + keys + { + key(Key1; "Entry No.") + { + Clustered = true; + } + } + + fieldgroups + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentEdit.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentEdit.Codeunit.al new file mode 100644 index 00000000000..dc983499230 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentEdit.Codeunit.al @@ -0,0 +1,75 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Receivables; + +codeunit 7000008 "Document-Edit" +{ + Permissions = TableData "Cartera Doc." = imd, + TableData "Cust. Ledger Entry" = m, + TableData "Vendor Ledger Entry" = m, + TableData "Detailed Cust. Ledg. Entry" = m, + TableData "Detailed Vendor Ledg. Entry" = m; + TableNo = "Cartera Doc."; + + trigger OnRun() + begin + CarteraDoc := Rec; + CarteraDoc.LockTable(); + CarteraDoc.Find(); + CarteraDoc."Category Code" := Rec."Category Code"; + CarteraDoc."Direct Debit Mandate ID" := Rec."Direct Debit Mandate ID"; + if Rec."Bill Gr./Pmt. Order No." = '' then begin + CarteraDoc."Due Date" := Rec."Due Date"; + CarteraDoc."Cust./Vendor Bank Acc. Code" := Rec."Cust./Vendor Bank Acc. Code"; + CarteraDoc."Collection Agent" := Rec."Collection Agent"; + CarteraDoc.Accepted := Rec.Accepted; + end; + OnBeforeModifyCarteraDoc(CarteraDoc, Rec); + CarteraDoc.Modify(); + Rec := CarteraDoc; + end; + + var + CarteraDoc: Record "Cartera Doc."; + + [Scope('OnPrem')] + procedure EditDueDate(CarteraDoc: Record "Cartera Doc.") + var + CustLedgEntry: Record "Cust. Ledger Entry"; + VendLedgEntry: Record "Vendor Ledger Entry"; + DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; + DtldVendLedgEntry: Record "Detailed Vendor Ledg. Entry"; + begin + case CarteraDoc.Type of + CarteraDoc.Type::Receivable: + begin + CustLedgEntry.Get(CarteraDoc."Entry No."); + CustLedgEntry."Due Date" := CarteraDoc."Due Date"; + CustLedgEntry.Modify(); + DtldCustLedgEntry.SetCurrentKey("Cust. Ledger Entry No.", "Posting Date"); + DtldCustLedgEntry.SetRange("Cust. Ledger Entry No.", CustLedgEntry."Entry No."); + DtldCustLedgEntry.ModifyAll("Initial Entry Due Date", CarteraDoc."Due Date"); + end; + CarteraDoc.Type::Payable: + begin + VendLedgEntry.Get(CarteraDoc."Entry No."); + VendLedgEntry."Due Date" := CarteraDoc."Due Date"; + VendLedgEntry.Modify(); + DtldVendLedgEntry.SetCurrentKey("Vendor Ledger Entry No.", "Posting Date"); + DtldVendLedgEntry.SetRange("Vendor Ledger Entry No.", VendLedgEntry."Entry No."); + DtldVendLedgEntry.ModifyAll("Initial Entry Due Date", CarteraDoc."Due Date"); + end; + end; + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeModifyCarteraDoc(var CarteraDoc: Record "Cartera Doc."; CurrCarteraDoc: Record "Cartera Doc.") + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentMisc.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentMisc.Codeunit.al new file mode 100644 index 00000000000..b156af27efc --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentMisc.Codeunit.al @@ -0,0 +1,264 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Purchases.Document; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Customer; +using Microsoft.Sales.Document; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +codeunit 7000007 "Document-Misc" +{ + Permissions = TableData "Cust. Ledger Entry" = imd, + TableData "Vendor Ledger Entry" = imd, + TableData "Cartera Doc." = imd, + TableData "Posted Cartera Doc." = imd, + TableData "Closed Cartera Doc." = imd, + TableData "Posted Bill Group" = imd, + TableData "Closed Bill Group" = imd; + + trigger OnRun() + begin + end; + + var + Text1100000: Label 'This document is included in a posted bill group. Its %1 cannot be modified.'; + Text1100001: Label 'This document is closed. Its %1 cannot be modified.'; + Text1100002: Label 'This document is included in a posted payment order. Its %1 cannot be modified.'; + Text1100003: Label '%1 cannot be used in CSB Electronics Norms Exports.'; + Text1100004: Label '%1 cannot be used in CSB Electronic Norm Export No. 34./Norm Export No. 34.1'; + Text1100005: Label '%1 is not correct. Do you want to have it corrected?'; + Text1100006: Label 'This account has no control digit. Do you want to have it calculated?'; + Text1100007: Label 'Partial Bill settlement %1/%2'; + Text1100008: Label 'Partial Document settlement %1 Customer No. %2'; + Text1100009: Label 'Partial Document settlement %1'; + + procedure UpdateReceivableDueDate(var CustLedgEntry: Record "Cust. Ledger Entry") + var + Doc: Record "Cartera Doc."; + begin + if CustLedgEntry."Document Situation" = CustLedgEntry."Document Situation"::" " then + exit; + case CustLedgEntry."Document Situation" of + CustLedgEntry."Document Situation"::"BG/PO", CustLedgEntry."Document Situation"::Cartera: + begin + Doc.Get(Doc.Type::Receivable, CustLedgEntry."Entry No."); + Doc.Validate("Due Date", CustLedgEntry."Due Date"); + Doc.Modify(); + end; + CustLedgEntry."Document Situation"::"Posted BG/PO": + Error( + Text1100000, + CustLedgEntry.FieldCaption("Due Date")); + CustLedgEntry."Document Situation"::"Closed BG/PO", CustLedgEntry."Document Situation"::"Closed Documents": + Error( + Text1100001, + CustLedgEntry.FieldCaption("Due Date")); + end; + end; + + procedure UpdatePayableDueDate(var VendLedgEntry: Record "Vendor Ledger Entry") + var + Doc: Record "Cartera Doc."; + begin + if VendLedgEntry."Document Situation" = VendLedgEntry."Document Situation"::" " then + exit; + case VendLedgEntry."Document Situation" of + VendLedgEntry."Document Situation"::"BG/PO", VendLedgEntry."Document Situation"::Cartera: + begin + Doc.Get(Doc.Type::Payable, VendLedgEntry."Entry No."); + Doc."Due Date" := VendLedgEntry."Due Date"; + Doc.Modify(); + end; + VendLedgEntry."Document Situation"::"Posted BG/PO": + Error( + Text1100002, + VendLedgEntry.FieldCaption("Due Date")); + VendLedgEntry."Document Situation"::"Closed BG/PO", VendLedgEntry."Document Situation"::"Closed Documents": + Error( + Text1100001, + VendLedgEntry.FieldCaption("Due Date")); + end; + end; + + procedure DocType(PmtMethodCode: Code[10]): Code[10] + var + PaymentMethod: Record "Payment Method"; + begin + PaymentMethod.Get(PmtMethodCode); + case PaymentMethod."Bill Type" of + PaymentMethod."Bill Type"::"Bill of Exchange": + exit('1'); + PaymentMethod."Bill Type"::Receipt: + exit('2'); + PaymentMethod."Bill Type"::IOU: + exit('3'); + else + Error(Text1100003, PmtMethodCode); + end; + end; + + procedure DocType2(PmtMethodCode: Code[10]): Code[10] + var + PaymentMethod: Record "Payment Method"; + begin + PaymentMethod.Get(PmtMethodCode); + case PaymentMethod."Bill Type" of + PaymentMethod."Bill Type"::Check: + exit('4'); + PaymentMethod."Bill Type"::Transfer: + exit('5'); + else + Error(Text1100004, PmtMethodCode); + end; + end; + + procedure CalcControlDigit(Branch: Text[30]; Bank: Text[30]): Text[2] + var + CarteraSetup: Record "Cartera Setup"; + Weight: Text[30]; + Digit1: Integer; + Digit2: Integer; + i: Integer; + BranchDigit: Integer; + BankDigit: Integer; + WeightDigit: Integer; + begin + CarteraSetup.Get(); + Weight := CarteraSetup."CCC Ctrl Digits Check String"; + Digit1 := 0; + Digit2 := 0; + + for i := 1 to StrLen(Branch) do begin + Evaluate(BranchDigit, CopyStr(Branch, StrLen(Branch) - i + 1, 1)); + case i of + 1 .. 4: + Evaluate(WeightDigit, CopyStr(Weight, i, 1)); + 5: + Evaluate(WeightDigit, CopyStr(Weight, i, 2)); + 6 .. 11: + Evaluate(WeightDigit, CopyStr(Weight, i + 1, 1)); + end; + Digit1 := Digit1 + (BranchDigit * WeightDigit); + end; + Digit1 := 11 - (Digit1 mod 11); + + if Digit1 = 10 then + Digit1 := 1; + if Digit1 = 11 then + Digit1 := 0; + + for i := 1 to StrLen(Bank) do begin + Evaluate(BankDigit, CopyStr(Bank, StrLen(Bank) - i + 1, 1)); + case i of + 1 .. 4: + Evaluate(WeightDigit, CopyStr(Weight, i, 1)); + 5: + Evaluate(WeightDigit, CopyStr(Weight, i, 2)); + 6 .. 11: + Evaluate(WeightDigit, CopyStr(Weight, i + 1, 1)); + end; + Digit2 := Digit2 + (BankDigit * WeightDigit); + end; + Digit2 := 11 - (Digit2 mod 11); + + if Digit2 = 10 then + Digit2 := 1; + if Digit2 = 11 then + Digit2 := 0; + + exit(Format(Digit1) + Format(Digit2)); + end; + + procedure CheckControlDigit(var CustCCCControlDigits: Text[2]; CustCCCBankBranchNo: Text[30]; CustCCCAccNo: Text[30]; Cust2: Text[30]) + var + CarteraSetup: Record "Cartera Setup"; + CustBankAcc: Record "Customer Bank Account"; + MessageTxt: Text[150]; + begin + CarteraSetup.Get(); + if CarteraSetup."CCC Ctrl Digits Check String" <> '' then + if CustCCCControlDigits <> '' then begin + if CalcControlDigit(CustCCCBankBranchNo + Cust2, CustCCCAccNo) <> CustCCCControlDigits then begin + MessageTxt := StrSubstNo( + Text1100005, + CustBankAcc.FieldCaption("CCC Control Digits")); + if not Confirm(MessageTxt) then + CustCCCControlDigits := '**' + else + CustCCCControlDigits := CalcControlDigit(CustCCCBankBranchNo + Cust2, CustCCCAccNo); + end + end else + if not Confirm(Text1100006) then + CustCCCControlDigits := '**' + else + CustCCCControlDigits := CalcControlDigit(CustCCCBankBranchNo + Cust2, CustCCCAccNo) + else + if CustCCCControlDigits = '' then + CustCCCControlDigits := '**'; + end; + + procedure FilterGLEntry(var GLEntry: Record "G/L Entry"; AccNo: Code[20]; DocNo: Code[20]; BillNo: Code[20]; TypeDoc: Option Bill,Invoice; CustAccNo: Code[20]) + var + Description2: Text[50]; + begin + GLEntry.SetCurrentKey("G/L Account No.", Description); + GLEntry.SetRange("G/L Account No.", AccNo); + if TypeDoc = TypeDoc::Bill then + Description2 := CopyStr( + StrSubstNo(Text1100007, DocNo, BillNo), + 1, MaxStrLen(GLEntry.Description)) + else + if CustAccNo <> '' then + Description2 := CopyStr( + StrSubstNo(Text1100008, + DocNo, + CustAccNo), 1, MaxStrLen(GLEntry.Description)) + else + Description2 := CopyStr( + StrSubstNo(Text1100009, DocNo), + 1, MaxStrLen(GLEntry.Description)); + GLEntry.SetRange(Description, Description2); + end; + + procedure GetRegisterCode(CurrCode: Code[10]; var RegisterCode: Integer; var RegisterString: Text[2]): Boolean + var + CarteraSetup: Record "Cartera Setup"; + begin + CarteraSetup.Get(); + if CurrCode = CarteraSetup."Euro Currency Code" then begin + RegisterCode := 50; + RegisterString := '65'; + exit(true); + end; + end; + + procedure CheckBankSuffix(SuffixBankAccNo: Code[20]; BillGrBankAccNo: Code[20]): Boolean + begin + if SuffixBankAccNo <> BillGrBankAccNo then + exit(false); + + exit(true); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Quote to Order", 'OnAfterInsertAllSalesOrderLines', '', false, false)] + local procedure RecalculateDiscountOnAfterInsertAllSalesOrderLines(var SalesOrderLine: Record "Sales Line"; SalesQuoteHeader: Record "Sales Header") + begin + if SalesQuoteHeader."Payment Discount %" <> 0 then + CODEUNIT.Run(CODEUNIT::"Sales-Calc. Discount", SalesOrderLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Quote to Order", 'OnAfterInsertAllPurchOrderLines', '', false, false)] + local procedure RecalculateDiscountOnAfterInsertAllPurchOrderLines(var PurchOrderLine: Record "Purchase Line"; PurchQuoteHeader: Record "Purchase Header") + begin + if PurchQuoteHeader."Payment Discount %" <> 0 then + CODEUNIT.Run(CODEUNIT::"Purch.-Calc.Discount", PurchOrderLine); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentMove.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentMove.Codeunit.al new file mode 100644 index 00000000000..abe337ff69a --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentMove.Codeunit.al @@ -0,0 +1,128 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Foundation.Period; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +codeunit 7000004 "Document-Move" +{ + Permissions = TableData "Closed Cartera Doc." = imd, + TableData "Closed Bill Group" = imd, + TableData "Closed Payment Order" = imd; + + trigger OnRun() + begin + end; + + var + Text1100000: Label 'You cannot delete a bank account with bill groups in preparation.'; + Text1100001: Label 'You cannot delete a bank account with bill groups.'; + Text1100002: Label 'You cannot delete a bank account with closed bill groups in a fiscal year that has not been closed yet.'; + Text1100003: Label 'You cannot delete a bank account with payment orders in preparation.'; + Text1100004: Label 'You cannot delete a bank account with payment orders.'; + Text1100005: Label 'You cannot delete a bank account with closed payment orders in a fiscal year that has not been closed yet.'; + AccountingPeriod: Record "Accounting Period"; + BillGr: Record "Bill Group"; + BillGr2: Record "Bill Group"; + PostedBillGr: Record "Posted Bill Group"; + PostedBillGr2: Record "Posted Bill Group"; + ClosedBillGr: Record "Closed Bill Group"; + ClosedBillGr2: Record "Closed Bill Group"; + ClosedDoc: Record "Closed Cartera Doc."; + PmtOrd: Record "Payment Order"; + PmtOrd2: Record "Payment Order"; + PostedPmtOrd: Record "Posted Payment Order"; + PostedPmtOrd2: Record "Posted Payment Order"; + ClosedPmtOrd: Record "Closed Payment Order"; + ClosedPmtOrd2: Record "Closed Payment Order"; + + [Scope('OnPrem')] + procedure MoveBankAccDocs(BankAcc: Record "Bank Account") + begin + BillGr.LockTable(); + if BillGr2.FindLast() then; + BillGr.Reset(); + BillGr.SetCurrentKey("Bank Account No."); + BillGr.SetRange("Bank Account No.", BankAcc."No."); + if BillGr.FindFirst() then + Error(Text1100000); + + PostedBillGr.LockTable(); + if PostedBillGr2.FindLast() then; + PostedBillGr.Reset(); + PostedBillGr.SetCurrentKey("Bank Account No."); + PostedBillGr.SetRange("Bank Account No.", BankAcc."No."); + if PostedBillGr.FindFirst() then + Error(Text1100001); + + ClosedBillGr.LockTable(); + if ClosedBillGr2.FindLast() then; + ClosedBillGr.Reset(); + ClosedBillGr.SetCurrentKey("Bank Account No."); + ClosedBillGr.SetRange("Bank Account No.", BankAcc."No."); + AccountingPeriod.SetRange(Closed, false); + if AccountingPeriod.FindFirst() then + ClosedBillGr.SetFilter("Closing Date", '>=%1', AccountingPeriod."Starting Date"); + if ClosedBillGr.FindFirst() then + Error(Text1100002); + ClosedBillGr.SetRange("Closing Date"); + ClosedBillGr.ModifyAll("Bank Account No.", ''); + + PmtOrd.LockTable(); + if PmtOrd2.FindLast() then; + PmtOrd.Reset(); + PmtOrd.SetCurrentKey("Bank Account No."); + PmtOrd.SetRange("Bank Account No.", BankAcc."No."); + if PmtOrd.FindFirst() then + Error(Text1100003); + + PostedPmtOrd.LockTable(); + if PostedPmtOrd2.FindLast() then; + PostedPmtOrd.Reset(); + PostedPmtOrd.SetCurrentKey("Bank Account No."); + PostedPmtOrd.SetRange("Bank Account No.", BankAcc."No."); + if PostedPmtOrd.FindFirst() then + Error(Text1100004); + + ClosedPmtOrd.LockTable(); + if ClosedPmtOrd2.FindLast() then; + ClosedPmtOrd.Reset(); + ClosedPmtOrd.SetCurrentKey("Bank Account No."); + ClosedPmtOrd.SetRange("Bank Account No.", BankAcc."No."); + AccountingPeriod.SetRange(Closed, false); + if AccountingPeriod.FindFirst() then + ClosedPmtOrd.SetFilter("Closing Date", '>=%1', AccountingPeriod."Starting Date"); + if ClosedPmtOrd.FindFirst() then + Error(Text1100005); + ClosedPmtOrd.SetRange("Closing Date"); + ClosedPmtOrd.ModifyAll("Bank Account No.", ''); + end; + + [Scope('OnPrem')] + procedure MoveReceivableDocs(Cust: Record Customer) + begin + ClosedDoc.Reset(); + ClosedDoc.SetCurrentKey("Account No.", "Honored/Rejtd. at Date"); + ClosedDoc.SetRange("Account No.", Cust."No."); + ClosedDoc.ModifyAll("Account No.", ''); + end; + + [Scope('OnPrem')] + procedure MovePayableDocs(Vend: Record Vendor) + begin + ClosedDoc.Reset(); + ClosedDoc.SetCurrentKey("Account No.", "Honored/Rejtd. at Date"); + ClosedDoc.SetRange("Account No.", Vend."No."); + ClosedDoc.ModifyAll("Account No.", ''); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentPost.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentPost.Codeunit.al new file mode 100644 index 00000000000..460b09959ea --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentPost.Codeunit.al @@ -0,0 +1,1297 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.EServices.EDocument; +using Microsoft.Finance.Analysis; +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Customer; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; +using System.Security.User; + +codeunit 7000006 "Document-Post" +{ + Permissions = TableData "Cust. Ledger Entry" = imd, + TableData "Vendor Ledger Entry" = imd, + TableData "Detailed Cust. Ledg. Entry" = imd, + TableData "Detailed Vendor Ledg. Entry" = imd, + TableData "Cartera Doc." = imd, + TableData "Posted Cartera Doc." = imd, + TableData "Closed Cartera Doc." = imd, + TableData "Posted Bill Group" = imd, + TableData "Closed Bill Group" = imd, + TableData "Posted Payment Order" = imd, + TableData "Closed Payment Order" = imd; + + trigger OnRun() + begin + end; + + var + JournalErrorsMgt: Codeunit "Journal Errors Mgt."; + Text1100000: Label 'must be of a type that creates bills'; + Text1100001: Label 'A customer or vendor must be specified when a bill is created.'; + Text1100004: Label 'Sales Bill %1/%2 already exists.'; + Text1100005: Label 'Purchase Document %1/%2 already exists.'; + Text1100006: Label 'Receivable %1 %2/%3 cannot be applied to, because it is included in a posted Bill Group.'; + Text1100007: Label 'Payable %1 %2/%3 cannot be applied to, because it is included in a posted Payment Order.'; + Text1100008: Label 'Date %1 is not within your range of allowed posting dates'; + Text1100009: Label '%1 must be entered.'; + Text1100010: Label '%1 must be of a type that creates bills.'; + Text1100011: Label 'A grouped document cannot be settled from a journal. Remove it from its group or payment order and try again.'; + Text1100012: Label 'cannot be filtered when posting recurring journals'; + Text1100013: Label 'Do you want to post the journal lines and print the posting report?'; + Text1100014: Label 'Do you want to post the journal lines?'; + Text1100016: Label 'The journal lines were successfully posted.'; + Text1100017: Label 'The journal lines were successfully posted. You are now in the %1 journal.'; + CarteraDocBillGroupErr: Label 'A grouped document cannot be settled from a journal.\Remove Document %1/%2 from Group/Pmt. Order %3 and try again.', Comment = '%1=Document Number,%2=Bill number,%3=Bill Group number.'; + + procedure CheckGenJnlLine(var GenJnlLine: Record "Gen. Journal Line") + var + CarteraDoc: Record "Cartera Doc."; + PaymentMethod: Record "Payment Method"; + SystemCreated: Boolean; + CarteraDocType: Enum "Cartera Document Type"; + begin + if (GenJnlLine."Document Type" = GenJnlLine."Document Type"::Invoice) and + (GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]) and + (GenJnlLine.Amount <> 0) + then begin + GenJnlLine.TestField("Payment Method Code"); + GenJnlLine.TestField("Payment Terms Code"); + end; + if (GenJnlLine."Document Type" = GenJnlLine."Document Type"::Bill) and + (GenJnlLine.Amount <> 0) + then begin + GenJnlLine.TestField("Bill No."); + GenJnlLine.TestField("Due Date"); + GenJnlLine.TestField("Payment Method Code"); + PaymentMethod.Get(GenJnlLine."Payment Method Code"); + if not PaymentMethod."Create Bills" then + GenJnlLine.FieldError("Payment Method Code", Text1100000); + if not (GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]) then + Error(Text1100001) + end; + if GenJnlLine."Document Type" = GenJnlLine."Document Type"::"Credit Memo" then + SystemCreated := false + else + SystemCreated := GenJnlLine."System-Created Entry"; + + if (GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]) and + (GenJnlLine."Applies-to Doc. Type" in [GenJnlLine."Applies-to Doc. Type"::Bill, GenJnlLine."Applies-to Doc. Type"::Invoice]) and + not SystemCreated + then begin + if GenJnlLine."Account Type" = GenJnlLine."Account Type"::Customer then + CarteraDocType := CarteraDoc.Type::Receivable + else + CarteraDocType := CarteraDoc.Type::Payable; + CheckCarteraDocsForBillGroups(CarteraDocType, GenJnlLine."Applies-to Doc. No.", GenJnlLine."Applies-to Bill No."); + CheckPostedCarteraDocsForBillGroups(CarteraDocType, GenJnlLine."Applies-to Doc. No.", GenJnlLine."Applies-to Bill No."); + end; + OnAfterCheckGenJnlLine(GenJnlLine); + end; + + procedure CreateReceivableDoc(GenJnlLine: Record "Gen. Journal Line"; var CVLedgEntryBuf: Record "CV Ledger Entry Buffer"; IsFromJournal: Boolean) + var + CarteraDoc: Record "Cartera Doc."; + CompanyInfo: Record "Company Information"; + OldCustLedgEntry: Record "Cust. Ledger Entry"; + CustBankAccCode: Record "Customer Bank Account"; + begin + CarteraDoc.Init(); + GJLInfoToDoc(GenJnlLine, CarteraDoc); + CarteraDoc.Type := CarteraDoc.Type::Receivable; + CarteraDoc."Entry No." := CVLedgEntryBuf."Entry No."; + CarteraDoc."Remaining Amount" := CVLedgEntryBuf."Remaining Amount"; + CarteraDoc."Remaining Amt. (LCY)" := CVLedgEntryBuf."Remaining Amt. (LCY)"; + CarteraDoc."Original Amount" := CVLedgEntryBuf."Remaining Amount"; + CarteraDoc."Original Amount (LCY)" := CVLedgEntryBuf."Remaining Amt. (LCY)"; + if CompanyInfo.Get() and CustBankAccCode.Get(CVLedgEntryBuf."CV No.", GenJnlLine."Recipient Bank Account") then + CarteraDoc.Place := CopyStr(CompanyInfo."Post Code", 1, 2) = CopyStr(CustBankAccCode."Post Code", 1, 2); + // Check the Doc no. + OldCustLedgEntry.Reset(); + OldCustLedgEntry.SetCurrentKey("Document No.", "Document Type", "Customer No."); + OldCustLedgEntry.SetRange("Document No.", CVLedgEntryBuf."Document No."); + if GenJnlLine."Document Type" = GenJnlLine."Document Type"::Bill then + OldCustLedgEntry.SetRange("Document Type", OldCustLedgEntry."Document Type"::Bill) + else + if GenJnlLine."Document Type" = GenJnlLine."Document Type"::Invoice then + OldCustLedgEntry.SetRange("Document Type", OldCustLedgEntry."Document Type"::Invoice); + OldCustLedgEntry.SetRange("Bill No.", CVLedgEntryBuf."Bill No."); + if OldCustLedgEntry.FindFirst() then + Error( + Text1100004, + CVLedgEntryBuf."Document No.", CVLedgEntryBuf."Bill No."); + + if IsFromJournal then + CarteraDoc."From Journal" := true; + + OnBeforeCreateReceivableDoc(CarteraDoc, GenJnlLine, CVLedgEntryBuf); + CarteraDoc.Insert(); + OnAfterCreateReceivableDoc(CarteraDoc, GenJnlLine, CVLedgEntryBuf); + CVLedgEntryBuf."Document Situation" := CVLedgEntryBuf."Document Situation"::Cartera; + CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open; + end; + + procedure CreatePayableDoc(GenJnlLine: Record "Gen. Journal Line"; var CVLedgEntryBuf: Record "CV Ledger Entry Buffer"; IsFromJournal: Boolean) + var + CarteraDoc: Record "Cartera Doc."; + OldVendLedgEntry: Record "Vendor Ledger Entry"; + ElectPmtMgmt: Codeunit "Elect. Pmts Management"; + begin + CarteraDoc.Init(); + GJLInfoToDoc(GenJnlLine, CarteraDoc); + CarteraDoc.Type := CarteraDoc.Type::Payable; + CarteraDoc."Entry No." := CVLedgEntryBuf."Entry No."; + CarteraDoc."Remaining Amount" := -CVLedgEntryBuf."Remaining Amount"; + CarteraDoc."Remaining Amt. (LCY)" := -CVLedgEntryBuf."Remaining Amt. (LCY)"; + CarteraDoc."Original Amount" := -CVLedgEntryBuf."Remaining Amount"; + CarteraDoc."Original Amount (LCY)" := -CVLedgEntryBuf."Remaining Amt. (LCY)"; + // Check the Doc no. + OldVendLedgEntry.Reset(); + OldVendLedgEntry.SetCurrentKey("Document No.", "Document Type", "Vendor No."); + OldVendLedgEntry.SetRange("Document No.", CVLedgEntryBuf."Document No."); + if GenJnlLine."Document Type" = GenJnlLine."Document Type"::Bill then + OldVendLedgEntry.SetRange("Document Type", OldVendLedgEntry."Document Type"::Bill) + else + if GenJnlLine."Document Type" = GenJnlLine."Document Type"::Invoice then + OldVendLedgEntry.SetRange("Document Type", OldVendLedgEntry."Document Type"::Invoice); + OldVendLedgEntry.SetRange("Bill No.", CVLedgEntryBuf."Bill No."); + if OldVendLedgEntry.FindFirst() then + Error( + Text1100005, + CVLedgEntryBuf."Document No.", CVLedgEntryBuf."Bill No."); + + if IsFromJournal then + CarteraDoc."From Journal" := true; + + ElectPmtMgmt.GetTransferType(CarteraDoc."Account No.", CarteraDoc."Remaining Amount", CarteraDoc."Transfer Type", true); + + OnBeforeCreatePayableDoc(CarteraDoc, GenJnlLine, CVLedgEntryBuf); + CarteraDoc.Insert(); + OnAfterCreatePayableDoc(CarteraDoc, GenJnlLine, CVLedgEntryBuf); + CVLedgEntryBuf."Document Situation" := CVLedgEntryBuf."Document Situation"::Cartera; + CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open; + end; + + procedure GJLInfoToDoc(var GenJnlLine: Record "Gen. Journal Line"; var CarteraDoc: Record "Cartera Doc.") + var + PaymentMethod: Record "Payment Method"; + CompanyInfo: Record "Company Information"; + CustBankAcc: Record "Customer Bank Account"; + Cust: Record Customer; + begin + CarteraDoc."No." := GenJnlLine."Bill No."; + CarteraDoc."Posting Date" := GenJnlLine."Posting Date"; + CarteraDoc."Document No." := GenJnlLine."Document No."; + CarteraDoc."Original Document No." := GenJnlLine."Document No."; + CarteraDoc.Description := GenJnlLine.Description; + CarteraDoc."Due Date" := GenJnlLine."Due Date"; + CarteraDoc."Payment Method Code" := GenJnlLine."Payment Method Code"; + PaymentMethod.Get(GenJnlLine."Payment Method Code"); + if PaymentMethod."Submit for Acceptance" then + CarteraDoc.Accepted := CarteraDoc.Accepted::No + else + CarteraDoc.Accepted := CarteraDoc.Accepted::"Not Required"; + CarteraDoc."Collection Agent" := PaymentMethod."Collection Agent"; + CarteraDoc."Account No." := GenJnlLine."Account No."; + CarteraDoc."Currency Code" := GenJnlLine."Currency Code"; + CarteraDoc."Cust./Vendor Bank Acc. Code" := + CopyStr(GenJnlLine."Recipient Bank Account", 1, MaxStrLen(CarteraDoc."Cust./Vendor Bank Acc. Code")); + CarteraDoc."Global Dimension 1 Code" := GenJnlLine."Shortcut Dimension 1 Code"; + CarteraDoc."Global Dimension 2 Code" := GenJnlLine."Shortcut Dimension 2 Code"; + CarteraDoc."Dimension Set ID" := GenJnlLine."Dimension Set ID"; + CarteraDoc."Direct Debit Mandate ID" := GenJnlLine."Direct Debit Mandate ID"; + case GenJnlLine."Document Type" of + GenJnlLine."Document Type"::Bill: + CarteraDoc."Document Type" := CarteraDoc."Document Type"::Bill; + GenJnlLine."Document Type"::Invoice: + CarteraDoc."Document Type" := CarteraDoc."Document Type"::Invoice; + GenJnlLine."Document Type"::"Credit Memo": + CarteraDoc."Document Type" := CarteraDoc."Document Type"::"Credit Memo"; + end; + if GenJnlLine."Account Type" = GenJnlLine."Account Type"::Customer then begin + CompanyInfo.Get(); + if GenJnlLine."Recipient Bank Account" <> '' then begin + CustBankAcc.Get(GenJnlLine."Account No.", GenJnlLine."Recipient Bank Account"); + CarteraDoc.Place := CompanyInfo."Post Code" = CustBankAcc."Post Code"; + OnGJLInfoToDocOnBeforeExit(CarteraDoc, GenJnlLine); + exit; + end; + Cust.Get(GenJnlLine."Account No."); + CarteraDoc.Place := CompanyInfo."Post Code" = Cust."Post Code"; + end; + OnAfterGJLInfoToDoc(CarteraDoc, GenJnlLine); + end; + + procedure UpdateReceivableDoc(var CustLedgEntry: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line"; AppliedAmountLCY: Decimal; var DocAmountLCY: Decimal; var RejDocAmountLCY: Decimal; var DiscDocAmountLCY: Decimal; var CollDocAmountLCY: Decimal; var DiscRiskFactAmountLCY: Decimal; var DiscUnriskFactAmountLCY: Decimal; var CollFactAmountLCY: Decimal) + var + CarteraDoc: Record "Cartera Doc."; + PostedCarteraDoc: Record "Posted Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + CarteraDoc2: Record "Cartera Doc."; + PostedCarteraDoc2: Record "Posted Cartera Doc."; + ClosedCarteraDoc2: Record "Closed Cartera Doc."; + PostedBillGroup: Record "Posted Bill Group"; + Currency: Record Currency; + DocLock: Boolean; + begin + OnBeforeUpdateReceivableDoc(CustLedgEntry); + if not DocLock then begin + DocLock := true; + CarteraDoc.LockTable(); + PostedCarteraDoc.LockTable(); + ClosedCarteraDoc.LockTable(); + if CarteraDoc2.FindLast() then; + if PostedCarteraDoc2.FindLast() then; + if ClosedCarteraDoc2.FindLast() then; + end; + if CustLedgEntry."Remaining Amount" = 0 then + CustLedgEntry."Remaining Amt. (LCY)" := 0; + if CustLedgEntry."Document Situation" <> CustLedgEntry."Document Situation"::Cartera then + AppliedAmountLCY := Round(AppliedAmountLCY); + case CustLedgEntry."Document Situation" of + CustLedgEntry."Document Situation"::" ", CustLedgEntry."Document Situation"::Cartera: + begin + CarteraDoc.Get(CarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); + if CarteraDoc."Currency Code" = '' then + CarteraDoc."Remaining Amount" := CarteraDoc."Remaining Amount" + AppliedAmountLCY + else begin + Currency.Get(CarteraDoc."Currency Code"); + Currency.InitRoundingPrecision(); + CarteraDoc."Remaining Amount" := + CarteraDoc."Remaining Amount" + + Round(AppliedAmountLCY * CustLedgEntry."Original Currency Factor", Currency."Amount Rounding Precision"); + end; + CarteraDoc."Remaining Amt. (LCY)" := + Round(CarteraDoc."Remaining Amount" / CustLedgEntry."Original Currency Factor", Currency."Amount Rounding Precision"); + + AppliedAmountLCY := Round(AppliedAmountLCY); + if CarteraDoc."Document Type" = CarteraDoc."Document Type"::Bill then + DocAmountLCY := DocAmountLCY + AppliedAmountLCY; + CarteraDoc.ResetNoPrinted(); + if CustLedgEntry.Open then + CarteraDoc.Modify() + else begin + ClosedCarteraDoc.TransferFields(CarteraDoc); + ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Honored; + ClosedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; + ClosedCarteraDoc."Bill Gr./Pmt. Order No." := ''; + ClosedCarteraDoc."Remaining Amount" := 0; + ClosedCarteraDoc."Remaining Amt. (LCY)" := 0; + ClosedCarteraDoc."Amount for Collection" := 0; + ClosedCarteraDoc."Amt. for Collection (LCY)" := 0; + ClosedCarteraDoc.Insert(); + CarteraDoc.Delete(); + CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::"Closed Documents"; + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Honored; + if CustLedgEntry."Document Type" <> CustLedgEntry."Document Type"::Invoice then + CustLedgEntry.Modify(); + end; + end; + CustLedgEntry."Document Situation"::"Posted BG/PO": + begin + PostedCarteraDoc.Get(PostedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); + PostedCarteraDoc."Remaining Amount" := CustLedgEntry."Remaining Amount"; + PostedCarteraDoc."Remaining Amt. (LCY)" := CustLedgEntry."Remaining Amt. (LCY)"; + if PostedCarteraDoc.Factoring = PostedCarteraDoc.Factoring::" " then begin + if PostedCarteraDoc.Status = PostedCarteraDoc.Status::Rejected then + RejDocAmountLCY := RejDocAmountLCY + AppliedAmountLCY + else + if PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount then + DiscDocAmountLCY := DiscDocAmountLCY + AppliedAmountLCY + else + CollDocAmountLCY := CollDocAmountLCY + AppliedAmountLCY; + end else + case true of + PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount: + begin + PostedBillGroup.Get(PostedCarteraDoc."Bill Gr./Pmt. Order No."); + if PostedBillGroup.Factoring = PostedBillGroup.Factoring::Risked then + DiscRiskFactAmountLCY := DiscRiskFactAmountLCY + AppliedAmountLCY + else + DiscUnriskFactAmountLCY := DiscUnriskFactAmountLCY + AppliedAmountLCY + end; + else + CollFactAmountLCY := CollFactAmountLCY + AppliedAmountLCY; + end; + + UpdateReceivableCurrFact( + PostedCarteraDoc, AppliedAmountLCY, DocAmountLCY, RejDocAmountLCY, DiscDocAmountLCY, CollDocAmountLCY, + DiscRiskFactAmountLCY, DiscUnriskFactAmountLCY, CollFactAmountLCY); + if not CustLedgEntry.Open then begin + if GenJnlLine."Document Type" <> GenJnlLine."Document Type"::Payment then + if PostedCarteraDoc.Status = ClosedCarteraDoc.Status::Rejected then + PostedCarteraDoc.Redrawn := true; + PostedCarteraDoc.Status := PostedCarteraDoc.Status::Honored; + PostedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; + PostedCarteraDoc."Remaining Amount" := 0; + PostedCarteraDoc."Remaining Amt. (LCY)" := 0; + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Honored; + if PostedCarteraDoc.Redrawn then + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Redrawn; + CustLedgEntry.Modify(); + end; + PostedCarteraDoc.Modify(); + end; + CustLedgEntry."Document Situation"::"Closed BG/PO", CustLedgEntry."Document Situation"::"Closed Documents": + begin + ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); + ClosedCarteraDoc.TestField(Status, ClosedCarteraDoc.Status::Rejected); + ClosedCarteraDoc."Remaining Amount" := CustLedgEntry."Remaining Amount"; + ClosedCarteraDoc."Remaining Amt. (LCY)" := CustLedgEntry."Remaining Amt. (LCY)"; + if not CustLedgEntry.Open then begin + if GenJnlLine."Document Type" <> GenJnlLine."Document Type"::Payment then begin + ClosedCarteraDoc.Redrawn := true; + ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Rejected; + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Rejected; + end else + if CustLedgEntry."Remaining Amount" = 0 then begin + ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Honored; + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Honored; + end; + ClosedCarteraDoc."Remaining Amount" := 0; + ClosedCarteraDoc."Remaining Amt. (LCY)" := 0; + ClosedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; + if ClosedCarteraDoc.Redrawn then + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Redrawn; + CustLedgEntry.Modify(); + end; + ClosedCarteraDoc.Modify(); + CustLedgEntry.Modify(); + if (ClosedCarteraDoc."Document Type" = ClosedCarteraDoc."Document Type"::Bill) or + (ClosedCarteraDoc."Document Type" = ClosedCarteraDoc."Document Type"::Invoice) + then + RejDocAmountLCY := RejDocAmountLCY + AppliedAmountLCY; + end; + end; + end; + + procedure UpdatePayableDoc(var VendLedgEntry: Record "Vendor Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line"; var DocAmountLCY: Decimal; AppliedAmountLCY: Decimal; var DocLock: Boolean; var CollDocAmountLCY: Decimal) + var + CarteraDoc: Record "Cartera Doc."; + PostedCarteraDoc: Record "Posted Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + CarteraDoc2: Record "Cartera Doc."; + PostedCarteraDoc2: Record "Posted Cartera Doc."; + ClosedCarteraDoc2: Record "Closed Cartera Doc."; + Currency: Record Currency; + MultiplePostingGroups: Boolean; + begin + if not DocLock then begin + DocLock := true; + CarteraDoc.LockTable(); + PostedCarteraDoc.LockTable(); + if CarteraDoc2.FindLast() then; + if PostedCarteraDoc2.FindLast() then; + if ClosedCarteraDoc2.FindLast() then; + ClosedCarteraDoc.LockTable(); + end; + if VendLedgEntry."Remaining Amount" = 0 then + VendLedgEntry."Remaining Amt. (LCY)" := 0; + if VendLedgEntry."Document Situation" <> VendLedgEntry."Document Situation"::Cartera then + AppliedAmountLCY := Round(AppliedAmountLCY); + case VendLedgEntry."Document Situation" of + VendLedgEntry."Document Situation"::" ", VendLedgEntry."Document Situation"::Cartera: + begin + CarteraDoc.Get(CarteraDoc.Type::Payable, VendLedgEntry."Entry No."); + if CarteraDoc."Currency Code" = '' then + CarteraDoc."Remaining Amount" := CarteraDoc."Remaining Amount" - AppliedAmountLCY + else begin + Currency.Get(CarteraDoc."Currency Code"); + Currency.InitRoundingPrecision(); + CarteraDoc."Remaining Amount" := + CarteraDoc."Remaining Amount" - + Round(AppliedAmountLCY * VendLedgEntry."Original Currency Factor", Currency."Amount Rounding Precision"); + end; + CarteraDoc."Remaining Amt. (LCY)" := + Round(CarteraDoc."Remaining Amount" / VendLedgEntry."Original Currency Factor", Currency."Amount Rounding Precision"); + + AppliedAmountLCY := Round(AppliedAmountLCY); + if CarteraDoc."Document Type" = CarteraDoc."Document Type"::Bill then + DocAmountLCY := DocAmountLCY + AppliedAmountLCY; + + MultiplePostingGroups := CheckVendMultiplePostingGroups(VendLedgEntry); + + if (CarteraDoc."Document Type" = CarteraDoc."Document Type"::Invoice) and + (MultiplePostingGroups) + then + DocAmountLCY := DocAmountLCY + AppliedAmountLCY; + + CarteraDoc.ResetNoPrinted(); + if VendLedgEntry.Open then begin + OnUpdatePayableDocBeforeCarteraDocModify(CarteraDoc, VendLedgEntry); + CarteraDoc.Modify(); + end else begin + ClosedCarteraDoc.TransferFields(CarteraDoc); + ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Honored; + ClosedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; + ClosedCarteraDoc."Bill Gr./Pmt. Order No." := ''; + ClosedCarteraDoc."Remaining Amount" := 0; + ClosedCarteraDoc."Remaining Amt. (LCY)" := 0; + ClosedCarteraDoc."Amount for Collection" := 0; + ClosedCarteraDoc."Amt. for Collection (LCY)" := 0; + OnUpdatePayableDocBeforeClosedCarteraDocInsert(ClosedCarteraDoc, GenJnlLine); + ClosedCarteraDoc.Insert(); + CarteraDoc.Delete(); + VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::"Closed Documents"; + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + if VendLedgEntry."Document Type" <> VendLedgEntry."Document Type"::Invoice then + VendLedgEntry.Modify(); + end; + end; + VendLedgEntry."Document Situation"::"Posted BG/PO": + begin + PostedCarteraDoc.Get(PostedCarteraDoc.Type::Payable, VendLedgEntry."Entry No."); + PostedCarteraDoc."Remaining Amount" := -VendLedgEntry."Remaining Amount"; + PostedCarteraDoc."Remaining Amt. (LCY)" := -VendLedgEntry."Remaining Amt. (LCY)"; + CollDocAmountLCY := CollDocAmountLCY + AppliedAmountLCY; + UpdatePayableCurrFact(PostedCarteraDoc, AppliedAmountLCY, DocAmountLCY, CollDocAmountLCY); + if not VendLedgEntry.Open then begin + if PostedCarteraDoc.Status = ClosedCarteraDoc.Status::Rejected then + PostedCarteraDoc.Redrawn := true; + PostedCarteraDoc.Status := PostedCarteraDoc.Status::Honored; + PostedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; + PostedCarteraDoc."Remaining Amount" := 0; + PostedCarteraDoc."Remaining Amt. (LCY)" := 0; + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + VendLedgEntry.Modify(); + end; + PostedCarteraDoc.Modify(); + end; + VendLedgEntry."Document Situation"::"Closed BG/PO": + begin + ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Payable, VendLedgEntry."Entry No."); + ClosedCarteraDoc.TestField(Status, ClosedCarteraDoc.Status::Rejected); + ClosedCarteraDoc."Remaining Amount" := VendLedgEntry."Remaining Amount"; + ClosedCarteraDoc."Remaining Amt. (LCY)" := VendLedgEntry."Remaining Amt. (LCY)"; + if not VendLedgEntry.Open then begin + if ClosedCarteraDoc.Status = PostedCarteraDoc.Status::Rejected then + ClosedCarteraDoc.Redrawn := true; + ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Honored; + ClosedCarteraDoc."Remaining Amount" := 0; + ClosedCarteraDoc."Remaining Amt. (LCY)" := 0; + ClosedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; + end; + ClosedCarteraDoc.Modify(); + end; + end; + end; + + procedure CheckAppliedReceivableDoc(var OldCustLedgEntry: Record "Cust. Ledger Entry"; SystemCreatedEntry: Boolean) + begin + if (OldCustLedgEntry."Document Situation" = OldCustLedgEntry."Document Situation"::"Posted BG/PO") + and not SystemCreatedEntry + then + Error( + Text1100006, + OldCustLedgEntry."Document Type", OldCustLedgEntry."Document No.", + OldCustLedgEntry."Bill No."); + end; + + procedure CheckAppliedPayableDoc(var OldVendLedgEntry: Record "Vendor Ledger Entry"; SystemCreatedEntry: Boolean) + begin + if (OldVendLedgEntry."Document Situation" = OldVendLedgEntry."Document Situation"::"Posted BG/PO") + and not SystemCreatedEntry + then + Error( + Text1100007, + OldVendLedgEntry."Document Type", OldVendLedgEntry."Document No.", + OldVendLedgEntry."Bill No."); + end; + + procedure CheckPostingDate(CheckDate: Date) + var + GLSetup: Record "General Ledger Setup"; + UserSetup: Record "User Setup"; + AllowPostingTo: Date; + AllowPostingFrom: Date; + begin + GLSetup.Get(); + if UserId <> '' then + if UserSetup.Get(UserId) then begin + AllowPostingFrom := UserSetup."Allow Posting From"; + AllowPostingTo := UserSetup."Allow Posting To"; + end; + if (AllowPostingFrom = 0D) and (AllowPostingTo = 0D) then begin + AllowPostingFrom := GLSetup."Allow Posting From"; + AllowPostingTo := GLSetup."Allow Posting To"; + end; + if AllowPostingTo = 0D then + AllowPostingTo := 99991231D; + if (CheckDate < AllowPostingFrom) or (CheckDate > AllowPostingTo) then + Error(Text1100008, + CheckDate); + end; + + local procedure CheckCarteraDocsForBillGroups(CarteraDocType: Enum "Cartera Document Type"; DocumentNo: Code[20]; BillNo: Code[20]) + var + CarteraDoc: Record "Cartera Doc."; + begin + CarteraDoc.Reset(); + CarteraDoc.SetCurrentKey(Type, "Document No."); + CarteraDoc.SetRange(Type, CarteraDocType); + CarteraDoc.SetRange("Document No.", DocumentNo); + if BillNo <> '' then + CarteraDoc.SetRange("No.", BillNo) + else + CarteraDoc.SetRange("Document Type", CarteraDoc."Document Type"::Invoice); + CarteraDoc.SetFilter("Bill Gr./Pmt. Order No.", '<>%1', ''); + if CarteraDoc.FindFirst() then + Error( + CarteraDocBillGroupErr, + CarteraDoc."Document No.", CarteraDoc."No.", CarteraDoc."Bill Gr./Pmt. Order No."); + end; + + local procedure CheckPostedCarteraDocsForBillGroups(CarteraDocType: Enum "Cartera Document Type"; DocumentNo: Code[20]; BillNo: Code[20]) + var + PostedCarteraDoc: Record "Posted Cartera Doc."; + begin + PostedCarteraDoc.Reset(); + PostedCarteraDoc.SetCurrentKey(Type, "Document No."); + PostedCarteraDoc.SetRange(Type, CarteraDocType); + PostedCarteraDoc.SetRange("Document No.", DocumentNo); + if BillNo <> '' then + PostedCarteraDoc.SetRange("No.", BillNo) + else + PostedCarteraDoc.SetRange("Document Type", PostedCarteraDoc."Document Type"::Invoice); + PostedCarteraDoc.SetFilter("Bill Gr./Pmt. Order No.", '<>%1', ''); + if PostedCarteraDoc.FindFirst() then + Error( + CarteraDocBillGroupErr, + PostedCarteraDoc."Document No.", PostedCarteraDoc."No.", PostedCarteraDoc."Bill Gr./Pmt. Order No."); + end; + + procedure CloseBillGroupIfEmpty(PostedBillGroup: Record "Posted Bill Group"; PostingDate: Date) + var + PostedCarteraDoc: Record "Posted Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + CustLedgEntry: Record "Cust. Ledger Entry"; + ClosedBillGroup: Record "Closed Bill Group"; + begin + PostedCarteraDoc.Reset(); + PostedCarteraDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status); + PostedCarteraDoc.SetRange("Bill Gr./Pmt. Order No.", PostedBillGroup."No."); + PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Receivable); + PostedCarteraDoc.SetRange(Status, PostedCarteraDoc.Status::Open); + OnCloseBillGroupIfEmptyOnAfterPostedCarteraDocSetFilter(PostedCarteraDoc); + if not PostedCarteraDoc.Find('-') then begin + PostedCarteraDoc.SetRange(Status); + PostedCarteraDoc.Find('-'); + repeat + ClosedCarteraDoc.TransferFields(PostedCarteraDoc); + ClosedCarteraDoc.Insert(); + CustLedgEntry.Get(ClosedCarteraDoc."Entry No."); + CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::"Closed BG/PO"; + CustLedgEntry.Modify(); + until PostedCarteraDoc.Next() = 0; + PostedCarteraDoc.DeleteAll(); + ClosedBillGroup.TransferFields(PostedBillGroup); + ClosedBillGroup."Closing Date" := PostingDate; + ClosedBillGroup.Insert(); + PostedBillGroup.Delete(); + end; + end; + + procedure ClosePmtOrdIfEmpty(PostedPmtOrd: Record "Posted Payment Order"; PostingDate: Date) + var + PostedCarteraDoc: Record "Posted Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + VendLedgEntry: Record "Vendor Ledger Entry"; + ClosedPmtOrd: Record "Closed Payment Order"; + begin + PostedCarteraDoc.Reset(); + PostedCarteraDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status); + PostedCarteraDoc.SetRange("Bill Gr./Pmt. Order No.", PostedPmtOrd."No."); + PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Payable); + PostedCarteraDoc.SetRange(Status, PostedCarteraDoc.Status::Open); + if not PostedCarteraDoc.Find('-') then begin + PostedCarteraDoc.SetRange(Status); + PostedCarteraDoc.Find('-'); + repeat + ClosedCarteraDoc.TransferFields(PostedCarteraDoc); + ClosedCarteraDoc.Insert(); + VendLedgEntry.Get(ClosedCarteraDoc."Entry No."); + VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::"Closed BG/PO"; + VendLedgEntry.Modify(); + until PostedCarteraDoc.Next() = 0; + PostedCarteraDoc.DeleteAll(); + ClosedPmtOrd.TransferFields(PostedPmtOrd); + ClosedPmtOrd."Closing Date" := PostingDate; + ClosedPmtOrd.Insert(); + PostedPmtOrd.Delete(); + end; + end; + + procedure CheckDocInfo(var GenJnlLine: Record "Gen. Journal Line"; var ErrorCounter: Integer; var ErrorText: array[50] of Text[250]) + var + CarteraDoc: Record "Cartera Doc."; + PaymentMethod: Record "Payment Method"; + begin + if (GenJnlLine."Document Type" = GenJnlLine."Document Type"::Bill) and + (GenJnlLine.Amount <> 0) + then begin + if GenJnlLine."Bill No." = '' then + AddError( + StrSubstNo(Text1100009, GenJnlLine.FieldCaption("Bill No.")), + ErrorCounter, + ErrorText); + if GenJnlLine."Due Date" = 0D then + AddError( + StrSubstNo(Text1100009, GenJnlLine.FieldCaption("Due Date")), + ErrorCounter, + ErrorText); + if GenJnlLine."Payment Method Code" = '' then + AddError( + StrSubstNo(Text1100009, GenJnlLine.FieldCaption("Payment Method Code")), ErrorCounter, ErrorText); + PaymentMethod.Get(GenJnlLine."Payment Method Code"); + if not PaymentMethod."Create Bills" then + AddError( + StrSubstNo(Text1100010, GenJnlLine.FieldCaption("Payment Method Code")), ErrorCounter, ErrorText); + if not (GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]) then + AddError(Text1100001, ErrorCounter, ErrorText); + end; + if (GenJnlLine."Account Type" = GenJnlLine."Account Type"::Customer) and + (GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::Bill) and + not GenJnlLine."System-Created Entry" + then begin + CarteraDoc.Reset(); + CarteraDoc.SetCurrentKey(Type, "Document No."); + CarteraDoc.SetRange(Type, CarteraDoc.Type::Receivable); + CarteraDoc.SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); + CarteraDoc.SetRange("No.", GenJnlLine."Applies-to Bill No."); + if CarteraDoc.FindFirst() and (CarteraDoc."Bill Gr./Pmt. Order No." <> '') then + AddError(Text1100011, ErrorCounter, ErrorText); + end; + end; + + local procedure AddError(Text: Text[250]; var ErrorCounter: Integer; var ErrorText: array[50] of Text[250]) + begin + ErrorCounter := ErrorCounter + 1; + ErrorText[ErrorCounter] := Text; + end; + + procedure FindDisctdAmt(DocAmount: Decimal; CustomerNo: Code[20]; BankAccCode: Code[20]): Decimal + var + CustRating: Record "Customer Rating"; + BankAcc: Record "Bank Account"; + begin + BankAcc.Get(BankAccCode); + BankAcc.TestField("Customer Ratings Code"); + CustRating.Get(BankAcc."Customer Ratings Code", BankAcc."Currency Code", CustomerNo); + CustRating.TestField("Risk Percentage"); + exit(DocAmount * CustRating."Risk Percentage" / 100); + end; + + local procedure "Code"(var GenJnlLine: Record "Gen. Journal Line"; var PostOk: Boolean; Print: Boolean) + var + GenJnlTemplate: Record "Gen. Journal Template"; + GenJnlPostBatch: Codeunit "Gen. Jnl.-Post Batch"; + TempJnlBatchName: Code[10]; + GLReg: Record "G/L Register"; + IsHandled: Boolean; + begin + GenJnlTemplate.Get(GenJnlLine."Journal Template Name"); + GenJnlTemplate.TestField("Force Posting Report", false); + if GenJnlTemplate.Recurring and (GenJnlLine.GetFilter("Posting Date") <> '') then + GenJnlLine.FieldError("Posting Date", Text1100012); + + if Print then begin + if not Confirm(Text1100013, false) then + exit; + end else + if not Confirm(Text1100014, false) then + exit; + + TempJnlBatchName := GenJnlLine."Journal Batch Name"; + + if Print then begin + GLReg.LockTable(); + if GLReg.FindLast() then; + end; + + IsHandled := false; + OnCodeOnBeforeGenJnlPostBatchRun(GenJnlLine, IsHandled); + if not IsHandled then begin + GenJnlPostBatch.Run(GenJnlLine); + Clear(GenJnlPostBatch); + + if Print then begin + GLReg.SetRange("No.", GLReg."No." + 1, GenJnlLine."Line No."); + if GLReg.Get(GenJnlLine."Line No.") then + REPORT.Run(GenJnlTemplate."Posting Report ID", false, false, GLReg); + end; + + ShowPostResultMessage(GenJnlLine, PostOk, TempJnlBatchName); + + if not GenJnlLine.Find('=><') or (TempJnlBatchName <> GenJnlLine."Journal Batch Name") then begin + GenJnlLine.Reset(); + GenJnlLine.FilterGroup(2); + GenJnlLine.SetRange("Journal Template Name", GenJnlLine."Journal Template Name"); + GenJnlLine.SetRange("Journal Batch Name", GenJnlLine."Journal Batch Name"); + GenJnlLine.FilterGroup(0); + GenJnlLine."Line No." := 1; + end; + end; + end; + + local procedure ShowPostResultMessage(var GenJournalLine: Record "Gen. Journal Line"; var PostOk: Boolean; TempJnlBatchName: Code[10]) + var + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeShowPostResultMessage(GenJournalLine, PostOk, TempJnlBatchName, IsHandled); + if IsHandled then + exit; + + if GenJournalLine."Line No." = 0 then + Message(JournalErrorsMgt.GetNothingToPostErrorMsg()) + else + if TempJnlBatchName = GenJournalLine."Journal Batch Name" then begin + Message(Text1100016); + PostOk := true; + end else + Message(Text1100017, GenJournalLine."Journal Batch Name"); + end; + + procedure PostLines(var GenJnlLine2: Record "Gen. Journal Line"; var PostOk: Boolean; Print: Boolean) + var + GenJnlLine: Record "Gen. Journal Line"; + begin + GenJnlLine.Copy(GenJnlLine2); + Code(GenJnlLine, PostOk, Print); + GenJnlLine2.Copy(GenJnlLine); + end; + + procedure PostSettlement(var GenJournalLine: Record "Gen. Journal Line") + var + GenJournalLineToPost: Record "Gen. Journal Line"; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + UpdateAnalysisView: Codeunit "Update Analysis View"; + begin + if GenJournalLine.FindSet() then + repeat + GenJournalLineToPost := GenJournalLine; + GenJnlPostLine.SetFromSettlement(true); + GenJnlPostLine.Run(GenJournalLineToPost); + until GenJournalLine.Next() = 0; + UpdateAnalysisView.UpdateAll(0, true); + end; + + procedure PostSettlementForPostedPmtOrder(var GenJournalLine: Record "Gen. Journal Line"; PostingDate: Date) + var + GenJournalLineToPost: Record "Gen. Journal Line"; + PostedPmtOrder: Record "Posted Payment Order"; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + UpdateAnalysisView: Codeunit "Update Analysis View"; + begin + if GenJournalLine.FindSet() then + repeat + GenJournalLineToPost := GenJournalLine; + GenJnlPostLine.SetFromSettlement(true); + GenJnlPostLine.Run(GenJournalLineToPost); + if PostedPmtOrder.Get(GenJournalLine."Document No.") then + ClosePmtOrdIfEmpty(PostedPmtOrder, PostingDate); + until GenJournalLine.Next() = 0; + UpdateAnalysisView.UpdateAll(0, true); + end; + + procedure PostSettlementForPostedBillGroup(var GenJournalLine: Record "Gen. Journal Line"; PostingDate: Date) + var + GenJournalLineToPost: Record "Gen. Journal Line"; + PostedBillGroup: Record "Posted Bill Group"; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + UpdateAnalysisView: Codeunit "Update Analysis View"; + begin + if GenJournalLine.FindSet() then + repeat + GenJournalLineToPost := GenJournalLine; + GenJnlPostLine.SetFromSettlement(true); + GenJnlPostLine.Run(GenJournalLineToPost); + if PostedBillGroup.Get(GenJournalLine."Document No.") then + CloseBillGroupIfEmpty(PostedBillGroup, PostingDate); + until GenJournalLine.Next() = 0; + UpdateAnalysisView.UpdateAll(0, true); + end; + + procedure InsertDtldCustLedgEntry(CustLedgEntry2: Record "Cust. Ledger Entry"; Amount2: Decimal; Amount2LCY: Decimal; EntryType: Option " ","Initial Entry",Application,"Unrealized Loss","Unrealized Gain","Realized Loss","Realized Gain","Payment Discount","Payment Discount (VAT Excl.)","Payment Discount (VAT Adjustment)","Appln. Rounding","Correction of Remaining Amount",,,,,,,,,Settlement,Rejection,Redrawal,Expenses; PostingDate: Date) + var + DtldCVLedgEntryBuf: Record "Detailed Cust. Ledg. Entry"; + NextDtldBufferEntryNo: Integer; + begin + Clear(DtldCVLedgEntryBuf); + DtldCVLedgEntryBuf.Reset(); + if DtldCVLedgEntryBuf.FindLast() then + NextDtldBufferEntryNo := DtldCVLedgEntryBuf."Entry No." + 1 + else + NextDtldBufferEntryNo := 1; + + CustLedgEntry2.CalcFields(Amount); + DtldCVLedgEntryBuf.Init(); + DtldCVLedgEntryBuf."Entry No." := NextDtldBufferEntryNo; + DtldCVLedgEntryBuf."Cust. Ledger Entry No." := CustLedgEntry2."Entry No."; + DtldCVLedgEntryBuf."Entry Type" := "Detailed CV Ledger Entry Type".FromInteger(EntryType); + case true of + EntryType = EntryType::Rejection: + DtldCVLedgEntryBuf."Excluded from calculation" := true; + EntryType = EntryType::Redrawal: + DtldCVLedgEntryBuf."Excluded from calculation" := true; + end; + DtldCVLedgEntryBuf."Posting Date" := PostingDate; + DtldCVLedgEntryBuf."Initial Entry Due Date" := CustLedgEntry2."Due Date"; + DtldCVLedgEntryBuf."Document Type" := CustLedgEntry2."Document Type"; + DtldCVLedgEntryBuf."Document No." := CustLedgEntry2."Document No."; + DtldCVLedgEntryBuf.Amount := Amount2; + DtldCVLedgEntryBuf."Amount (LCY)" := Amount2LCY; + DtldCVLedgEntryBuf."Customer No." := CustLedgEntry2."Customer No."; + DtldCVLedgEntryBuf."Currency Code" := CustLedgEntry2."Currency Code"; + DtldCVLedgEntryBuf."User ID" := UserId; + DtldCVLedgEntryBuf."Initial Entry Global Dim. 1" := CustLedgEntry2."Global Dimension 1 Code"; + DtldCVLedgEntryBuf."Initial Entry Global Dim. 2" := CustLedgEntry2."Global Dimension 2 Code"; + DtldCVLedgEntryBuf."Bill No." := CustLedgEntry2."Bill No."; + DtldCVLedgEntryBuf.Insert(true); + end; + + procedure InsertDtldVendLedgEntry(VendLedgEntry2: Record "Vendor Ledger Entry"; Amount2: Decimal; Amount2LCY: Decimal; EntryType: Option " ","Initial Entry",Application,"Unrealized Loss","Unrealized Gain","Realized Loss","Realized Gain","Payment Discount","Payment Discount (VAT Excl.)","Payment Discount (VAT Adjustment)","Appln. Rounding","Correction of Remaining Amount",,,,,,,,,Settlement,Rejection,Redrawal,Expenses; PostingDate: Date) + var + DtldCVLedgEntryBuf: Record "Detailed Vendor Ledg. Entry"; + NextDtldBufferEntryNo: Integer; + begin + Clear(DtldCVLedgEntryBuf); + DtldCVLedgEntryBuf.Reset(); + if DtldCVLedgEntryBuf.FindLast() then + NextDtldBufferEntryNo := DtldCVLedgEntryBuf."Entry No." + 1 + else + NextDtldBufferEntryNo := 1; + + VendLedgEntry2.CalcFields(Amount); + DtldCVLedgEntryBuf.Init(); + DtldCVLedgEntryBuf."Entry No." := NextDtldBufferEntryNo; + DtldCVLedgEntryBuf."Vendor Ledger Entry No." := VendLedgEntry2."Entry No."; + DtldCVLedgEntryBuf."Entry Type" := "Detailed CV Ledger Entry Type".FromInteger(EntryType); + case true of + EntryType = EntryType::Rejection: + DtldCVLedgEntryBuf."Excluded from calculation" := true; + EntryType = EntryType::Redrawal: + DtldCVLedgEntryBuf."Excluded from calculation" := true; + end; + DtldCVLedgEntryBuf."Posting Date" := PostingDate; + DtldCVLedgEntryBuf."Initial Entry Due Date" := VendLedgEntry2."Due Date"; + DtldCVLedgEntryBuf."Document Type" := VendLedgEntry2."Document Type"; + DtldCVLedgEntryBuf."Document No." := VendLedgEntry2."Document No."; + DtldCVLedgEntryBuf.Amount := Amount2; + DtldCVLedgEntryBuf."Amount (LCY)" := Amount2LCY; + DtldCVLedgEntryBuf."Vendor No." := VendLedgEntry2."Vendor No."; + DtldCVLedgEntryBuf."Currency Code" := VendLedgEntry2."Currency Code"; + DtldCVLedgEntryBuf."User ID" := UserId; + DtldCVLedgEntryBuf."Initial Entry Global Dim. 1" := VendLedgEntry2."Global Dimension 1 Code"; + DtldCVLedgEntryBuf."Initial Entry Global Dim. 2" := VendLedgEntry2."Global Dimension 2 Code"; + DtldCVLedgEntryBuf."Bill No." := VendLedgEntry2."Bill No."; + DtldCVLedgEntryBuf.Insert(true); + end; + + procedure GetFCYAppliedAmt(AppliedAmountLCY: Decimal; CurrCode: Code[20]; PostingDate: Date): Decimal + var + CurrExchRate: Record "Currency Exchange Rate"; + GLSetup: Record "General Ledger Setup"; + begin + if CurrCode <> '' then begin + GLSetup.Get(); + exit( + Round( + CurrExchRate.ExchangeAmtLCYToFCY( + PostingDate, + CurrCode, + AppliedAmountLCY, + CurrExchRate.ExchangeRate(PostingDate, CurrCode)), + GLSetup."Amount Rounding Precision")); + end; + exit(AppliedAmountLCY); + end; + + procedure UpdateReceivableCurrFact(PostedCarteraDoc: Record "Posted Cartera Doc."; AppliedAmountLCY: Decimal; var DocAmountLCY: Decimal; var RejDocAmountLCY: Decimal; var DiscDocAmountLCY: Decimal; var CollDocAmountLCY: Decimal; var DiscRiskFactAmountLCY: Decimal; var DiscUnriskFactAmountLCY: Decimal; var CollFactAmountLCY: Decimal) + var + SalesInvHeader: Record "Sales Invoice Header"; + PostedBillGroup: Record "Posted Bill Group"; + CurrFact: Decimal; + CurrExchRate: Record "Currency Exchange Rate"; + begin + if SalesInvHeader.Get(PostedCarteraDoc."Document No.") then + if SalesInvHeader."Currency Factor" <> 0 then begin + if PostedBillGroup.Get(PostedCarteraDoc."Bill Gr./Pmt. Order No.") then; + CurrFact := CurrExchRate.ExchangeRate(PostedBillGroup."Posting Date", PostedCarteraDoc."Currency Code"); + if CurrFact <> SalesInvHeader."Currency Factor" then + if PostedCarteraDoc.Factoring = PostedCarteraDoc.Factoring::" " then begin + if PostedCarteraDoc.Status = PostedCarteraDoc.Status::Rejected then + DocAmountLCY := + GetCorrectAmounts(RejDocAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) + else + if PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount then + DocAmountLCY := + GetCorrectAmounts(DiscDocAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) + else + DocAmountLCY := + GetCorrectAmounts(CollDocAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc); + end else + case true of + PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount: + begin + if PostedBillGroup.Get(PostedCarteraDoc."Bill Gr./Pmt. Order No.") then; + if PostedBillGroup.Factoring = PostedBillGroup.Factoring::Risked then + DocAmountLCY := + GetCorrectAmounts( + DiscRiskFactAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) + else + DocAmountLCY := + GetCorrectAmounts( + DiscUnriskFactAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) + end; + else + DocAmountLCY := + GetCorrectAmounts(CollFactAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) + end; + end; + end; + + procedure UpdatePayableCurrFact(PostedCarteraDoc: Record "Posted Cartera Doc."; AppliedAmountLCY: Decimal; var DocAmountLCY: Decimal; var CollDocAmountLCY: Decimal) + var + PurchInvHeader: Record "Purch. Inv. Header"; + PostedPaymentOrder: Record "Posted Payment Order"; + CurrExchRate: Record "Currency Exchange Rate"; + PaymentMethod: Record "Payment Method"; + CurrFact: Decimal; + begin + if PurchInvHeader.Get(PostedCarteraDoc."Document No.") then + if PurchInvHeader."Currency Factor" <> 0 then begin + if PostedPaymentOrder.Get(PostedCarteraDoc."Bill Gr./Pmt. Order No.") then; + if PaymentMethod.Get(PostedCarteraDoc."Payment Method Code") then; + CurrFact := CurrExchRate.ExchangeRate(PostedPaymentOrder."Posting Date", PostedCarteraDoc."Currency Code"); + if CurrFact <> PurchInvHeader."Currency Factor" then + if not PaymentMethod."Invoices to Cartera" then + DocAmountLCY := + GetCorrectAmounts(CollDocAmountLCY, AppliedAmountLCY, CurrFact, PurchInvHeader."Currency Factor", PostedCarteraDoc); + end; + end; + + procedure GetCorrectAmounts(var Amount: Decimal; AppliedAmountLCY: Decimal; CurrFact: Decimal; InvoiceCurrFact: Decimal; PostedCarteraDoc: Record "Posted Cartera Doc."): Decimal + var + AuxAmount: Decimal; + AuxAmount2: Decimal; + begin + AuxAmount := Amount; + Amount := Round(Round(AppliedAmountLCY * InvoiceCurrFact) / CurrFact); + AuxAmount2 := AuxAmount - Amount; + + if PostedCarteraDoc.Adjusted xor PostedCarteraDoc.ReAdjusted then + exit(0); + if PostedCarteraDoc.ReAdjusted then begin + Amount := Amount - PostedCarteraDoc."Adjusted Amount"; + exit(0); + end; + exit(AuxAmount2); + end; + + procedure UpdateUnAppliedReceivableDoc(var CustLedgEntry: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + var + CarteraDoc: Record "Cartera Doc."; + PostedCarteraDoc: Record "Posted Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + CarteraDoc2: Record "Cartera Doc."; + ClosedCarteraDoc2: Record "Closed Cartera Doc."; + DocLock: Boolean; + Text1100101: Label ' Remove it from its bill group and try again.'; + Text1100102: Label '%1 cannot be unapplied, since it is included in a bill group.'; + InBillGroup: Boolean; + DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; + IsRejection: Boolean; + begin + InBillGroup := false; + if CarteraDoc.Get(CarteraDoc.Type::Receivable, CustLedgEntry."Entry No.") then + if CarteraDoc."Bill Gr./Pmt. Order No." <> '' then + InBillGroup := true; + if PostedCarteraDoc.Get(PostedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No.") then + if PostedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then + InBillGroup := true; + if ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No.") then + if ClosedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then + InBillGroup := true; + if InBillGroup then + Error( + Text1100102 + + Text1100101, + CustLedgEntry.Description); + CustLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + if not DocLock then begin + DocLock := true; + CarteraDoc.LockTable(); + ClosedCarteraDoc.LockTable(); + if CarteraDoc2.FindLast() then; + if ClosedCarteraDoc2.FindLast() then; + end; + if CustLedgEntry."Remaining Amount" = 0 then + CustLedgEntry."Remaining Amt. (LCY)" := 0; + case CustLedgEntry."Document Situation" of + CustLedgEntry."Document Situation"::Cartera: + begin + CarteraDoc.Get(CarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); + CarteraDoc."Remaining Amount" := + CarteraDoc."Remaining Amount" + GetFCYAppliedAmt(CustLedgEntry."Remaining Amt. (LCY)" - CarteraDoc."Remaining Amt. (LCY)", + CarteraDoc."Currency Code", GenJnlLine."Posting Date"); + CarteraDoc."Remaining Amt. (LCY)" := + CarteraDoc."Remaining Amt. (LCY)" + (CustLedgEntry."Remaining Amt. (LCY)" - CarteraDoc."Remaining Amt. (LCY)"); + CarteraDoc.ResetNoPrinted(); + if CustLedgEntry.Open then begin + OnUpdateUnAppliedReceivableDocOnBeforeCarteraDocModify(CarteraDoc); + CarteraDoc.Modify(); + OnUpdateUnAppliedReceivableDocOnAfterCarteraDocModify(CarteraDoc); + end; + end; + CustLedgEntry."Document Situation"::"Closed Documents": + begin + ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); + IsRejection := false; + DtldCustLedgEntry.SetCurrentKey("Cust. Ledger Entry No.", "Posting Date"); + DtldCustLedgEntry.SetRange("Cust. Ledger Entry No.", CustLedgEntry."Entry No."); + if DtldCustLedgEntry.Find('-') then + repeat + if DtldCustLedgEntry."Entry Type" = DtldCustLedgEntry."Entry Type"::Rejection then + IsRejection := true; + until DtldCustLedgEntry.Next() = 0; + + if CustLedgEntry.Open then + if (IsRejection = true) and (CustLedgEntry."Remaining Amount" <> 0) then begin + ClosedCarteraDoc."Remaining Amount" := + ClosedCarteraDoc."Remaining Amount" + (CustLedgEntry."Remaining Amount" - ClosedCarteraDoc."Remaining Amount"); + ClosedCarteraDoc."Remaining Amt. (LCY)" := ClosedCarteraDoc."Remaining Amt. (LCY)" + + (CustLedgEntry."Remaining Amt. (LCY)" - ClosedCarteraDoc."Remaining Amt. (LCY)"); + ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Rejected; + ClosedCarteraDoc.Modify(); + CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::"Closed Documents"; + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Rejected; + CustLedgEntry.Modify(); + end else begin + CarteraDoc.TransferFields(ClosedCarteraDoc); + CarteraDoc.Type := CarteraDoc.Type::Receivable; + CarteraDoc."Remaining Amount" := CarteraDoc."Remaining Amount" + CustLedgEntry."Remaining Amount"; + CarteraDoc."Remaining Amt. (LCY)" := CarteraDoc."Remaining Amt. (LCY)" + CustLedgEntry."Remaining Amt. (LCY)"; + OnUpdateUnAppliedReceivableDocOnBeforeCarteraDocInsert(CarteraDoc); + CarteraDoc.Insert(); + OnUpdateUnAppliedReceivableDocOnAfterCarteraDocInsert(CarteraDoc); + ClosedCarteraDoc.Delete(); + CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera; + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Open; + CustLedgEntry.Modify(); + end; + CustLedgEntry.Modify(); + end; + end; + end; + + procedure UpdateUnAppliedPayableDoc(var VendLedgEntry: Record "Vendor Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line"; var DocLock: Boolean) + var + CarteraDoc: Record "Cartera Doc."; + PostedCarteraDoc: Record "Posted Cartera Doc."; + ClosedCarteraDoc: Record "Closed Cartera Doc."; + CarteraDoc2: Record "Cartera Doc."; + ClosedCarteraDoc2: Record "Closed Cartera Doc."; + Text1100101: Label ' Remove it from its payment order and try again.'; + InBillGroup: Boolean; + Text1100102: Label '%1 cannot be unapplied, since it is included in a payment order.'; + begin + InBillGroup := false; + if CarteraDoc.Get(CarteraDoc.Type::Payable, VendLedgEntry."Entry No.") then + if CarteraDoc."Bill Gr./Pmt. Order No." <> '' then + InBillGroup := true; + if PostedCarteraDoc.Get(PostedCarteraDoc.Type::Payable, VendLedgEntry."Entry No.") then + if PostedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then + InBillGroup := true; + if ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Payable, VendLedgEntry."Entry No.") then + if ClosedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then + InBillGroup := true; + if InBillGroup then + Error( + Text1100102 + + Text1100101, + VendLedgEntry.Description); + VendLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + if not DocLock then begin + DocLock := true; + CarteraDoc.LockTable(); + if CarteraDoc2.FindLast() then; + if ClosedCarteraDoc2.FindLast() then; + ClosedCarteraDoc.LockTable(); + end; + if VendLedgEntry."Remaining Amount" = 0 then + VendLedgEntry."Remaining Amt. (LCY)" := 0; + case VendLedgEntry."Document Situation" of + VendLedgEntry."Document Situation"::Cartera: + begin + CarteraDoc.Get(CarteraDoc.Type::Payable, VendLedgEntry."Entry No."); + CarteraDoc."Remaining Amount" := + CarteraDoc."Remaining Amount" - GetFCYAppliedAmt(VendLedgEntry."Remaining Amt. (LCY)" + CarteraDoc."Remaining Amt. (LCY)", + CarteraDoc."Currency Code", GenJnlLine."Posting Date"); + CarteraDoc."Remaining Amt. (LCY)" := + CarteraDoc."Remaining Amt. (LCY)" - (VendLedgEntry."Remaining Amt. (LCY)" + CarteraDoc."Remaining Amt. (LCY)"); + CarteraDoc.ResetNoPrinted(); + if VendLedgEntry.Open then begin + OnUpdateUnAppliedPayableDocOnBeforeCarteraDocModify(CarteraDoc); + CarteraDoc.Modify(); + OnUpdateUnAppliedPayableDocOnAfterCarteraDocModify(CarteraDoc); + end; + end; + VendLedgEntry."Document Situation"::"Closed Documents": + begin + ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Payable, VendLedgEntry."Entry No."); + if VendLedgEntry.Open then begin + CarteraDoc.TransferFields(ClosedCarteraDoc); + CarteraDoc.Type := CarteraDoc.Type::Payable; + CarteraDoc."Remaining Amount" := CarteraDoc."Remaining Amount" - VendLedgEntry."Remaining Amount"; + CarteraDoc."Remaining Amt. (LCY)" := CarteraDoc."Remaining Amt. (LCY)" - VendLedgEntry."Remaining Amt. (LCY)"; + OnUpdateUnAppliedPayableDocOnBeforeCarteraDocInsert(CarteraDoc); + CarteraDoc.Insert(); + OnUpdateUnAppliedPayableDocOnAfterCarteraDocInsert(CarteraDoc); + ClosedCarteraDoc.Delete(); + VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera; + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Open; + VendLedgEntry.Modify(); + end; + VendLedgEntry.Modify(); + end; + end; + end; + + local procedure CheckVendMultiplePostingGroups(VendorLedgerEntry: Record "Vendor Ledger Entry"): Boolean + var + VendorLedgerEntry2: Record "Vendor Ledger Entry"; + PostingGroup: Code[20]; + begin + PostingGroup := ''; + VendorLedgerEntry2.SetCurrentKey("Applies-to ID"); + VendorLedgerEntry2.SetRange("Applies-to ID", VendorLedgerEntry."Applies-to ID"); + if VendorLedgerEntry2.FindSet() then + repeat + if (PostingGroup <> '') and (PostingGroup <> VendorLedgerEntry2."Vendor Posting Group") then + exit(true); + PostingGroup := VendorLedgerEntry2."Vendor Posting Group"; + until VendorLedgerEntry2.Next() = 0; + + exit(false); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCheckGenJnlLine(var GenJournalLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCreateReceivableDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line"; var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCreatePayableDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line"; var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCreateReceivableDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line"; var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCreatePayableDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line"; var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeShowPostResultMessage(var GenJournalLine: Record "Gen. Journal Line"; var PostOk: Boolean; TempJnlBatchName: Code[10]; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnCloseBillGroupIfEmptyOnAfterPostedCarteraDocSetFilter(var PostedCarteraDoc: Record "Posted Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnCodeOnBeforeGenJnlPostBatchRun(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateUnAppliedReceivableDocOnAfterCarteraDocModify(var CarteraDoc: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateUnAppliedReceivableDocOnBeforeCarteraDocModify(var CarteraDoc: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateUnAppliedReceivableDocOnAfterCarteraDocInsert(var CarteraDoc: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateUnAppliedReceivableDocOnBeforeCarteraDocInsert(var CarteraDoc: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateUnAppliedPayableDocOnAfterCarteraDocModify(var CarteraDoc: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateUnAppliedPayableDocOnBeforeCarteraDocModify(var CarteraDoc: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateUnAppliedPayableDocOnAfterCarteraDocInsert(var CarteraDoc: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateUnAppliedPayableDocOnBeforeCarteraDocInsert(var CarteraDoc: Record "Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdatePayableDocBeforeCarteraDocModify(var CarteraDoc: Record "Cartera Doc."; VendLedgEntry: Record "Vendor Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeUpdateReceivableDoc(var CustLedgEntry: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnUpdatePayableDocBeforeClosedCarteraDocInsert(var ClosedCarteraDoc: Record "Closed Cartera Doc."; GenJnlLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnGJLInfoToDocOnBeforeExit(var CarteraDoc: Record "Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterGJLInfoToDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line") + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsAnalysis.Page.al new file mode 100644 index 00000000000..4a9b6fe875b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsAnalysis.Page.al @@ -0,0 +1,155 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.Currency; +using Microsoft.Foundation.AuditCodes; + +page 7000019 "Documents Analysis" +{ + Caption = 'Documents Analysis'; + DataCaptionExpression = Rec.GetFilter(Type); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SaveValues = true; + SourceTable = "Cartera Doc."; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + field(CurrencyFilter; CurrencyFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Currency Filter'; + TableRelation = Currency; + ToolTip = 'Specifies the currencies that the data is included for.'; + + trigger OnValidate() + begin + CurrencyFilterOnAfterValidate(); + end; + } + } + group(Control6) + { + ShowCaption = false; + field(BillCount; DocCount) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Documents'; + Editable = false; + ToolTip = 'Specifies the number of documents included.'; + } + field(Total; TotalAmt) + { + ApplicationArea = All; + AutoFormatExpression = Doc."Currency Code"; + AutoFormatType = 1; + Caption = 'Amount'; + DrillDown = true; + Editable = false; + ToolTip = 'Specifies the sum of amounts on the documents.'; + Visible = TotalVisible; + + trigger OnDrillDown() + begin + PAGE.RunModal(0, Doc); + end; + } + field(TotalLCY; TotalAmtLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount (LCY)'; + DrillDown = true; + Editable = false; + ToolTip = 'Specifies the sum of amounts on the documents.'; + Visible = TotalLCYVisible; + + trigger OnDrillDown() + begin + PAGE.RunModal(0, Doc); + end; + } + } + } + } + + actions + { + } + + trigger OnInit() + begin + TotalLCYVisible := true; + TotalVisible := true; + end; + + trigger OnOpenPage() + begin + CategoryFilter := Rec.GetFilter("Category Code"); + CurrencyFilter := Rec.GetFilter("Currency Code"); + UpdateStatistics(); + end; + + var + Doc: Record "Cartera Doc."; + CategoryFilter: Code[250]; + CurrencyFilter: Code[250]; + DocCount: Integer; + TotalAmt: Decimal; + TotalAmtLCY: Decimal; + Show: Boolean; + TotalVisible: Boolean; + TotalLCYVisible: Boolean; + + local procedure UpdateStatistics() + begin + Doc.Copy(Rec); + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code"); + Doc.SetFilter("Category Code", CategoryFilter); + Doc.SetFilter("Currency Code", CurrencyFilter); + Show := Doc.CalcSums("Remaining Amount", "Remaining Amt. (LCY)"); + if Show then begin + TotalAmt := Doc."Remaining Amount"; + TotalAmtLCY := Doc."Remaining Amt. (LCY)"; + end; + DocCount := Doc.Count; + TotalVisible := Show; + TotalLCYVisible := Show; + + if Doc.Find('=><') then; // necessary to calculate decimal places + end; + + local procedure CategoryFilterOnAfterValidate() + begin + UpdateStatistics(); + end; + + local procedure CurrencyFilterOnAfterValidate() + begin + UpdateStatistics(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsMaturity.Page.al new file mode 100644 index 00000000000..e8cb92f8097 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsMaturity.Page.al @@ -0,0 +1,190 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Foundation.AuditCodes; + +page 7000029 "Documents Maturity" +{ + Caption = 'Documents Maturity'; + DataCaptionExpression = Rec.GetFilter(Type); + DeleteAllowed = false; + InsertAllowed = false; + PageType = List; + SaveValues = true; + SourceTable = "Cartera Doc."; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + Rec.SetFilter("Category Code", CategoryFilter); + UpdateSubForm(); + end; + } + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View by'; + OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + if PeriodType = PeriodType::Period then + PeriodPeriodTypeOnValidate(); + if PeriodType = PeriodType::Year then + YearPeriodTypeOnValidate(); + if PeriodType = PeriodType::Quarter then + QuarterPeriodTypeOnValidate(); + if PeriodType = PeriodType::Month then + MonthPeriodTypeOnValidate(); + if PeriodType = PeriodType::Week then + WeekPeriodTypeOnValidate(); + if PeriodType = PeriodType::Day then + DayPeriodTypeOnValidate(); + end; + } + field(AmountType; AmountType) + { + ApplicationArea = Basic, Suite; + Caption = 'View as'; + OptionCaption = 'Net Change,Balance at Date'; + ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; + + trigger OnValidate() + begin + if AmountType = AmountType::"Balance at Date" then + BalanceatDateAmountTypeOnValid(); + if AmountType = AmountType::"Net Change" then + NetChangeAmountTypeOnValidate(); + end; + } + } + part(MaturityLines; "Documents Maturity Lines") + { + ApplicationArea = Basic, Suite; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateSubForm(); + end; + + trigger OnOpenPage() + begin + CategoryFilter := Rec.GetFilter("Category Code"); + UpdateSubForm(); + end; + + var + PeriodType: Option Day,Week,Month,Quarter,Year,Period; + AmountType: Option "Net Change","Balance at Date"; + CategoryFilter: Code[250]; + + local procedure UpdateSubForm() + begin + CurrPage.MaturityLines.PAGE.Set(Rec, PeriodType, AmountType); + end; + + local procedure DayPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure WeekPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure MonthPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure QuarterPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure YearPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure PeriodPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure BalanceatDateAmountTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure NetChangeAmountTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure DayPeriodTypeOnValidate() + begin + DayPeriodTypeOnPush(); + end; + + local procedure WeekPeriodTypeOnValidate() + begin + WeekPeriodTypeOnPush(); + end; + + local procedure MonthPeriodTypeOnValidate() + begin + MonthPeriodTypeOnPush(); + end; + + local procedure QuarterPeriodTypeOnValidate() + begin + QuarterPeriodTypeOnPush(); + end; + + local procedure YearPeriodTypeOnValidate() + begin + YearPeriodTypeOnPush(); + end; + + local procedure PeriodPeriodTypeOnValidate() + begin + PeriodPeriodTypeOnPush(); + end; + + local procedure NetChangeAmountTypeOnValidate() + begin + NetChangeAmountTypeOnPush(); + end; + + local procedure BalanceatDateAmountTypeOnValid() + begin + BalanceatDateAmountTypeOnPush(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsMaturityLines.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsMaturityLines.Page.al new file mode 100644 index 00000000000..921dc7975ee --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DocumentsMaturityLines.Page.al @@ -0,0 +1,112 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Foundation.Enums; +using Microsoft.Foundation.Period; +using System.Utilities; + +page 7000030 "Documents Maturity Lines" +{ + Caption = 'Lines'; + PageType = ListPart; + SourceTable = Date; + + layout + { + area(content) + { + repeater(Control1) + { + Editable = false; + ShowCaption = false; + field("Period Start"; Rec."Period Start") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the starting date of the period that you want to view.'; + } + field("Period Name"; Rec."Period Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the period shown on the line.'; + } + field("Doc.""Remaining Amt. (LCY)"""; Doc."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + Caption = 'Amount (LCY)'; + DrillDown = true; + ToolTip = 'Specifies the sum of amounts on the matured documents.'; + + trigger OnDrillDown() + begin + ShowDocEntries(); + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + SetDateFilter(); + Doc.CalcSums("Remaining Amt. (LCY)"); + end; + + trigger OnFindRecord(Which: Text): Boolean + begin + exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); + end; + + trigger OnNextRecord(Steps: Integer): Integer + begin + exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); + end; + + trigger OnOpenPage() + begin + Rec.Reset(); + Doc.SetCurrentKey( + Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date"); + end; + + var + Doc: Record "Cartera Doc."; + PeriodPageManagement: Codeunit PeriodPageManagement; + PeriodLength: Enum "Analysis Period Type"; + AmountType: Enum "Analysis Amount Type"; + + [Scope('OnPrem')] + procedure Set(var NewDoc: Record "Cartera Doc."; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") + begin + NewDoc.CopyFilter(Type, Doc.Type); + NewDoc.CopyFilter("Bill Gr./Pmt. Order No.", Doc."Bill Gr./Pmt. Order No."); + NewDoc.CopyFilter("Category Code", Doc."Category Code"); + NewDoc.CopyFilter("Currency Code", Doc."Currency Code"); + PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); + AmountType := "Analysis Amount Type".FromInteger(NewAmountType); + CurrPage.Update(false); + end; + + [Scope('OnPrem')] + procedure SetDateFilter() + begin + if AmountType = AmountType::"Net Change" then + Doc.SetRange("Due Date", Rec."Period Start", Rec."Period End") + else + Doc.SetRange("Due Date", 0D, Rec."Period End"); + end; + + local procedure ShowDocEntries() + begin + SetDateFilter(); + PAGE.RunModal(0, Doc); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DueDateAdjust.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DueDateAdjust.Codeunit.al new file mode 100644 index 00000000000..a9aebed3062 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/DueDateAdjust.Codeunit.al @@ -0,0 +1,201 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; + +codeunit 10700 "Due Date-Adjust" +{ + + trigger OnRun() + begin + end; + + procedure SalesAdjustDueDate(var DueDate: Date; MinDate: Date; MaxDate: Date; CustomerNo: Code[20]) + var + PaymentDay: Record "Payment Day"; + NonPaymentPeriod: Record "Non-Payment Period"; + Customer: Record Customer; + begin + if CustomerNo = '' then + exit; + if not Customer.Get(CustomerNo) then + exit; + + SetNonPaymentPeriodFilterAndFields(NonPaymentPeriod, NonPaymentPeriod."Table Name"::Customer, Customer."Non-Paymt. Periods Code"); + SetPaymentDayFilterAndFields(PaymentDay, PaymentDay."Table Name"::Customer, Customer."Payment Days Code"); + AdjustDate(NonPaymentPeriod, PaymentDay, DueDate, MinDate, MaxDate); + end; + + procedure PurchAdjustDueDate(var DueDate: Date; MinDate: Date; MaxDate: Date; VendorNo: Code[20]) + var + PaymentDay: Record "Payment Day"; + NonPaymentPeriod: Record "Non-Payment Period"; + Vendor: Record Vendor; + CompanyInfo: Record "Company Information"; + IsHandled: Boolean; + begin + if VendorNo = '' then + exit; + if not Vendor.Get(VendorNo) then + exit; + + IsHandled := false; + OnPurchAdjustDueDateOnBeforeSetNonPaymentPeriodFilterAndFields(NonPaymentPeriod, Vendor, IsHandled); + if not IsHandled then + if Vendor."Non-Paymt. Periods Code" <> '' then + SetNonPaymentPeriodFilterAndFields(NonPaymentPeriod, NonPaymentPeriod."Table Name"::Vendor, Vendor."Non-Paymt. Periods Code") + else begin + CompanyInfo.Get(); + SetNonPaymentPeriodFilterAndFields( + NonPaymentPeriod, NonPaymentPeriod."Table Name"::"Company Information", CompanyInfo."Non-Paymt. Periods Code") + end; + + IsHandled := false; + OnPurchAdjustDueDateOnBeforeSetPaymentDayFilterAndFields(PaymentDay, Vendor, IsHandled); + if not IsHandled then + if Vendor."Payment Days Code" <> '' then + SetPaymentDayFilterAndFields(PaymentDay, PaymentDay."Table Name"::Vendor, Vendor."Payment Days Code") + else + SetPaymentDayFilterAndFieldsFromCompany(PaymentDay); + + AdjustDate(NonPaymentPeriod, PaymentDay, DueDate, MinDate, MaxDate); + + OnAfterPurchAdjustDueDate(DueDate, MinDate, MaxDate, VendorNo, PaymentDay); + end; + + local procedure SetPaymentDayFilterAndFieldsFromCompany(var PaymentDay: Record "Payment Day") + var + CompanyInformation: Record "Company Information"; + begin + CompanyInformation.Get(); + SetPaymentDayFilterAndFields(PaymentDay, PaymentDay."Table Name"::"Company Information", CompanyInformation."Payment Days Code"); + end; + + local procedure AdjustDate(var NonPaymentPeriod: Record "Non-Payment Period"; var PaymentDay: Record "Payment Day"; var DueDate: Date; MinDate: Date; MaxDate: Date) + var + InitialDate: Date; + ForwardCalculation: Boolean; + begin + if DueDateIsGreaterMaxAvailDate(DueDate, MinDate, MaxDate) then + DueDate := MaxDate; + ForwardCalculation := true; + + repeat + InitialDate := DueDate; + if not NonPaymentPeriod.IsEmpty() then begin + if ForwardCalculation then begin + DueDate := AdjustToNonPaymentPeriod(NonPaymentPeriod, DueDate, ForwardCalculation); + if DueDateIsGreaterMaxAvailDate(DueDate, MinDate, MaxDate) then + ForwardCalculation := false + end; + if not ForwardCalculation then + DueDate := AdjustToNonPaymentPeriod(NonPaymentPeriod, InitialDate, ForwardCalculation); + end; + if not PaymentDay.IsEmpty() then begin + if ForwardCalculation then begin + DueDate := AdjustToPaymentDay(PaymentDay, DueDate, '>', '-', '+'); + if DueDateIsGreaterMaxAvailDate(DueDate, MinDate, MaxDate) then + ForwardCalculation := false + end; + if not ForwardCalculation then + DueDate := AdjustToPaymentDay(PaymentDay, InitialDate, '<', '+', '-'); + end; + if (DueDate < MinDate) or PaymentDayInNonPaymentPeriod(NonPaymentPeriod, PaymentDay, DueDate) then begin + DueDate := 0D; + exit + end + until (DueDate = InitialDate) + end; + + local procedure AdjustToNonPaymentPeriod(var NonPaymentPeriod: Record "Non-Payment Period"; DueDate: Date; ForwardCalculation: Boolean): Date + var + PreviousFromDate: Date; + begin + PreviousFromDate := NonPaymentPeriod."From Date"; + NonPaymentPeriod."From Date" := DueDate; + if NonPaymentPeriod.Find('=<') and (DueDate <= NonPaymentPeriod."To Date") then begin + if ForwardCalculation then + DueDate := NonPaymentPeriod."To Date" + 1 + else + DueDate := NonPaymentPeriod."From Date" - 1; + + OnAdjustToNonPaymentPeriodOnAfterCalcDueDate(); + end else + if PreviousFromDate <> 0D then + NonPaymentPeriod."From Date" := PreviousFromDate; + exit(DueDate) + end; + + local procedure AdjustToPaymentDay(var PaymentDay: Record "Payment Day"; DueDate: Date; DirectionText: Text[1]; FindText: Text[1]; Sign: Text[1]): Date + begin + if (CalcDate('', DueDate) = DueDate) and PaymentDay.Get(PaymentDay."Table Name", PaymentDay.Code, 31) then + exit(DueDate); + PaymentDay."Day of the month" := Date2DMY(DueDate, 1); + if PaymentDay.Find('=') then + exit(DueDate); + if PaymentDay.Find(DirectionText) then + exit(CalcDate(StrSubstNo('<%1D%2>', Sign, PaymentDay."Day of the month"), DueDate)); + if PaymentDay.Find(FindText) then + exit(CalcDate(StrSubstNo('<%1D%2>', Sign, PaymentDay."Day of the month"), DueDate)); + exit(DueDate) + end; + + local procedure SetPaymentDayFilterAndFields(var PaymentDay: Record "Payment Day"; TableNameOption: Option; PaymentDayCode: Code[20]) + begin + PaymentDay.Reset(); + PaymentDay.SetRange("Table Name", TableNameOption); + PaymentDay.SetRange(Code, PaymentDayCode); + PaymentDay."Table Name" := TableNameOption; + PaymentDay.Code := PaymentDayCode + end; + + local procedure SetNonPaymentPeriodFilterAndFields(var NonPaymentPeriod: Record "Non-Payment Period"; TableNameOption: Option; NonPaymentPeriodCode: Code[20]) + begin + NonPaymentPeriod.Reset(); + NonPaymentPeriod.SetRange("Table Name", TableNameOption); + NonPaymentPeriod.SetRange(Code, NonPaymentPeriodCode); + NonPaymentPeriod."Table Name" := TableNameOption; + NonPaymentPeriod.Code := NonPaymentPeriodCode + end; + + local procedure PaymentDayInNonPaymentPeriod(var NonPaymentPeriod: Record "Non-Payment Period"; PaymentDay: Record "Payment Day"; PaymentDate: Date): Boolean + begin + if not NonPaymentPeriod.IsEmpty() and not PaymentDay.IsEmpty() then begin + if (PaymentDate >= NonPaymentPeriod."From Date") and (PaymentDate <= NonPaymentPeriod."To Date") then + exit(true); + + exit(false); + end; + end; + + local procedure DueDateIsGreaterMaxAvailDate(DueDate: Date; MinDate: Date; MaxDate: Date): Boolean + begin + exit((DueDate > MaxDate) and (MinDate <> MaxDate)); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterPurchAdjustDueDate(var DueDate: Date; MinDate: Date; MaxDate: Date; VendorNo: Code[20]; var PaymentDay: Record "Payment Day") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAdjustToNonPaymentPeriodOnAfterCalcDueDate() + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnPurchAdjustDueDateOnBeforeSetNonPaymentPeriodFilterAndFields(var NonPaymentPeriod: Record "Non-Payment Period"; Vendor: Record Vendor; IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnPurchAdjustDueDateOnBeforeSetPaymentDayFilterAndFields(var PaymentDay: Record "Payment Day"; Vendor: Record Vendor; IsHandled: Boolean) + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/FeeRange.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/FeeRange.Table.al new file mode 100644 index 00000000000..fa12b1fbf99 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/FeeRange.Table.al @@ -0,0 +1,667 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; + +table 7000019 "Fee Range" +{ + Caption = 'Fee Range'; + DrillDownPageID = "Fee Ranges"; + LookupPageID = "Fee Ranges"; + DataClassification = CustomerContent; + + fields + { + field(1; "Code"; Code[20]) + { + Caption = 'Code'; + NotBlank = true; + } + field(2; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + TableRelation = Currency; + } + field(3; "Type of Fee"; Option) + { + Caption = 'Type of Fee'; + OptionCaption = 'Collection Expenses,Discount Expenses,Discount Interests,Rejection Expenses,Payment Order Expenses,Unrisked Factoring Expenses,Risked Factoring Expenses '; + OptionMembers = "Collection Expenses","Discount Expenses","Discount Interests","Rejection Expenses","Payment Order Expenses","Unrisked Factoring Expenses","Risked Factoring Expenses "; + } + field(4; "From No. of Days"; Integer) + { + Caption = 'From No. of Days'; + MinValue = 0; + + trigger OnValidate() + begin + if "From No. of Days" <> 0 then + TestField("Type of Fee", "Type of Fee"::"Discount Interests"); + end; + } + field(5; "Charge Amount per Doc."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Charge Amount per Doc.'; + MinValue = 0; + } + field(6; "Charge % per Doc."; Decimal) + { + AutoFormatType = 0; + Caption = 'Charge % per Doc.'; + DecimalPlaces = 2 : 6; + MaxValue = 100; + MinValue = 0; + } + field(7; "Minimum Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Minimum Amount'; + } + } + + keys + { + key(Key1; "Code", "Currency Code", "Type of Fee", "From No. of Days") + { + Clustered = true; + } + } + + fieldgroups + { + } + + var + Text1100000: Label 'untitled'; + Text1100001: Label 'CollExpenses'; + Text1100002: Label 'Out of Range'; + Text1100003: Label 'DiscExpenses'; + Text1100004: Label 'DiscInterests'; + Text1100005: Label 'RejExpenses'; + Text1100006: Label 'PmtOrdCollExpenses'; + Text1100007: Label 'RiskFactExpenses'; + Text1100008: Label 'UnriskFactExpenses'; + Currency: Record Currency; + OperationFee: Record "Operation Fee"; + DiscExpenses: Record "BG/PO Post. Buffer" temporary; + CollExpenses: Record "BG/PO Post. Buffer" temporary; + DiscInterests: Record "BG/PO Post. Buffer" temporary; + RejExpenses: Record "BG/PO Post. Buffer" temporary; + PmtOrdCollExpenses: Record "BG/PO Post. Buffer" temporary; + RiskFactExpenses: Record "BG/PO Post. Buffer" temporary; + UnriskFactExpenses: Record "BG/PO Post. Buffer" temporary; + Initialized: Boolean; + TotalDiscExpensesAmt: Decimal; + InitDiscExpensesAmt: Decimal; + TotalCollExpensesAmt: Decimal; + TotalDiscInterestsAmt: Decimal; + InitDiscInterestsAmt: Decimal; + TotalRejExpensesAmt: Decimal; + InitRejExpensesAmt: Decimal; + TotalPmtOrdCollExpensesAmt: Decimal; + TotalRiskFactExpensesAmt: Decimal; + InitRiskFactExpensesAmt: Decimal; + TotalUnriskFactExpensesAmt: Decimal; + InitUnriskFactExpensesAmt: Decimal; + "Sum": Decimal; + Factor: Decimal; + + procedure Caption(): Text + var + BankAcc: Record "Bank Account"; + begin + if Code = '' then + exit(Text1100000); + BankAcc.Get(Code); + exit(StrSubstNo('%1 %2 %3 %4', BankAcc."No.", BankAcc.Name, "Currency Code", "Type of Fee")); + end; + + local procedure InitCurrency() + begin + if Initialized then + exit; + + if "Currency Code" = '' then + Currency.InitRoundingPrecision() + else begin + Currency.Get("Currency Code"); + Currency.TestField("Amount Rounding Precision"); + end; + Initialized := true; + end; + + procedure InitCollExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + TotalCollExpensesAmt := 0; + if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Collection Expenses") then + TotalCollExpensesAmt := + Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); + + CollExpenses.DeleteAll(); + end; + + procedure CalcCollExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + SetRange(Code, Code2); + SetRange("Currency Code", CurrencyCode2); + SetRange("Type of Fee", "Type of Fee"::"Collection Expenses"); + if Find('=><') then begin + Amount := Round( + "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, + Currency."Amount Rounding Precision"); + if Amount < "Minimum Amount" then + Amount := "Minimum Amount"; + TotalCollExpensesAmt := TotalCollExpensesAmt + Amount; + end; + if CollExpenses.Get(Text1100001, '', EntryNo) then begin + CollExpenses.Amount := CollExpenses.Amount + Amount; + CollExpenses.Modify(); + end else begin + CollExpenses.Init(); + CollExpenses.Account := Text1100001; + CollExpenses."Entry No." := EntryNo; + // CollExpenses."Global Dimension 1 Code" := Dep; + // CollExpenses."Global Dimension 2 Code" := Proj; + CollExpenses.Amount := Amount; + CollExpenses.Insert(); + end; + end; + + procedure GetTotalCollExpensesAmt(): Decimal + begin + exit(TotalCollExpensesAmt); + end; + + procedure InitDiscExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + TotalDiscExpensesAmt := 0; + if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Discount Expenses") then + TotalDiscExpensesAmt := + Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); + + InitDiscExpensesAmt := TotalDiscExpensesAmt; + DiscExpenses.DeleteAll(); + end; + + procedure CalcDiscExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + SetRange(Code, Code2); + SetRange("Currency Code", CurrencyCode2); + SetRange("Type of Fee", "Type of Fee"::"Discount Expenses"); + if Find('=><') then begin + Amount := Round( + "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, + Currency."Amount Rounding Precision"); + if Amount < "Minimum Amount" then + Amount := "Minimum Amount"; + TotalDiscExpensesAmt := TotalDiscExpensesAmt + Amount; + end else + Amount := 0; + + if DiscExpenses.Get(Text1100003, '', EntryNo) then begin + DiscExpenses.Amount := DiscExpenses.Amount + Amount; + DiscExpenses.Modify(); + end else begin + DiscExpenses.Init(); + DiscExpenses.Account := Text1100003; + DiscExpenses."Entry No." := EntryNo; + // DiscExpenses."Global Dimension 1 Code" := Dep; + // DiscExpenses."Global Dimension 2 Code" := Proj; + DiscExpenses.Amount := Amount; + DiscExpenses.Insert(); + end; + end; + + procedure GetTotalDiscExpensesAmt(): Decimal + begin + exit(TotalDiscExpensesAmt); + end; + + procedure NoRegsDiscExpenses(): Integer + begin + DiscExpenses.SetRange(Account, Text1100003); + if DiscExpenses.Find('-') and (InitDiscExpensesAmt <> 0) then begin + Sum := 0; + repeat + Sum := Sum + DiscExpenses.Amount; + until DiscExpenses.Next() <= 0; + + if Sum <> 0 then + Factor := InitDiscExpensesAmt / Sum + else + Factor := 1; + DiscExpenses.Find('-'); + repeat + Sum := Round(DiscExpenses.Amount * Factor, Currency."Amount Rounding Precision"); + DiscExpenses.Amount := DiscExpenses.Amount + Sum; + InitDiscExpensesAmt := InitDiscExpensesAmt - Sum; + DiscExpenses.Modify(); + until DiscExpenses.Next() <= 0; + if Round(InitDiscExpensesAmt, Currency."Amount Rounding Precision") <> 0 then begin + DiscExpenses.Find('+'); + DiscExpenses.Amount := DiscExpenses.Amount + Round(InitDiscExpensesAmt, Currency."Amount Rounding Precision"); + InitDiscExpensesAmt := 0; + DiscExpenses.Modify(); + end; + end; + exit(DiscExpenses.Count); + end; + + procedure GetDiscExpensesAmt(var value: Record "BG/PO Post. Buffer"; Register: Integer) + begin + DiscExpenses.SetRange(Account, Text1100003); + DiscExpenses.Find('-'); + if Register <> DiscExpenses.Next(Register) then + Error(Text1100002); + value := DiscExpenses; + end; + + procedure InitDiscInterests(Code2: Code[20]; CurrencyCode2: Code[10]) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + TotalDiscInterestsAmt := 0; + if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Discount Interests") then + TotalDiscInterestsAmt := + Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); + + InitDiscInterestsAmt := TotalDiscInterestsAmt; + DiscInterests.DeleteAll(); + end; + + procedure CalcDiscInterestsAmt(Code2: Code[20]; CurrencyCode2: Code[10]; NoOfDays: Integer; Amount: Decimal; EntryNo: Integer) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + if NoOfDays <= 0 then + exit; + SetRange(Code, Code2); + SetRange("Currency Code", CurrencyCode2); + SetFilter("From No. of Days", '<=%1', NoOfDays); + SetRange("Type of Fee", "Type of Fee"::"Discount Interests"); + if Find('+') then begin + Amount := Round( + "Charge Amount per Doc." + Amount * "Charge % per Doc." * NoOfDays / 36000, + Currency."Amount Rounding Precision"); + if Amount < "Minimum Amount" then + Amount := "Minimum Amount"; + TotalDiscInterestsAmt := TotalDiscInterestsAmt + Amount; + end else + Amount := 0; + + SetRange("Type of Fee"); + + if DiscInterests.Get(Text1100004, '', EntryNo) then begin + DiscInterests.Amount := DiscInterests.Amount + Amount; + DiscInterests.Modify(); + end else begin + DiscInterests.Init(); + DiscInterests.Account := Text1100004; + DiscInterests."Entry No." := EntryNo; + DiscInterests.Amount := Amount; + DiscInterests.Insert(); + end; + end; + + procedure GetTotalDiscInterestsAmt(): Decimal + begin + exit(TotalDiscInterestsAmt); + end; + + procedure NoRegsDiscInterests(): Integer + begin + DiscInterests.SetRange(Account, Text1100004); + if DiscInterests.Find('-') and (InitDiscInterestsAmt <> 0) then begin + Sum := 0; + repeat + Sum := Sum + DiscInterests.Amount; + until DiscInterests.Next() <= 0; + + if Sum <> 0 then + Factor := InitDiscInterestsAmt / Sum + else + Factor := 1; + DiscInterests.Find('-'); + repeat + Sum := Round(DiscInterests.Amount * Factor, Currency."Amount Rounding Precision"); + DiscInterests.Amount := DiscInterests.Amount + Sum; + InitDiscInterestsAmt := InitDiscInterestsAmt - Sum; + DiscInterests.Modify(); + until DiscInterests.Next() <= 0; + if Round(InitDiscInterestsAmt, Currency."Amount Rounding Precision") <> 0 then begin + DiscInterests.Find('+'); + DiscInterests.Amount := DiscInterests.Amount + Round(InitDiscInterestsAmt, Currency."Amount Rounding Precision"); + InitDiscInterestsAmt := 0; + DiscInterests.Modify(); + end; + end; + exit(DiscInterests.Count); + end; + + procedure GetDiscInterestsAmt(var value: Record "BG/PO Post. Buffer"; Register: Integer) + begin + DiscInterests.SetRange(Account, Text1100004); + DiscInterests.Find('-'); + if Register <> DiscInterests.Next(Register) then + Error(Text1100002); + value := DiscInterests; + end; + + procedure InitRejExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + TotalRejExpensesAmt := 0; + if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Rejection Expenses") then + TotalRejExpensesAmt := + Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); + + InitRejExpensesAmt := TotalRejExpensesAmt; + RejExpenses.DeleteAll(); + end; + + procedure CalcRejExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + SetRange(Code, Code2); + SetRange("Currency Code", CurrencyCode2); + SetRange("Type of Fee", "Type of Fee"::"Rejection Expenses"); + if Find('=><') then begin + Amount := Round( + "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, + Currency."Amount Rounding Precision"); + if Amount < "Minimum Amount" then + Amount := "Minimum Amount"; + TotalRejExpensesAmt := TotalRejExpensesAmt + Amount; + end; + SetRange("Type of Fee"); + + if RejExpenses.Get(Text1100005, '', EntryNo) then begin + RejExpenses.Amount := RejExpenses.Amount + Amount; + RejExpenses.Modify(); + end else begin + RejExpenses.Init(); + RejExpenses.Account := Text1100005; + RejExpenses."Entry No." := EntryNo; + RejExpenses.Amount := Amount; + RejExpenses.Insert(); + end; + end; + + procedure GetTotalRejExpensesAmt(): Decimal + begin + exit(TotalRejExpensesAmt); + end; + + procedure NoRegRejExpenses(): Integer + begin + RejExpenses.SetRange(Account, Text1100005); + if RejExpenses.Find('-') and (InitRejExpensesAmt <> 0) then begin + Sum := 0; + repeat + Sum := Sum + RejExpenses.Amount; + until RejExpenses.Next() <= 0; + + if Sum <> 0 then + Factor := InitRejExpensesAmt / Sum + else + Factor := 1; + RejExpenses.Find('-'); + repeat + Sum := Round(RejExpenses.Amount * Factor, Currency."Amount Rounding Precision"); + RejExpenses.Amount := RejExpenses.Amount + Sum; + InitRejExpensesAmt := InitRejExpensesAmt - Sum; + RejExpenses.Modify(); + until RejExpenses.Next() <= 0; + if Round(InitRejExpensesAmt, Currency."Amount Rounding Precision") <> 0 then begin + RejExpenses.Find('+'); + RejExpenses.Amount := RejExpenses.Amount + Round(InitRejExpensesAmt, Currency."Amount Rounding Precision"); + InitRejExpensesAmt := 0; + RejExpenses.Modify(); + end; + end; + exit(RejExpenses.Count); + end; + + procedure GetRejExpensesAmt(var value: Record "BG/PO Post. Buffer"; Register: Integer) + begin + RejExpenses.SetRange(Account, Text1100005); + RejExpenses.Find('-'); + if Register <> RejExpenses.Next(Register) then + Error(Text1100002); + value := RejExpenses; + end; + + procedure InitPmtOrdCollExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + TotalPmtOrdCollExpensesAmt := 0; + if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Payment Order Expenses") then + TotalPmtOrdCollExpensesAmt := + Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); + + PmtOrdCollExpenses.DeleteAll(); + end; + + procedure CalcPmtOrdCollExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + SetRange(Code, Code2); + SetRange("Currency Code", CurrencyCode2); + SetRange("Type of Fee", "Type of Fee"::"Payment Order Expenses"); + if Find('=><') then begin + Amount := Round( + "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, + Currency."Amount Rounding Precision"); + if Amount < "Minimum Amount" then + Amount := "Minimum Amount"; + TotalPmtOrdCollExpensesAmt := TotalPmtOrdCollExpensesAmt + Amount; + end; + + if PmtOrdCollExpenses.Get(Text1100006, '', EntryNo) then begin + PmtOrdCollExpenses.Amount := PmtOrdCollExpenses.Amount + Amount; + PmtOrdCollExpenses.Modify(); + end else begin + PmtOrdCollExpenses.Init(); + PmtOrdCollExpenses.Account := Text1100006; + PmtOrdCollExpenses."Entry No." := EntryNo; + PmtOrdCollExpenses.Amount := Amount; + PmtOrdCollExpenses.Insert(); + end; + end; + + procedure GetTotalPmtOrdCollExpensesAmt(): Decimal + begin + exit(TotalPmtOrdCollExpensesAmt); + end; + + procedure InitRiskFactExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + TotalRiskFactExpensesAmt := 0; + if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Risked Factoring Expenses ") then + TotalRiskFactExpensesAmt := + Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); + + InitRiskFactExpensesAmt := TotalRiskFactExpensesAmt; + RiskFactExpenses.DeleteAll(); + end; + + procedure CalcRiskFactExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + SetRange(Code, Code2); + SetRange("Currency Code", CurrencyCode2); + SetRange("Type of Fee", "Type of Fee"::"Risked Factoring Expenses "); + if Find('=><') then begin + Amount := Round( + "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, + Currency."Amount Rounding Precision"); + if Amount < "Minimum Amount" then + Amount := "Minimum Amount"; + TotalRiskFactExpensesAmt := TotalRiskFactExpensesAmt + Amount; + end; + + if RiskFactExpenses.Get(Text1100007, '', EntryNo) then begin + RiskFactExpenses.Amount := RiskFactExpenses.Amount + Amount; + RiskFactExpenses.Modify(); + end else begin + RiskFactExpenses.Init(); + RiskFactExpenses.Account := Text1100007; + RiskFactExpenses."Entry No." := EntryNo; + RiskFactExpenses.Amount := Amount; + RiskFactExpenses.Insert(); + end; + end; + + procedure GetTotalRiskFactExpensesAmt(): Decimal + begin + exit(TotalRiskFactExpensesAmt); + end; + + procedure NoRegRiskFactExpenses(): Integer + begin + RiskFactExpenses.SetRange(Account, Text1100007); + if RiskFactExpenses.Find('-') and (InitRiskFactExpensesAmt <> 0) then begin + Sum := 0; + repeat + Sum := Sum + RiskFactExpenses.Amount; + until RiskFactExpenses.Next() <= 0; + + if Sum <> 0 then + Factor := InitRiskFactExpensesAmt / Sum + else + Factor := 1; + RiskFactExpenses.Find('-'); + repeat + Sum := Round(RiskFactExpenses.Amount * Factor, Currency."Amount Rounding Precision"); + RiskFactExpenses.Amount := RiskFactExpenses.Amount + Sum; + InitRiskFactExpensesAmt := InitRiskFactExpensesAmt - Sum; + RiskFactExpenses.Modify(); + until RiskFactExpenses.Next() <= 0; + if Round(InitRiskFactExpensesAmt, Currency."Amount Rounding Precision") <> 0 then begin + RiskFactExpenses.Find('+'); + RiskFactExpenses.Amount := RiskFactExpenses.Amount + Round(InitRiskFactExpensesAmt, Currency."Amount Rounding Precision"); + InitRiskFactExpensesAmt := 0; + RiskFactExpenses.Modify(); + end; + end; + exit(RiskFactExpenses.Count); + end; + + procedure GetRiskFactExpenses(var value: Record "BG/PO Post. Buffer"; Register: Integer) + begin + RiskFactExpenses.SetRange(Account, Text1100007); + RiskFactExpenses.Find('-'); + if Register <> RiskFactExpenses.Next(Register) then + Error(Text1100002); + value := RiskFactExpenses; + end; + + procedure InitUnriskFactExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + TotalUnriskFactExpensesAmt := 0; + if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Unrisked Factoring Expenses") then + TotalUnriskFactExpensesAmt := + Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); + + InitUnriskFactExpensesAmt := TotalUnriskFactExpensesAmt; + UnriskFactExpenses.DeleteAll(); + end; + + procedure CalcUnriskFactExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) + begin + "Currency Code" := CurrencyCode2; + InitCurrency(); + SetRange(Code, Code2); + SetRange("Currency Code", CurrencyCode2); + SetRange("Type of Fee", "Type of Fee"::"Unrisked Factoring Expenses"); + if Find('=><') then begin + Amount := Round( + "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, + Currency."Amount Rounding Precision"); + if Amount < "Minimum Amount" then + Amount := "Minimum Amount"; + TotalUnriskFactExpensesAmt := TotalUnriskFactExpensesAmt + Amount; + end; + + if UnriskFactExpenses.Get(Text1100008, '', EntryNo) then begin + UnriskFactExpenses.Amount := UnriskFactExpenses.Amount + Amount; + UnriskFactExpenses.Modify(); + end else begin + UnriskFactExpenses.Init(); + UnriskFactExpenses.Account := Text1100008; + UnriskFactExpenses."Entry No." := EntryNo; + UnriskFactExpenses.Amount := Amount; + UnriskFactExpenses.Insert(); + end; + end; + + procedure GetTotalUnriskFactExpensesAmt(): Decimal + begin + exit(TotalUnriskFactExpensesAmt); + end; + + procedure NoRegUnriskFactExpenses(): Integer + begin + UnriskFactExpenses.SetRange(Account, Text1100008); + if UnriskFactExpenses.Find('-') and (InitUnriskFactExpensesAmt <> 0) then begin + Sum := 0; + repeat + Sum := Sum + UnriskFactExpenses.Amount; + until UnriskFactExpenses.Next() <= 0; + + if Sum <> 0 then + Factor := InitUnriskFactExpensesAmt / Sum + else + Factor := 1; + UnriskFactExpenses.Find('-'); + repeat + Sum := Round(UnriskFactExpenses.Amount * Factor, Currency."Amount Rounding Precision"); + UnriskFactExpenses.Amount := UnriskFactExpenses.Amount + Sum; + InitUnriskFactExpensesAmt := InitUnriskFactExpensesAmt - Sum; + UnriskFactExpenses.Modify(); + until UnriskFactExpenses.Next() <= 0; + if Round(InitUnriskFactExpensesAmt, Currency."Amount Rounding Precision") <> 0 then begin + UnriskFactExpenses.Find('+'); + UnriskFactExpenses.Amount := UnriskFactExpenses.Amount + + Round(InitUnriskFactExpensesAmt, Currency."Amount Rounding Precision"); + InitUnriskFactExpensesAmt := 0; + UnriskFactExpenses.Modify(); + end; + end; + exit(UnriskFactExpenses.Count); + end; + + procedure GetUnriskFactExpenses(var value: Record "BG/PO Post. Buffer"; Register: Integer) + begin + UnriskFactExpenses.SetRange(Account, Text1100008); + UnriskFactExpenses.Find('-'); + if Register <> UnriskFactExpenses.Next(Register) then + Error(Text1100002); + value := UnriskFactExpenses; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/FeeRanges.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/FeeRanges.Page.al new file mode 100644 index 00000000000..96855eee59f --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/FeeRanges.Page.al @@ -0,0 +1,49 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 7000049 "Fee Ranges" +{ + Caption = 'Fee Ranges'; + DataCaptionExpression = Rec.Caption(); + PageType = List; + SourceTable = "Fee Range"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("From No. of Days"; Rec."From No. of Days") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of days for which commissions will be charged.'; + } + field("Charge Amount per Doc."; Rec."Charge Amount per Doc.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount per document that will be charged for each of the operations that generates commissions.'; + } + field("Charge % per Doc."; Rec."Charge % per Doc.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the percentage per document that will be charged for each type of operation that generates commissions.'; + } + field("Minimum Amount"; Rec."Minimum Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the minimum amount charged for each operation type, if the sum of the rest of the commissions is less than this minimum charge.'; + } + } + } + } + + actions + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/GLRegDocs.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/GLRegDocs.Codeunit.al new file mode 100644 index 00000000000..73105638701 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/GLRegDocs.Codeunit.al @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Finance.GeneralLedger.Ledger; + +codeunit 7000001 "G/L Reg.-Docs." +{ + + trigger OnRun() + begin + end; + + var + Doc: Record "Cartera Doc."; + PostedDoc: Record "Posted Cartera Doc."; + ClosedDoc: Record "Closed Cartera Doc."; + + [Scope('OnPrem')] + procedure Docs(var GLReg: Record "G/L Register") + begin + Doc.SetRange("Entry No.", GLReg."From Entry No.", GLReg."To Entry No."); + PAGE.Run(0, Doc); + end; + + [Scope('OnPrem')] + procedure DocsinPostedBGPO(var GLReg: Record "G/L Register") + begin + PostedDoc.SetRange("Entry No.", GLReg."From Entry No.", GLReg."To Entry No."); + PAGE.Run(0, PostedDoc); + end; + + [Scope('OnPrem')] + procedure ClosedDocs(var GLReg: Record "G/L Register") + begin + ClosedDoc.SetRange("Entry No.", GLReg."From Entry No.", GLReg."To Entry No."); + PAGE.Run(0, ClosedDoc); + end; + + [Scope('OnPrem')] + procedure CheckPostedDocsInPostedBGPO(var GLEntry: Record "G/L Entry"): Boolean + begin + if GLEntry."Document Type" = GLEntry."Document Type"::Bill then begin + PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", GLEntry."Document No."); + if PostedDoc.FindFirst() then + exit(true); + + ClosedDoc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code", + "Currency Code", Status, Redrawn); + ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", GLEntry."Document No."); + if ClosedDoc.FindFirst() then + exit(true); + end else begin + PostedDoc.SetCurrentKey(Type, "Document No."); + PostedDoc.SetRange("Document No.", GLEntry."Document No."); + if PostedDoc.FindFirst() then + exit(true); + + ClosedDoc.SetCurrentKey(Type, "Document No."); + ClosedDoc.SetRange("Document No.", GLEntry."Document No."); + if ClosedDoc.FindFirst() then + exit(true); + end; + + exit(false); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/Installment.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/Installment.Table.al new file mode 100644 index 00000000000..7a667634572 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/Installment.Table.al @@ -0,0 +1,78 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Foundation.PaymentTerms; + +table 7000018 Installment +{ + Caption = 'Installment'; + DrillDownPageID = Installments; + LookupPageID = Installments; + DataClassification = CustomerContent; + + fields + { + field(1; "Payment Terms Code"; Code[10]) + { + Caption = 'Payment Terms Code'; + TableRelation = "Payment Terms"; + } + field(2; "Line No."; Integer) + { + Caption = 'Line No.'; + } + field(3; "% of Total"; Decimal) + { + AutoFormatType = 0; + Caption = '% of Total'; + DecimalPlaces = 2 : 5; + MaxValue = 100; + + trigger OnValidate() + begin + CheckTotalInstallmentPerc(); + end; + } + field(4; "Gap between Installments"; Code[20]) + { + Caption = 'Gap between Installments'; + DateFormula = true; + } + } + + keys + { + key(Key1; "Payment Terms Code", "Line No.") + { + Clustered = true; + } + } + + fieldgroups + { + } + + trigger OnInsert() + begin + CheckTotalInstallmentPerc(); + end; + + var + Text10700: Label 'The total of "% of Total" cannot be greater than 100.'; + + [Scope('OnPrem')] + procedure CheckTotalInstallmentPerc() + var + Installment: Record Installment; + begin + Installment.SetRange("Payment Terms Code", "Payment Terms Code"); + Installment.SetFilter("Line No.", '<>%1', "Line No."); + Installment.CalcSums("% of Total"); + if Installment."% of Total" + "% of Total" > 100 then + Error(Text10700); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/Installments.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/Installments.Page.al new file mode 100644 index 00000000000..54859584647 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/Installments.Page.al @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 7000048 Installments +{ + AutoSplitKey = true; + Caption = 'Installments'; + DataCaptionFields = "Payment Terms Code"; + PageType = List; + SourceTable = Installment; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("% of Total"; Rec."% of Total") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the percentage of the total amount that will be applied to each one of the bills to be created.'; + } + field("Gap between Installments"; Rec."Gap between Installments") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the time interval to be added to the due date of a bill, to obtain the due date of the next.'; + } + } + } + } + + actions + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/InvoiceSplitPayment.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/InvoiceSplitPayment.Codeunit.al new file mode 100644 index 00000000000..465c66c002a --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/InvoiceSplitPayment.Codeunit.al @@ -0,0 +1,824 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.DirectDebit; +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.PaymentTerms; +using Microsoft.Purchases.Document; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Setup; +using Microsoft.Sales.Customer; +using Microsoft.Sales.Document; +using Microsoft.Sales.Receivables; +using Microsoft.Sales.Setup; + +codeunit 7000005 "Invoice-Split Payment" +{ + + trigger OnRun() + begin + end; + + var + PaymentMethod: Record "Payment Method"; + PaymentTerms: Record "Payment Terms"; + GenJnlLine: Record "Gen. Journal Line"; + GenJnlLine2: Record "Gen. Journal Line"; + GLSetup: Record "General Ledger Setup"; + SalesSetup: Record "Sales & Receivables Setup"; + PurchSetup: Record "Purchases & Payables Setup"; + Currency: Record Currency; + CurrencyExchRate: Record "Currency Exchange Rate"; + Installment: Record Installment; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + DueDateAdjust: Codeunit "Due Date-Adjust"; + CurrencyFactor: Decimal; + VATAmountLCY: Decimal; + TotalAmount: Decimal; + TotalAmountLCY: Decimal; + RemainingAmount: Decimal; + RemainingAmountLCY: Decimal; + NextDueDate: Date; + CurrDocNo: Integer; + TotalPerc: Decimal; + ExistsVATNoReal: Boolean; + ErrorMessage: Boolean; + Text001: Label 'Sales %1 no. %2 cannot be posted, because the due date field for one or more installments is more than the legal limit of %3 days after the document date %4 for the original document.'; + Text002: Label 'Purchase %1 no. %2 cannot be posted, because the due date field for one or more installments is more than the legal limit of %3 days after the document date %4 for the original document.'; + Text1100000: Label 'You cannot select a bill-based %1 for a Credit memo.'; + Text1100001: Label '%1 must be 1 if %2 is True in %3'; + Text1100002: Label 'Transfer of Invoice %1 into bills'; + Text1100003: Label 'Unrealized VAT Type must be "Percentage" in VAT Posting Setup.'; + Text1100004: Label 'Bill %1/%2'; + Text1100005: Label 'The sum of %1 cannot be greater then 100 in the installments for %2 %3.'; + + procedure SplitSalesInv(var SalesHeader: Record "Sales Header"; var CustLedgEntry: Record "Cust. Ledger Entry"; var Window: Dialog; SourceCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; VATAmount: Decimal; HideProgressWindow: Boolean) + var + VATPostingSetup: Record "VAT Posting Setup"; + SepaDirectDebitMandate: Record "SEPA Direct Debit Mandate"; + BillNo: Integer; + IsHandled: Boolean; + begin + if not PaymentMethod.Get(SalesHeader."Payment Method Code") then + exit; + if (not PaymentMethod."Create Bills") and (not PaymentMethod."Invoices to Cartera") then + exit; + IsHandled := false; + OnSplitSalesInvOnBeforeCheckPaymentMethod(SalesHeader, PaymentMethod, PaymentTerms, IsHandled); + if not IsHandled then + if PaymentMethod."Create Bills" and (SalesHeader."Document Type" = SalesHeader."Document Type"::"Credit Memo") then + Error(Text1100000, SalesHeader.FieldCaption("Payment Method Code")); + + if SalesHeader."Currency Code" = '' then + CurrencyFactor := 1 + else + CurrencyFactor := SalesHeader."Currency Factor"; + + GLSetup.Get(); + SalesSetup.GetRecordOnce(); + SalesHeader.TestField("Payment Terms Code"); + PaymentTerms.Get(SalesHeader."Payment Terms Code"); + PaymentTerms.CalcFields("No. of Installments"); + if PaymentTerms."No. of Installments" = 0 then + PaymentTerms."No. of Installments" := 1; + IsHandled := false; + OnSplitSalesInvOnBeforeCheckPaymentMethod(SalesHeader, PaymentMethod, PaymentTerms, IsHandled); + if not IsHandled then + if PaymentMethod."Invoices to Cartera" and (PaymentTerms."No. of Installments" > 1) then + Error( + Text1100001, + PaymentTerms.FieldCaption("No. of Installments"), + PaymentMethod.FieldCaption("Invoices to Cartera"), + PaymentMethod.TableCaption()); + CustLedgEntry.Find('+'); + CustLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + if CustLedgEntry."Remaining Amount" = 0 then + exit; + + TotalAmount := CustLedgEntry."Remaining Amount"; + TotalAmountLCY := CustLedgEntry."Remaining Amt. (LCY)"; + RemainingAmount := TotalAmount; + RemainingAmountLCY := TotalAmountLCY; + // close invoice entry + if PaymentMethod."Create Bills" then begin + GenJnlLine.Init(); + GenJnlLine."Posting Date" := SalesHeader."Posting Date"; + GenJnlLine."Document Date" := SalesHeader."Document Date"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Customer); + GenJnlLine.Validate("Account No.", SalesHeader."Bill-to Customer No."); + GenJnlLine."Document Type" := GenJnlLine."Document Type"::" "; + GenJnlLine."Document No." := GenJnlLineDocNo; + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, GenJnlLineDocNo), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine."Shortcut Dimension 1 Code" := SalesHeader."Shortcut Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := SalesHeader."Shortcut Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := SalesHeader."Dimension Set ID"; + GenJnlLine."Direct Debit Mandate ID" := SalesHeader."Direct Debit Mandate ID"; + GenJnlLine."Reason Code" := SalesHeader."Reason Code"; + GenJnlLine."External Document No." := GenJnlLineExtDocNo; + GenJnlLine.Validate("Currency Code", SalesHeader."Currency Code"); + GenJnlLine.Amount := -TotalAmount; + GenJnlLine."Amount (LCY)" := -TotalAmountLCY; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."On Hold" := SalesHeader."On Hold"; + GenJnlLine."Applies-to Doc. Type" := GenJnlLine."Applies-to Doc. Type"::Invoice; + GenJnlLine."Applies-to Doc. No." := GenJnlLineDocNo; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."Currency Factor" := CurrencyFactor; + GenJnlLine."Payment Terms Code" := SalesHeader."Payment Terms Code"; + GenJnlLine."Payment Method Code" := SalesHeader."Payment Method Code"; + if SepaDirectDebitMandate.Get(SalesHeader."Direct Debit Mandate ID") then + GenJnlLine."Recipient Bank Account" := SepaDirectDebitMandate."Customer Bank Account Code" + else + GenJnlLine."Recipient Bank Account" := SalesHeader."Cust. Bank Acc. Code"; + GenJnlLine."Salespers./Purch. Code" := SalesHeader."Salesperson Code"; + + if GLSetup."Unrealized VAT" then begin + FindCustVATSetup(VATPostingSetup, SalesHeader); + if ErrorMessage then + Error(Text1100003); + end; + + OnBeforeSplitSalesInvCloseEntry(GenJnlLine, SalesHeader); + + if GLSetup."Unrealized VAT" and ExistsVATNoReal then + GenJnlLine2.Copy(GenJnlLine) + else + GenJnlPostLine.Run(GenJnlLine); + end; + // create bills + if SalesHeader."Currency Code" = '' then begin + Currency."Invoice Rounding Precision" := GLSetup."Inv. Rounding Precision (LCY)"; + Currency."Invoice Rounding Type" := GLSetup."Inv. Rounding Type (LCY)"; + Currency."Amount Rounding Precision" := GLSetup."Amount Rounding Precision"; + if SalesSetup."Invoice Rounding" then + GLSetup.TestField("Inv. Rounding Precision (LCY)") + else + GLSetup.TestField("Amount Rounding Precision"); + end else begin + Currency.Get(SalesHeader."Currency Code"); + if SalesSetup."Invoice Rounding" then + Currency.TestField("Invoice Rounding Precision") + else + Currency.TestField("Amount Rounding Precision"); + end; + TotalAmount := RoundReceivableAmt(TotalAmount); + + VATAmountLCY := RoundReceivableAmtLCY(VATAmount / CurrencyFactor); + + if PaymentTerms."No. of Installments" > 0 then begin + Installment.SetRange("Payment Terms Code", PaymentTerms.Code); + if Installment.Find('-') then; + end; + + NextDueDate := SalesHeader."Due Date"; + + GenJnlLine.Init(); + GenJnlLine."Posting Date" := SalesHeader."Posting Date"; + GenJnlLine."Document Date" := SalesHeader."Document Date"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Customer); + GenJnlLine.Validate("Account No.", SalesHeader."Bill-to Customer No."); + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Bill; + GenJnlLine."Document No." := GenJnlLineDocNo; + GenJnlLine."Shortcut Dimension 1 Code" := SalesHeader."Shortcut Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := SalesHeader."Shortcut Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := SalesHeader."Dimension Set ID"; + GenJnlLine."Direct Debit Mandate ID" := SalesHeader."Direct Debit Mandate ID"; + GenJnlLine."Reason Code" := SalesHeader."Reason Code"; + GenJnlLine."External Document No." := GenJnlLineExtDocNo; + GenJnlLine.Validate("Currency Code", SalesHeader."Currency Code"); + GenJnlLine."System-Created Entry" := true; + GenJnlLine."On Hold" := SalesHeader."On Hold"; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."Currency Factor" := CurrencyFactor; + GenJnlLine."Payment Terms Code" := SalesHeader."Payment Terms Code"; + GenJnlLine."Payment Method Code" := SalesHeader."Payment Method Code"; + if SepaDirectDebitMandate.Get(SalesHeader."Direct Debit Mandate ID") then + GenJnlLine."Recipient Bank Account" := SepaDirectDebitMandate."Customer Bank Account Code" + else + GenJnlLine."Recipient Bank Account" := SalesHeader."Cust. Bank Acc. Code"; + GenJnlLine."Salespers./Purch. Code" := SalesHeader."Salesperson Code"; + + CurrDocNo := 1; + repeat + GenJnlLine."Due Date" := NextDueDate; + CheckSalesDueDate(SalesHeader, GenJnlLine."Due Date", PaymentTerms."Max. No. of Days till Due Date"); + if not SalesHeader."Due Date Modified" then + DueDateAdjust.SalesAdjustDueDate( + GenJnlLine."Due Date", SalesHeader."Document Date", PaymentTerms.CalculateMaxDueDate(SalesHeader."Document Date"), SalesHeader."Bill-to Customer No."); + NextDueDate := GenJnlLine."Due Date"; + if CurrDocNo < PaymentTerms."No. of Installments" then begin + Installment.TestField("% of Total"); + if CurrDocNo = 1 then begin + TotalPerc := Installment."% of Total"; + case PaymentTerms."VAT distribution" of + PaymentTerms."VAT distribution"::"First Installment": + begin + GenJnlLine.Amount := RoundReceivableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100 + VATAmount); + GenJnlLine."Amount (LCY)" := + RoundReceivableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + PaymentTerms."VAT distribution"::"Last Installment": + begin + GenJnlLine.Amount := RoundReceivableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100); + GenJnlLine."Amount (LCY)" := + RoundReceivableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + PaymentTerms."VAT distribution"::Proportional: + begin + GenJnlLine.Amount := RoundReceivableAmt(TotalAmount * Installment."% of Total" / 100); + GenJnlLine."Amount (LCY)" := + RoundReceivableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + end; + end else begin + TotalPerc := TotalPerc + Installment."% of Total"; + if TotalPerc >= 100 then + Error( + Text1100005, + Installment.FieldCaption("% of Total"), + PaymentTerms.TableCaption(), + PaymentTerms.Code); + case PaymentTerms."VAT distribution" of + PaymentTerms."VAT distribution"::"First Installment", + PaymentTerms."VAT distribution"::"Last Installment": + begin + GenJnlLine.Amount := RoundReceivableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100); + GenJnlLine."Amount (LCY)" := + RoundReceivableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + PaymentTerms."VAT distribution"::Proportional: + begin + GenJnlLine.Amount := RoundReceivableAmt(TotalAmount * Installment."% of Total" / 100); + GenJnlLine."Amount (LCY)" := + RoundReceivableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + end; + end; + RemainingAmount := RemainingAmount - GenJnlLine.Amount; + RemainingAmountLCY := RemainingAmountLCY - GenJnlLine."Amount (LCY)"; + OnAfterSplitSalesInvCalculateAmounts(GenJnlLine, SalesHeader, RemainingAmount, RemainingAmountLCY, Installment, CurrDocNo, PaymentTerms); + Installment.TestField("Gap between Installments"); + NextDueDate := CalculateDate(Installment."Gap between Installments", NextDueDate); + Installment.Next(); + end else begin + GenJnlLine.Amount := RemainingAmount; + GenJnlLine."Amount (LCY)" := RemainingAmountLCY; + end; + + OnBeforeSplitSalesInvCreateBills(GenJnlLine, SalesHeader, Installment, CurrDocNo, PaymentTerms, RemainingAmount, RemainingAmountLCY); + + if PaymentMethod."Create Bills" and ((GenJnlLine.Amount <> 0) or (GenJnlLine."Amount (LCY)" <> 0)) then begin + BillNo += 1; + GenJnlLine."Bill No." := Format(BillNo); + GenJnlLine.Description := + CopyStr( + StrSubstNo(Text1100004, GenJnlLineDocNo, BillNo), + 1, + MaxStrLen(GenJnlLine.Description)); + OnSplitSalesInvOnCreateBillsOnBeforePostGenJnlLine(GenJnlLine, SalesHeader); + GenJnlPostLine.Run(GenJnlLine); + end; + CurrDocNo += 1; + until (CurrDocNo > PaymentTerms."No. of Installments") or (RemainingAmount = 0); + + if GLSetup."Unrealized VAT" and ExistsVATNoReal then + GenJnlPostLine.Run(GenJnlLine2); + end; + + procedure SplitPurchInv(var PurchHeader: Record "Purchase Header"; var VendLedgEntry: Record "Vendor Ledger Entry"; var Window: Dialog; SourceCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; VATAmount: Decimal) + var + VATPostingSetup: Record "VAT Posting Setup"; + BillNo: Integer; + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeSplitPurchInv(PurchHeader, VendLedgEntry, IsHandled); + if IsHandled then + exit; + + if not PaymentMethod.Get(PurchHeader."Payment Method Code") then + exit; + if (not PaymentMethod."Create Bills") and (not PaymentMethod."Invoices to Cartera") then + exit; + IsHandled := false; + OnSplitPurchInvOnBeforeCheckPaymentMethod(PurchHeader, PaymentMethod, PaymentTerms, IsHandled); + if not IsHandled then + if PaymentMethod."Create Bills" and (PurchHeader."Document Type" = PurchHeader."Document Type"::"Credit Memo") then + Error( + Text1100000, + PurchHeader.FieldCaption("Payment Method Code")); + + if PurchHeader."Currency Code" = '' then + CurrencyFactor := 1 + else + CurrencyFactor := PurchHeader."Currency Factor"; + + GLSetup.Get(); + PurchSetup.Get(); + PurchHeader.TestField("Payment Terms Code"); + PaymentTerms.Get(PurchHeader."Payment Terms Code"); + PaymentTerms.CalcFields("No. of Installments"); + if PaymentTerms."No. of Installments" = 0 then + PaymentTerms."No. of Installments" := 1; + IsHandled := false; + OnSplitPurchInvOnBeforeCheckPaymentMethod(PurchHeader, PaymentMethod, PaymentTerms, IsHandled); + if not IsHandled then + if PaymentMethod."Invoices to Cartera" and (PaymentTerms."No. of Installments" > 1) then + Error( + Text1100001, + PaymentTerms.FieldCaption("No. of Installments"), + PaymentMethod.FieldCaption("Invoices to Cartera"), + PaymentMethod.TableCaption()); + VendLedgEntry.Find('+'); + VendLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + if VendLedgEntry."Remaining Amount" = 0 then + exit; + TotalAmount := VendLedgEntry."Remaining Amount"; + TotalAmountLCY := VendLedgEntry."Remaining Amt. (LCY)"; + RemainingAmount := VendLedgEntry."Remaining Amount"; + RemainingAmountLCY := VendLedgEntry."Remaining Amt. (LCY)"; + // close invoice entry + if PaymentMethod."Create Bills" then begin + GenJnlLine.Init(); + GenJnlLine."Posting Date" := PurchHeader."Posting Date"; + GenJnlLine."Document Date" := PurchHeader."Document Date"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); + GenJnlLine.Validate("Account No.", PurchHeader."Pay-to Vendor No."); + GenJnlLine."Document Type" := GenJnlLine."Document Type"::" "; + GenJnlLine."Document No." := GenJnlLineDocNo; + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, GenJnlLineDocNo), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine."Shortcut Dimension 1 Code" := PurchHeader."Shortcut Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := PurchHeader."Shortcut Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := PurchHeader."Dimension Set ID"; + GenJnlLine."Reason Code" := PurchHeader."Reason Code"; + GenJnlLine."External Document No." := GenJnlLineExtDocNo; + GenJnlLine.Validate("Currency Code", PurchHeader."Currency Code"); + GenJnlLine."Posting Group" := PurchHeader."Vendor Posting Group"; + GenJnlLine.Amount := -TotalAmount; + GenJnlLine."Amount (LCY)" := -TotalAmountLCY; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."On Hold" := PurchHeader."On Hold"; + GenJnlLine."Applies-to Doc. Type" := GenJnlLine."Applies-to Doc. Type"::Invoice; + GenJnlLine."Applies-to Doc. No." := GenJnlLineDocNo; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."Currency Factor" := CurrencyFactor; + GenJnlLine."Payment Terms Code" := PurchHeader."Payment Terms Code"; + GenJnlLine."Payment Method Code" := PurchHeader."Payment Method Code"; + GenJnlLine."Recipient Bank Account" := PurchHeader."Vendor Bank Acc. Code"; + GenJnlLine."Salespers./Purch. Code" := PurchHeader."Purchaser Code"; + + if GLSetup."Unrealized VAT" then begin + FindVendVATSetup(VATPostingSetup, PurchHeader); + if ErrorMessage then + Error(Text1100003); + end; + + OnBeforeSplitPurchInvCloseEntry(GenJnlLine, PurchHeader); + + if GLSetup."Unrealized VAT" and ExistsVATNoReal then + GenJnlLine2.Copy(GenJnlLine) + else + GenJnlPostLine.Run(GenJnlLine); + end; + // create bills + if PurchHeader."Currency Code" = '' then begin + Currency."Invoice Rounding Precision" := GLSetup."Inv. Rounding Precision (LCY)"; + Currency."Invoice Rounding Type" := GLSetup."Inv. Rounding Type (LCY)"; + Currency."Amount Rounding Precision" := GLSetup."Amount Rounding Precision"; + if PurchSetup."Invoice Rounding" then + GLSetup.TestField("Inv. Rounding Precision (LCY)") + else + GLSetup.TestField("Amount Rounding Precision"); + end else begin + Currency.Get(PurchHeader."Currency Code"); + if SalesSetup."Invoice Rounding" then + Currency.TestField("Invoice Rounding Precision") + else + Currency.TestField("Amount Rounding Precision"); + end; + TotalAmount := RoundPayableAmt(TotalAmount); + + VATAmountLCY := RoundPayableAmtLCY(VATAmount / CurrencyFactor); + + if PaymentTerms."No. of Installments" > 0 then begin + Installment.SetRange("Payment Terms Code", PaymentTerms.Code); + if Installment.Find('-') then; + end; + + NextDueDate := PurchHeader."Due Date"; + + GenJnlLine.Init(); + GenJnlLine."Posting Date" := PurchHeader."Posting Date"; + GenJnlLine."Document Date" := PurchHeader."Document Date"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); + GenJnlLine.Validate("Account No.", PurchHeader."Pay-to Vendor No."); + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Bill; + GenJnlLine."Document No." := GenJnlLineDocNo; + GenJnlLine."Shortcut Dimension 1 Code" := PurchHeader."Shortcut Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := PurchHeader."Shortcut Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := PurchHeader."Dimension Set ID"; + GenJnlLine."Reason Code" := PurchHeader."Reason Code"; + GenJnlLine."External Document No." := GenJnlLineExtDocNo; + GenJnlLine.Validate("Currency Code", PurchHeader."Currency Code"); + GenJnlLine."Posting Group" := PurchHeader."Vendor Posting Group"; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."On Hold" := PurchHeader."On Hold"; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."Currency Factor" := CurrencyFactor; + GenJnlLine."Payment Terms Code" := PurchHeader."Payment Terms Code"; + GenJnlLine."Payment Method Code" := PurchHeader."Payment Method Code"; + GenJnlLine."Recipient Bank Account" := PurchHeader."Vendor Bank Acc. Code"; + GenJnlLine."Salespers./Purch. Code" := PurchHeader."Purchaser Code"; + + CurrDocNo := 1; + repeat + GenJnlLine."Due Date" := NextDueDate; + CheckPurchDueDate(PurchHeader, GenJnlLine."Due Date", PaymentTerms."Max. No. of Days till Due Date"); + if not PurchHeader."Due Date Modified" then + DueDateAdjust.PurchAdjustDueDate( + GenJnlLine."Due Date", PurchHeader."Document Date", PaymentTerms.CalculateMaxDueDate(PurchHeader."Document Date"), PurchHeader."Pay-to Vendor No."); + NextDueDate := GenJnlLine."Due Date"; + if CurrDocNo < PaymentTerms."No. of Installments" then begin + Installment.TestField("% of Total"); + OnBeforeSplitPurchInvCalculateAmounts(GenJnlLine, PurchHeader, TotalAmount, VATAmount, TotalAmountLCY, VATAmountLCY); + if CurrDocNo = 1 then begin + TotalPerc := Installment."% of Total"; + case PaymentTerms."VAT distribution" of + PaymentTerms."VAT distribution"::"First Installment": + begin + GenJnlLine.Amount := RoundPayableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100 + VATAmount); + GenJnlLine."Amount (LCY)" := + RoundPayableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + PaymentTerms."VAT distribution"::"Last Installment": + begin + GenJnlLine.Amount := RoundPayableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100); + GenJnlLine."Amount (LCY)" := + RoundPayableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + PaymentTerms."VAT distribution"::Proportional: + begin + GenJnlLine.Amount := RoundPayableAmt(TotalAmount * Installment."% of Total" / 100); + GenJnlLine."Amount (LCY)" := + RoundPayableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + end; + end else begin + TotalPerc := TotalPerc + Installment."% of Total"; + if TotalPerc >= 100 then + Error( + Text1100005, + Installment.FieldCaption("% of Total"), + PaymentTerms.TableCaption(), + PaymentTerms.Code); + case PaymentTerms."VAT distribution" of + PaymentTerms."VAT distribution"::"First Installment", + PaymentTerms."VAT distribution"::"Last Installment": + begin + GenJnlLine.Amount := RoundPayableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100); + GenJnlLine."Amount (LCY)" := RoundPayableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + PaymentTerms."VAT distribution"::Proportional: + begin + GenJnlLine.Amount := RoundPayableAmt(TotalAmount * Installment."% of Total" / 100); + GenJnlLine."Amount (LCY)" := RoundPayableAmtLCY( + CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); + end; + end; + end; + RemainingAmount := RemainingAmount - GenJnlLine.Amount; + RemainingAmountLCY := RemainingAmountLCY - GenJnlLine."Amount (LCY)"; + OnAfterSplitPurchInvCalculateAmounts(GenJnlLine, PurchHeader, RemainingAmount, RemainingAmountLCY); + Installment.TestField("Gap between Installments"); + NextDueDate := CalculateDate(Installment."Gap between Installments", NextDueDate); + Installment.Next(); + end else begin + GenJnlLine.Amount := RemainingAmount; + GenJnlLine."Amount (LCY)" := RemainingAmountLCY; + end; + + OnBeforeSplitPurchInvCreateBills(GenJnlLine, PurchHeader, Installment, CurrDocNo, PaymentTerms, RemainingAmount, RemainingAmountLCY); + + if PaymentMethod."Create Bills" and ((GenJnlLine.Amount <> 0) or (GenJnlLine."Amount (LCY)" <> 0)) then begin + BillNo += 1; + GenJnlLine."Bill No." := Format(BillNo); + GenJnlLine.Description := + CopyStr( + StrSubstNo(Text1100004, GenJnlLineDocNo, BillNo), + 1, + MaxStrLen(GenJnlLine.Description)); + OnSplitPurchInvOnCreateBillsOnBeforePostGenJnlLine(GenJnlLine, PurchHeader); + GenJnlPostLine.Run(GenJnlLine); + end; + CurrDocNo += 1; + until (CurrDocNo > PaymentTerms."No. of Installments") or (RemainingAmount = 0); + + if GLSetup."Unrealized VAT" and ExistsVATNoReal then + GenJnlPostLine.Run(GenJnlLine2); + end; + + procedure RoundReceivableAmt(Amount: Decimal): Decimal + begin + SalesSetup.GetRecordOnce(); + if SalesSetup."Invoice Rounding" then + Amount := Round(Amount, Currency."Invoice Rounding Precision", SelectStr(Currency."Invoice Rounding Type" + 1, '=,>,<')) + else + Amount := Round(Amount, Currency."Amount Rounding Precision"); + + exit(Amount); + end; + + procedure RoundReceivableAmtLCY(Amount: Decimal): Decimal + begin + GLSetup.GetRecordOnce(); + SalesSetup.GetRecordOnce(); + if SalesSetup."Invoice Rounding" then + Amount := Round(Amount, GLSetup."Inv. Rounding Precision (LCY)", SelectStr(GLSetup."Inv. Rounding Type (LCY)" + 1, '=,>,<')) + else + Amount := Round(Amount, GLSetup."Amount Rounding Precision"); + + exit(Amount); + end; + + procedure RoundPayableAmt(Amount: Decimal): Decimal + begin + SalesSetup.GetRecordOnce(); + if SalesSetup."Invoice Rounding" then + Amount := Round(Amount, Currency."Invoice Rounding Precision", SelectStr(Currency."Invoice Rounding Type" + 1, '=,>,<')) + else + Amount := Round(Amount, Currency."Amount Rounding Precision"); + + exit(Amount); + end; + + procedure RoundPayableAmtLCY(Amount: Decimal): Decimal + begin + SalesSetup.GetRecordOnce(); + if SalesSetup."Invoice Rounding" then + Amount := Round(Amount, GLSetup."Inv. Rounding Precision (LCY)", SelectStr(GLSetup."Inv. Rounding Type (LCY)" + 1, '=,>,<')) + else + Amount := Round(Amount, GLSetup."Amount Rounding Precision"); + + exit(Amount); + end; + + procedure FindCustVATSetup(var VATSetup: Record "VAT Posting Setup"; SalesHeader2: Record "Sales Header") + var + Customer: Record Customer; + SalesLine2: Record "Sales Line"; + PostingGroup: Code[20]; + begin + Customer.Get(SalesHeader2."Bill-to Customer No."); + + VATSetup.SetCurrentKey("VAT Bus. Posting Group", "VAT Prod. Posting Group"); + VATSetup.SetRange("VAT Bus. Posting Group", Customer."VAT Bus. Posting Group"); + + SalesLine2.SetCurrentKey("Document Type", "Document No.", "Line No."); + SalesLine2.SetRange("Document Type", SalesHeader2."Document Type"); + SalesLine2.SetRange("Document No.", SalesHeader2."No."); + SalesLine2.Find('-'); + + repeat + case SalesLine2.Type of + SalesLine2.Type::Item: + begin + PostingGroup := SalesLine2."VAT Prod. Posting Group"; + VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); + if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then + if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then + ErrorMessage := true + else + ExistsVATNoReal := true; + end; + SalesLine2.Type::Resource: + begin + PostingGroup := SalesLine2."VAT Prod. Posting Group"; + VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); + if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then + if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then + ErrorMessage := true + else + ExistsVATNoReal := true; + end; + SalesLine2.Type::"G/L Account": + begin + PostingGroup := SalesLine2."VAT Prod. Posting Group"; + VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); + if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then + if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then + ErrorMessage := true + else + ExistsVATNoReal := true; + end; + end; + until SalesLine2.Next() = 0; + end; + + procedure FindVendVATSetup(var VATSetup: Record "VAT Posting Setup"; PurchHeader2: Record "Purchase Header") + var + PurchLine2: Record "Purchase Line"; + PostingGroup: Code[20]; + begin + VATSetup.SetCurrentKey("VAT Bus. Posting Group", "VAT Prod. Posting Group"); + VATSetup.SetRange("VAT Bus. Posting Group", PurchHeader2."VAT Bus. Posting Group"); + + PurchLine2.SetCurrentKey("Document Type", "Document No.", "Line No."); + PurchLine2.SetRange("Document Type", PurchHeader2."Document Type"); + PurchLine2.SetRange("Document No.", PurchHeader2."No."); + PurchLine2.Find('-'); + + repeat + case PurchLine2.Type of + PurchLine2.Type::Item: + begin + PostingGroup := PurchLine2."VAT Prod. Posting Group"; + VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); + if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then + if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then + ErrorMessage := true + else + ExistsVATNoReal := true; + end; + PurchLine2.Type::"G/L Account": + begin + PostingGroup := PurchLine2."VAT Prod. Posting Group"; + VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); + if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then + if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then + ErrorMessage := true + else + ExistsVATNoReal := true; + end; + end; + until PurchLine2.Next() = 0; + end; + +#if not CLEAN27 + [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] + procedure SplitServiceInv(var ServiceHeader: Record Microsoft.Service.Document."Service Header"; var CustLedgEntry: Record "Cust. Ledger Entry"; var Window: Dialog; SourceCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; VATAmount: Decimal) + var + ServInvoiceSplitPayment: Codeunit "Serv. Invoice-Split Payment"; + begin + ServInvoiceSplitPayment.SplitServiceInvoice(ServiceHeader, CustLedgEntry, Window, SourceCode, GenJnlLineExtDocNo, GenJnlLineDocNo, VATAmount); + end; +#endif + +#if not CLEAN27 + [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] + procedure FindCustVATSetupServ(var VATSetup: Record "VAT Posting Setup"; ServiceHeader2: Record Microsoft.Service.Document."Service Header") + var + ServInvoiceSplitPayment: Codeunit "Serv. Invoice-Split Payment"; + begin + ServInvoiceSplitPayment.FindCustVATSetupServ(VATSetup, ServiceHeader2, ErrorMessage, ExistsVATNoReal); + end; +#endif + + procedure CalculateDate(DateFormulaText: Code[20]; DueDate: Date): Date + var + DateFormula: DateFormula; + begin + Evaluate(DateFormula, DateFormulaText); + exit(CalcDate(DateFormula, DueDate)); + end; + + procedure CheckDueDate(NewDueDate: Date; InitialDocumentDate: Date; MaxNoOfDays: Integer): Boolean + var + MaxAllowedDueDate: Date; + begin + if MaxNoOfDays > 0 then begin + MaxAllowedDueDate := InitialDocumentDate + MaxNoOfDays; + exit(NewDueDate <= MaxAllowedDueDate); + end; + + exit(true); + end; + + local procedure CheckSalesDueDate(SalesHeader: Record "Sales Header"; NewDueDate: Date; MaxNoOfDays: Integer) + begin + if not CheckDueDate(NewDueDate, SalesHeader."Document Date", MaxNoOfDays) then + Error(Text001, SalesHeader."Document Type", SalesHeader."No.", MaxNoOfDays, SalesHeader."Document Date"); + end; + + local procedure CheckPurchDueDate(PurchaseHeader: Record "Purchase Header"; NewDueDate: Date; MaxNoOfDays: Integer) + begin + if not CheckDueDate(NewDueDate, PurchaseHeader."Document Date", MaxNoOfDays) then + Error(Text002, PurchaseHeader."Document Type", PurchaseHeader."No.", MaxNoOfDays, PurchaseHeader."Document Date"); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSplitSalesInvCalculateAmounts(var GenJournalLine: Record "Gen. Journal Line"; var SalesHeader: Record "Sales Header"; var RemainingAmount: Decimal; var RemainingAmountLCY: Decimal; Installment: Record Installment; CurrDocNo: Integer; PaymentTerms: Record "Payment Terms") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterSplitPurchInvCalculateAmounts(var GenJournalLine: Record "Gen. Journal Line"; var PurchaseHeader: Record "Purchase Header"; var RemainingAmount: Decimal; var RemainingAmountLCY: Decimal) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeSplitSalesInvCloseEntry(var GenJournalLine: Record "Gen. Journal Line"; SalesHeader: Record "Sales Header") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeSplitSalesInvCreateBills(var GenJournalLine: Record "Gen. Journal Line"; SalesHeader: Record "Sales Header"; Installment: Record Installment; CurrDocNo: Integer; PaymentTerms: Record "Payment Terms"; RemainingAmount: Decimal; RemainingAmountLCY: Decimal) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeSplitPurchInvCalculateAmounts(var GenJournalLine: Record "Gen. Journal Line"; var PurchaseHeader: Record "Purchase Header"; var TotalAmount: Decimal; var VATAmount: Decimal; var TotalAmountLCY: Decimal; var VATAmountLCY: Decimal) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeSplitPurchInvCloseEntry(var GenJournalLine: Record "Gen. Journal Line"; PurchaseHeader: Record "Purchase Header") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeSplitPurchInvCreateBills(var GenJournalLine: Record "Gen. Journal Line"; PurchaseHeader: Record "Purchase Header"; Installment: Record Installment; CurrDocNo: Integer; PaymentTerms: Record "Payment Terms"; RemainingAmount: Decimal; RemainingAmountLCY: Decimal) + begin + end; + +#if not CLEAN27 + internal procedure RunOnBeforeSplitServInvCloseEntry(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") + begin + OnBeforeSplitServInvCloseEntry(GenJournalLine, ServiceHeader); + end; + + [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] + [IntegrationEvent(false, false)] + local procedure OnBeforeSplitServInvCloseEntry(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") + begin + end; +#endif + +#if not CLEAN27 + internal procedure RunOnBeforeSplitServInvCreateBills(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") + begin + OnBeforeSplitServInvCreateBills(GenJournalLine, ServiceHeader); + end; + + [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] + [IntegrationEvent(false, false)] + local procedure OnBeforeSplitServInvCreateBills(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") + begin + end; +#endif + + [IntegrationEvent(false, false)] + local procedure OnSplitPurchInvOnBeforeCheckPaymentMethod(var PurchHeader: Record "Purchase Header"; var PaymentMethod: Record "Payment Method"; var PaymentTerms: Record "Payment Terms"; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSplitSalesInvOnBeforeCheckPaymentMethod(var SalesHeader: Record "Sales Header"; var PaymentMethod: Record "Payment Method"; var PaymentTerms: Record "Payment Terms"; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSplitSalesInvOnCreateBillsOnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var SalesHeader: Record "Sales Header") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnSplitPurchInvOnCreateBillsOnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; PurchaseHeader: Record "Purchase Header") + begin + end; + +#if not CLEAN27 + internal procedure RunOnSplitServiceInvOnCreateBillsOnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") + begin + OnSplitServiceInvOnCreateBillsOnBeforePostGenJnlLine(GenJournalLine, ServiceHeader); + end; + + [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] + [IntegrationEvent(false, false)] + local procedure OnSplitServiceInvOnCreateBillsOnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") + begin + end; +#endif + + [IntegrationEvent(false, false)] + local procedure OnBeforeSplitPurchInv(var PurchHeader: Record "Purchase Header"; var VendLedgEntry: Record "Vendor Ledger Entry"; var IsHandled: Boolean) + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/NonPaymentPeriod.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/NonPaymentPeriod.Table.al new file mode 100644 index 00000000000..aece2e8d8cb --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/NonPaymentPeriod.Table.al @@ -0,0 +1,55 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +table 10702 "Non-Payment Period" +{ + Caption = 'Non-Payment Period'; + DrillDownPageID = "Non-Payment Periods"; + LookupPageID = "Non-Payment Periods"; + DataClassification = CustomerContent; + + fields + { + field(1; "Table Name"; Option) + { + Caption = 'Table Name'; + OptionCaption = 'Company Information,Customer,Vendor'; + OptionMembers = "Company Information",Customer,Vendor; + } + field(2; "Code"; Code[20]) + { + Caption = 'Code'; + NotBlank = true; + } + field(3; "From Date"; Date) + { + Caption = 'From Date'; + NotBlank = true; + } + field(4; "To Date"; Date) + { + Caption = 'To Date'; + NotBlank = true; + } + field(5; Description; Text[30]) + { + Caption = 'Description'; + } + } + + keys + { + key(Key1; "Table Name", "Code", "From Date") + { + Clustered = true; + } + } + + fieldgroups + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/NonPaymentPeriods.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/NonPaymentPeriods.Page.al new file mode 100644 index 00000000000..bfa25d3f560 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/NonPaymentPeriods.Page.al @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 10701 "Non-Payment Periods" +{ + Caption = 'Non-Payment Periods'; + DataCaptionFields = "Code"; + PageType = List; + SourceTable = "Non-Payment Period"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("From Date"; Rec."From Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the start date of the non-payment period.'; + } + field("To Date"; Rec."To Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the end date of the non-payment period.'; + } + field(Description; Rec.Description) + { + ApplicationArea = All; + ToolTip = 'Specifies a description of the non-payment period.'; + } + } + } + } + + actions + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/OperationFee.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/OperationFee.Table.al new file mode 100644 index 00000000000..a14973f4eb2 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/OperationFee.Table.al @@ -0,0 +1,78 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; + +table 7000010 "Operation Fee" +{ + Caption = 'Operation Fee'; + DataClassification = CustomerContent; + + fields + { + field(1; "Code"; Code[20]) + { + Caption = 'Code'; + NotBlank = true; + } + field(2; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + TableRelation = Currency; + } + field(3; "Type of Fee"; Option) + { + Caption = 'Type of Fee'; + OptionCaption = 'Collection Expenses,Discount Expenses,Discount Interests,Rejection Expenses,Payment Order Expenses,Unrisked Factoring Expenses,Risked Factoring Expenses '; + OptionMembers = "Collection Expenses","Discount Expenses","Discount Interests","Rejection Expenses","Payment Order Expenses","Unrisked Factoring Expenses","Risked Factoring Expenses "; + } + field(7; "Charge Amt. per Operation"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Charge Amt. per Operation'; + } + } + + keys + { + key(Key1; "Code", "Currency Code", "Type of Fee") + { + Clustered = true; + } + key(Key2; "Currency Code", "Code") + { + } + } + + fieldgroups + { + } + + trigger OnDelete() + begin + FeeRange.SetRange(Code, Code); + FeeRange.SetRange("Currency Code", "Currency Code"); + FeeRange.SetRange("Type of Fee", "Type of Fee"); + FeeRange.DeleteAll(); + end; + + var + Text1100000: Label 'untitled'; + FeeRange: Record "Fee Range"; + + procedure Caption(): Text + var + BankAcc: Record "Bank Account"; + begin + if Code = '' then + exit(Text1100000); + BankAcc.Get(Code); + exit(StrSubstNo('%1 %2 %3', BankAcc."No.", BankAcc.Name, "Currency Code")); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/OperationFees.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/OperationFees.Page.al new file mode 100644 index 00000000000..4fd36e4564b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/OperationFees.Page.al @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 7000026 "Operation Fees" +{ + Caption = 'Operation Fees'; + DataCaptionExpression = Rec.Caption(); + DataCaptionFields = "Currency Code"; + PageType = List; + SourceTable = "Operation Fee"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Type of Fee"; Rec."Type of Fee") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of operation for which the commission is being charged.'; + } + field("Charge Amt. per Operation"; Rec."Charge Amt. per Operation") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount of commission charged for each type of commission-based operation.'; + } + } + } + } + + actions + { + area(navigation) + { + group("&Fee") + { + Caption = '&Fee'; + Image = Costs; + action("&Fee Ranges") + { + ApplicationArea = Basic, Suite; + Caption = '&Fee Ranges'; + Image = Ranges; + RunObject = Page "Fee Ranges"; + RunPageLink = Code = field(Code), + "Currency Code" = field("Currency Code"), + "Type of Fee" = field("Type of Fee"); + ToolTip = 'View itemized bank charges for document management. There are seven different types of operations in the Cartera module: receivables management, discount management, discount interests, management of outstanding debt, payment orders management, factoring without risk management, and factoring with risk management.'; + } + } + } + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PaymentDay.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PaymentDay.Table.al new file mode 100644 index 00000000000..d6fe2ea7749 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PaymentDay.Table.al @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +table 10701 "Payment Day" +{ + Caption = 'Payment Day'; + DrillDownPageID = "Payment Days"; + LookupPageID = "Payment Days"; + DataClassification = CustomerContent; + + fields + { + field(1; "Table Name"; Option) + { + Caption = 'Table Name'; + OptionCaption = 'Company Information,Customer,Vendor'; + OptionMembers = "Company Information",Customer,Vendor; + } + field(2; "Code"; Code[20]) + { + Caption = 'Code'; + NotBlank = true; + } + field(3; "Day of the month"; Integer) + { + Caption = 'Day of the month'; + MaxValue = 31; + MinValue = 1; + } + } + + keys + { + key(Key1; "Table Name", "Code", "Day of the month") + { + Clustered = true; + } + } + + fieldgroups + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PaymentDays.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PaymentDays.Page.al new file mode 100644 index 00000000000..4f8e6ed271e --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PaymentDays.Page.al @@ -0,0 +1,34 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 10700 "Payment Days" +{ + Caption = 'Payment Days'; + DataCaptionFields = "Code"; + PageType = List; + SourceTable = "Payment Day"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Day of the month"; Rec."Day of the month") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment day established for the client, vendor, or the company.'; + } + } + } + } + + actions + { + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedBills.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedBills.Page.al new file mode 100644 index 00000000000..8936c4565e2 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedBills.Page.al @@ -0,0 +1,610 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.Navigate; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +page 7000067 "Posted Bills" +{ + Caption = 'Posted Bills'; + DataCaptionExpression = Rec.Caption(); + DataCaptionFields = Type; + DeleteAllowed = false; + InsertAllowed = false; + PageType = Worksheet; + SaveValues = true; + SourceTable = "Posted Cartera Doc."; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(ClasFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + Editable = ClasFilterEditable; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + field(StatusFilter; StatusFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Status Filter'; + Editable = StatusFilterEditable; + ToolTip = 'Specifies a filter for the status of bills that will be included.'; + + trigger OnValidate() + begin + StatusFilterOnAfterValidate(); + end; + } + } + repeater(Control1) + { + ShowCaption = false; + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of the document in a posted bill group/payment order, from which this document was generated.'; + } + field("No."; Rec."No.") + { + ApplicationArea = All; + Editable = false; + ToolTip = 'Specifies the number of a bill in a posted bill group/payment order.'; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this document in a posted bill group/payment order.'; + } + field(Status; Rec.Status) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status of this document in a posted bill group/payment order.'; + } + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the description associated with this posted document.'; + } + field("Amt. for Collection (LCY)"; Rec."Amt. for Collection (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the amount due for this document in a posted bill group/payment order.'; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending amount in order for this document, in a posted bill group/payment order, to be settled in full.'; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the payment method code for the document number.'; + Visible = false; + } + field(Accepted; Rec.Accepted) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the Acceptance status required for this bill in a posted bill group.'; + } + field("Collection Agent"; Rec."Collection Agent") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the agent to which this document in a posted bill group/payment order was sent.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number or code of the bank to which the bill group/payment order was delivered.'; + } + field("Bill Gr./Pmt. Order No."; Rec."Bill Gr./Pmt. Order No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number assigned to this document in a bill group/payment order.'; + } + field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the date when this document in a posted bill group/payment order is settled or rejected.'; + } + field(Redrawn; Rec.Redrawn) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies a check mark to indicate that the bill has been redrawn since it was rejected when its due date arrived.'; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + } + field("Category Code"; Rec."Category Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a filter for the categories for which documents are shown.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the account type associated with this document in a posted bill group/payment order.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the ledger entry number associated with this posted document.'; + } + } + group(Control49) + { + ShowCaption = false; + field("TotalCurrAmt "; TotalCurrAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Total Remaining Amt. (LCY)'; + Editable = false; + ToolTip = 'Specifies the sum of amounts that remain to be paid.'; + } + } + } + } + + actions + { + area(navigation) + { + group(Bill) + { + Caption = '&Bill'; + Image = Voucher; + action(Dimensions) + { + ApplicationArea = Basic, Suite; + Caption = 'Dime&nsions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + separator(Action1100001) + { + } + action(BGPO) + { + ApplicationArea = Basic, Suite; + Caption = 'B&G/PO'; + Image = VoucherGroup; + ToolTip = 'View related bill groups or payment orders.'; + + trigger OnAction() + var + SalesPostedGroup: Record "Posted Bill Group"; + PurchasePostedGroup: Record "Posted Payment Order"; + begin + if Rec.Type = Rec.Type::Receivable then begin + SalesPostedGroup.SetRange("No.", Rec."Bill Gr./Pmt. Order No."); + PAGE.Run(PAGE::"Posted Bill Groups", SalesPostedGroup) + end else begin + PurchasePostedGroup.SetRange("No.", Rec."Bill Gr./Pmt. Order No."); + PAGE.Run(PAGE::"Posted Payment Orders", PurchasePostedGroup); + end; + end; + } + separator(Action43) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + + trigger OnAction() + begin + PAGE.RunModal(PAGE::"Posted Bills Analysis", Rec); + end; + } + action(Maturity) + { + ApplicationArea = Basic, Suite; + Caption = 'Maturity'; + Image = Aging; + ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; + + trigger OnAction() + begin + if Rec.Type = Rec.Type::Receivable then + PAGE.RunModal(PAGE::"Posted Receiv. Bills Maturity") + else + PAGE.RunModal(PAGE::"Posted Payable Bills Maturity"); + end; + } + } + } + area(processing) + { + group(Functions) + { + Caption = 'F&unctions'; + Image = "Action"; + action(Categorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Categorize'; + Ellipsis = true; + Image = Category; + ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(PostedDoc); + CarteraManagement.CategorizePostedDocs(PostedDoc); + end; + } + action(Decategorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Decategorize'; + Image = UndoCategory; + ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(PostedDoc); + CarteraManagement.DecategorizePostedDocs(PostedDoc); + end; + } + separator(Action37) + { + } + action(Settle) + { + ApplicationArea = Basic, Suite; + Caption = 'Settle'; + Image = SettleOpenTransactions; + ToolTip = 'Fully settle documents included in the posted bill group.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(PostedDoc); + if not PostedDoc.Find('=><') then + exit; + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + if not PostedDoc.Find('-') then + Error( + Text1100000 + + Text1100001); + + if PostedDoc.Type = PostedDoc.Type::Receivable then + REPORT.RunModal(REPORT::"Settle Docs. in Post. Bill Gr.", true, false, PostedDoc) + else + REPORT.RunModal(REPORT::"Settle Docs. in Posted PO", true, false, PostedDoc); + end; + } + action(Reject) + { + ApplicationArea = Basic, Suite; + Caption = 'Reject'; + Ellipsis = true; + Image = Reject; + ToolTip = 'Post document rejections.'; + + trigger OnAction() + begin + RejectDocs(); + end; + } + action(Redraw) + { + ApplicationArea = Basic, Suite; + Caption = 'Redraw'; + Image = RefreshVoucher; + ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; + + trigger OnAction() + begin + RedrawDocs(); + end; + } + separator(Action39) + { + } + action(Print) + { + ApplicationArea = Basic, Suite; + Caption = 'Print'; + Ellipsis = true; + Image = Print; + ToolTip = 'Print the document.'; + + trigger OnAction() + begin + PrintBillRec(); + end; + } + } + action(Navigate) + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Ellipsis = true; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + Option := StrMenu(Text1100002); + case Option of + 0: + exit; + 1: + CarteraManagement.NavigatePostedDoc(Rec); + 2: + begin + Navigate.SetDoc(Rec."Posting Date", Rec."Bill Gr./Pmt. Order No."); + Navigate.Run(); + end; + end; + end; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(Navigate_Promoted; Navigate) + { + } + } + } + } + + trigger OnAfterGetRecord() + begin + AfterGetCurrentRecord(); + end; + + trigger OnDeleteRecord(): Boolean + begin + UpdateStatistics(); + end; + + trigger OnInit() + begin + StatusFilterEditable := true; + ClasFilterEditable := true; + end; + + trigger OnModifyRecord(): Boolean + begin + CODEUNIT.Run(CODEUNIT::"Posted Cartera Doc.- Edit", Rec); + UpdateStatistics(); + exit(false); + end; + + trigger OnNewRecord(BelowxRec: Boolean) + begin + AfterGetCurrentRecord(); + end; + + trigger OnOpenPage() + begin + UpdateStatistics(); + end; + + var + Text1100000: Label 'No bills have been found that can be settled. \'; + Text1100001: Label 'Please check that at least one open bill was selected.'; + Text1100002: Label 'Related to Bill,Related to Bill Group'; + Text1100003: Label 'Open|Honored|Rejected'; + Text1100004: Label 'Only Receivable Bills can be printed.'; + Text1100005: Label 'Only Receivable Bills can be rejected.'; + Text1100006: Label 'No bills have been found that can be rejected. \'; + Text1100007: Label 'No bills have been found that can be redrawn. \'; + Text1100008: Label 'Please check that at least one rejected or honored bill was selected.'; + Text1100009: Label 'Only bills can be redrawn.'; + PostedDoc: Record "Posted Cartera Doc."; + CustLedgEntry: Record "Cust. Ledger Entry"; + VendLedgEntry: Record "Vendor Ledger Entry"; + Navigate: Page Navigate; + CarteraManagement: Codeunit CarteraManagement; + CategoryFilter: Code[250]; + ActiveFilter: Text[250]; + TotalCurrAmtLCY: Decimal; + StatusFilter: Option Open,Honored,Rejected,All; + Option: Option "0","1","2"; + Call: Boolean; + ClasFilterEditable: Boolean; + StatusFilterEditable: Boolean; + + [Scope('OnPrem')] + procedure UpdateStatistics() + begin + PostedDoc.Reset(); + PostedDoc.SetCurrentKey("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, + "Category Code", Redrawn, "Due Date", "Document Type"); + PostedDoc.CopyFilters(Rec); + PostedDoc.SetRange("Document Type", PostedDoc."Document Type"::Bill); + PostedDoc.SetFilter("Category Code", CategoryFilter); + PostedDoc.CalcSums(PostedDoc."Remaining Amt. (LCY)"); + TotalCurrAmtLCY := PostedDoc."Remaining Amt. (LCY)"; + + ActiveFilter := Rec.GetFilter(Status); + case ActiveFilter of + '': + StatusFilter := StatusFilter::All; + Text1100003: + StatusFilter := StatusFilter::All + else + StatusFilter := Rec.Status.AsInteger(); + end; + + if Call = true then + CategoryFilter := Rec.GetFilter("Category Code"); + end; + + [Scope('OnPrem')] + procedure GetSelect(var NewPostedDoc: Record "Posted Cartera Doc.") + begin + CurrPage.SetSelectionFilter(NewPostedDoc); + end; + + [Scope('OnPrem')] + procedure PrintBillRec() + begin + CurrPage.SetSelectionFilter(PostedDoc); + if not PostedDoc.Find('-') then + exit; + + if PostedDoc.Type <> PostedDoc.Type::Receivable then + Error(Text1100004); + + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(PostedDoc."Entry No."); + CustLedgEntry.Mark(true); + until PostedDoc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + CustLedgEntry.PrintBill(true); + end; + + [Scope('OnPrem')] + procedure RejectDocs() + begin + CurrPage.SetSelectionFilter(PostedDoc); + if not PostedDoc.Find('=><') then + exit; + + if PostedDoc.Type <> PostedDoc.Type::Receivable then + Error(Text1100005); + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + if not PostedDoc.Find('-') then + Error( + Text1100006 + + Text1100001); + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(PostedDoc."Entry No."); + CustLedgEntry.Mark(true); + until PostedDoc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Reject Docs.", true, false, CustLedgEntry); + end; + + [Scope('OnPrem')] + procedure RedrawDocs() + begin + CurrPage.SetSelectionFilter(PostedDoc); + if not PostedDoc.Find('=><') then + exit; + + PostedDoc.SetFilter(Status, '<>%1', PostedDoc.Status::Open); + if not PostedDoc.Find('-') then + Error( + Text1100007 + + Text1100008); + + PostedDoc.SetFilter("Document Type", '<>%1', PostedDoc."Document Type"::Bill); + if PostedDoc.Find('-') then + Error(Text1100009); + PostedDoc.SetRange("Document Type"); + + if Rec.Type = Rec.Type::Receivable then begin + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(PostedDoc."Entry No."); + CustLedgEntry.Mark(true); + until PostedDoc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Redraw Receivable Bills", true, false, CustLedgEntry); + end else begin + VendLedgEntry.Reset(); + repeat + VendLedgEntry.Get(PostedDoc."Entry No."); + VendLedgEntry.Mark(true); + until PostedDoc.Next() = 0; + + VendLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Redraw Payable Bills", true, false, VendLedgEntry); + end; + end; + + [Scope('OnPrem')] + procedure Called() + begin + Call := true; + ClasFilterEditable := false; + StatusFilterEditable := false; + end; + + local procedure CategoryFilterOnAfterValidate() + begin + UpdateStatistics(); + end; + + local procedure StatusFilterOnAfterValidate() + begin + if StatusFilter = StatusFilter::All then + Rec.SetRange(Status) + else + Rec.SetRange(Status, StatusFilter); + UpdateStatistics(); + CurrPage.Update(); + end; + + local procedure AfterGetCurrentRecord() + begin + xRec := Rec; + UpdateStatistics(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDoc.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDoc.Table.al new file mode 100644 index 00000000000..f1d2832b48b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDoc.Table.al @@ -0,0 +1,301 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +table 7000003 "Posted Cartera Doc." +{ + Caption = 'Posted Cartera Doc.'; + DrillDownPageID = "Posted Cartera Documents"; + LookupPageID = "Posted Cartera Documents"; + DataClassification = CustomerContent; + + fields + { + field(1; Type; Enum "Cartera Document Type") + { + Caption = 'Type'; + } + field(2; "Entry No."; Integer) + { + Caption = 'Entry No.'; + } + field(3; "No."; Code[20]) + { + Caption = 'No.'; + } + field(4; "Posting Date"; Date) + { + Caption = 'Posting Date'; + } + field(5; "Document No."; Code[20]) + { + Caption = 'Document No.'; + } + field(6; Description; Text[100]) + { + Caption = 'Description'; + } + field(7; "Bank Account No."; Code[20]) + { + Caption = 'Bank Account No.'; + TableRelation = "Bank Account"; + } + field(8; "Dealing Type"; Enum "Cartera Dealing Type") + { + Caption = 'Dealing Type'; + Editable = false; + } + field(9; "Amount for Collection"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Amount for Collection'; + } + field(10; "Amt. for Collection (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amt. for Collection (LCY)'; + } + field(11; "Due Date"; Date) + { + Caption = 'Due Date'; + } + field(12; "Payment Method Code"; Code[10]) + { + Caption = 'Payment Method Code'; + TableRelation = "Payment Method"; + } + field(13; Accepted; Option) + { + Caption = 'Accepted'; + OptionCaption = 'Not Required,Yes'; + OptionMembers = "Not Required",Yes; + } + field(14; Place; Boolean) + { + Caption = 'Place'; + } + field(15; "Collection Agent"; Option) + { + Caption = 'Collection Agent'; + OptionCaption = 'Direct,Bank'; + OptionMembers = Direct,Bank; + } + field(16; "Bill Gr./Pmt. Order No."; Code[20]) + { + Caption = 'Bill Gr./Pmt. Order No.'; + TableRelation = if (Type = const(Receivable)) "Posted Bill Group"."No." + else + if (Type = const(Payable)) "Posted Payment Order"."No."; + } + field(17; "Category Code"; Code[10]) + { + Caption = 'Category Code'; + TableRelation = "Category Code"; + } + field(18; "Account No."; Code[20]) + { + Caption = 'Account No.'; + TableRelation = if (Type = const(Receivable)) Customer + else + if (Type = const(Payable)) Vendor; + } + field(19; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + TableRelation = Currency; + } + field(20; "Cust./Vendor Bank Acc. Code"; Code[20]) + { + Caption = 'Cust./Vendor Bank Acc. Code'; + TableRelation = "Customer Bank Account".Code where("Customer No." = field("Account No.")); + } +#if not CLEANSCHEMA25 + field(21; "Pmt. Address Code"; Code[10]) + { + Caption = 'Pmt. Address Code'; + TableRelation = "Customer Pmt. Address".Code where("Customer No." = field("Account No.")); + ObsoleteReason = 'Address is taken from the fields Address, City, etc. of Customer/Vendor table.'; + ObsoleteState = Removed; + ObsoleteTag = '25.0'; + } +#endif + field(22; "Global Dimension 1 Code"; Code[20]) + { + CaptionClass = '1,1,1'; + Caption = 'Global Dimension 1 Code'; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(23; "Global Dimension 2 Code"; Code[20]) + { + CaptionClass = '1,1,2'; + Caption = 'Global Dimension 2 Code'; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(24; Status; Enum "Cartera Document Status") + { + Caption = 'Status'; + } + field(25; "Honored/Rejtd. at Date"; Date) + { + Caption = 'Honored/Rejtd. at Date'; + } + field(26; "Remaining Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Remaining Amount'; + } + field(27; "Remaining Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Remaining Amt. (LCY)'; + } + field(28; Redrawn; Boolean) + { + Caption = 'Redrawn'; + } + field(29; "Original Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Original Amount'; + Editable = false; + } + field(30; "Original Amt. (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Original Amt. (LCY)'; + Editable = false; + } + field(40; "Document Type"; Enum "Cartera Document Doc. Type") + { + Caption = 'Document Type'; + Editable = false; + } + field(42; Factoring; Option) + { + Caption = 'Factoring'; + Editable = false; + OptionCaption = ' ,Unrisked,Risked'; + OptionMembers = " ",Unrisked,Risked; + } + field(46; Adjusted; Boolean) + { + Caption = 'Adjusted'; + } + field(47; ReAdjusted; Boolean) + { + Caption = 'ReAdjusted'; + } + field(48; "Adjusted Amount"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Adjusted Amount'; + } + field(49; "From Journal"; Boolean) + { + Caption = 'From Journal'; + } + field(480; "Dimension Set ID"; Integer) + { + Caption = 'Dimension Set ID'; + Editable = false; + TableRelation = "Dimension Set Entry"; + + trigger OnLookup() + begin + Rec.ShowDimensions(); + end; + } + field(10700; "Original Document No."; Code[20]) + { + Caption = 'Original Document No.'; + } + } + + keys + { + key(Key1; Type, "Entry No.") + { + Clustered = true; + } + key(Key2; Type, "Document No.") + { + } + key(Key3; "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") + { + SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; + } + key(Key4; "Bank Account No.", "Dealing Type", Status, "Category Code", Redrawn, "Honored/Rejtd. at Date", "Due Date", "Document Type") + { + SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; + } + key(Key5; "Bank Account No.", "Dealing Type", Status, Redrawn, "Due Date") + { + SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; + } + key(Key6; "Bank Account No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Dealing Type", Status, "Category Code", Redrawn, "Honored/Rejtd. at Date", "Due Date") + { + Enabled = false; + SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; + } + key(Key7; "Bank Account No.", "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date", "Document Type") + { + SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; + } + key(Key8; "Bank Account No.", "Dealing Type", Status, Redrawn, "Due Date", "Document Type") + { + SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; + } + key(Key9; Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code") + { + SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; + } + key(Key10; Type, "Original Document No.") + { + } + } + + fieldgroups + { + } + + var + Text1100000: Label 'untitled'; + + procedure Caption(): Text + var + BankAcc: Record "Bank Account"; + begin + if "Bank Account No." = '' then + exit(Text1100000); + BankAcc.Get("Bank Account No."); + exit(StrSubstNo(BankAcc.Name)); + end; + + [Scope('OnPrem')] + procedure ShowDimensions() + var + DimMgt: Codeunit DimensionManagement; + begin + DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo('%1 %2 %3', Type, "Entry No.", "Document No.")); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDocEdit.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDocEdit.Codeunit.al new file mode 100644 index 00000000000..55883151151 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDocEdit.Codeunit.al @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +codeunit 7000009 "Posted Cartera Doc.- Edit" +{ + Permissions = TableData "Cartera Doc." = imd, + TableData "Posted Cartera Doc." = rm; + TableNo = "Posted Cartera Doc."; + + trigger OnRun() + begin + PostedDoc := Rec; + PostedDoc.LockTable(); + PostedDoc.Find(); + PostedDoc."Category Code" := Rec."Category Code"; + PostedDoc."Due Date" := Rec."Due Date"; + OnBeforeModifyPostedCarteraDoc(PostedDoc, Rec); + PostedDoc.Modify(); + Rec := PostedDoc; + end; + + var + PostedDoc: Record "Posted Cartera Doc."; + + [IntegrationEvent(false, false)] + local procedure OnBeforeModifyPostedCarteraDoc(var PostedCarteraDoc: Record "Posted Cartera Doc."; CurrPostedCarteraDoc: Record "Posted Cartera Doc.") + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDocuments.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDocuments.Page.al new file mode 100644 index 00000000000..12e84feb1da --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/PostedCarteraDocuments.Page.al @@ -0,0 +1,138 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 7000006 "Posted Cartera Documents" +{ + Caption = 'Posted Cartera Documents'; + Editable = false; + PageType = List; + SourceTable = "Posted Cartera Doc."; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Bill Gr./Pmt. Order No."; Rec."Bill Gr./Pmt. Order No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number assigned to this document in a bill group/payment order.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date when the creation of this document was posted.'; + Visible = false; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this document in a posted bill group/payment order.'; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment method code for the document number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the document in a posted bill group/payment order, from which this document was generated.'; + } + field("No."; Rec."No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of a bill in a posted bill group/payment order.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the description associated with this posted document.'; + } + field("Amount for Collection"; Rec."Amount for Collection") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount for which this document in a posted bill group/payment order was created.'; + } + field("Amt. for Collection (LCY)"; Rec."Amt. for Collection (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount due for this document in a posted bill group/payment order.'; + Visible = false; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amount for this document, in a posted bill group/payment order, to be settled in full.'; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amount in order for this document, in a posted bill group/payment order, to be settled in full.'; + Visible = false; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + Visible = false; + } + field("Category Code"; Rec."Category Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a filter for the categories for which documents are shown.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account type associated with this document in a posted bill group/payment order.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the ledger entry number associated with this posted document.'; + } + } + } + } + + actions + { + area(processing) + { + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + CarteraManagement.NavigatePostedDoc(Rec); + end; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Navigate_Promoted"; "&Navigate") + { + } + } + } + } + + var + CarteraManagement: Codeunit CarteraManagement; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/RecDocsAnalysisFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/RecDocsAnalysisFactBox.Page.al new file mode 100644 index 00000000000..6e87e1293c8 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/RecDocsAnalysisFactBox.Page.al @@ -0,0 +1,109 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +page 35290 "Rec. Docs Analysis Fact Box" +{ + Caption = 'Rec. Docs Analysis Fact Box'; + DataCaptionExpression = Rec.GetFilter(Type); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SaveValues = true; + SourceTable = "Cartera Doc."; + + layout + { + area(content) + { + field(BillCount; DocCount) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Documents'; + Editable = false; + ToolTip = 'Specifies the number of documents included.'; + } + field(Total; TotalAmt) + { + ApplicationArea = All; + AutoFormatExpression = Doc."Currency Code"; + AutoFormatType = 1; + Caption = 'Amount'; + DrillDown = true; + Editable = false; + ToolTip = 'Specifies the sum of amounts on the documents.'; + Visible = TotalVisible; + + trigger OnDrillDown() + begin + PAGE.RunModal(0, Doc); + end; + } + field(TotalLCY; TotalAmtLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount (LCY)'; + DrillDown = true; + Editable = false; + ToolTip = 'Specifies the sum of amounts on the documents.'; + Visible = TotalLCYVisible; + + trigger OnDrillDown() + begin + PAGE.RunModal(0, Doc); + end; + } + } + } + + actions + { + } + + trigger OnInit() + begin + TotalLCYVisible := true; + TotalVisible := true; + end; + + trigger OnOpenPage() + begin + CategoryFilter := Rec.GetFilter("Category Code"); + CurrencyFilter := Rec.GetFilter("Currency Code"); + UpdateStatistics(); + end; + + var + Doc: Record "Cartera Doc."; + CategoryFilter: Code[250]; + CurrencyFilter: Code[250]; + DocCount: Integer; + TotalAmt: Decimal; + TotalAmtLCY: Decimal; + Show: Boolean; + TotalVisible: Boolean; + TotalLCYVisible: Boolean; + + local procedure UpdateStatistics() + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code"); + Doc.SetFilter("Category Code", CategoryFilter); + Doc.SetFilter("Currency Code", CurrencyFilter); + Show := Doc.CalcSums("Remaining Amount", "Remaining Amt. (LCY)"); + if Show then begin + TotalAmt := Doc."Remaining Amount"; + TotalAmtLCY := Doc."Remaining Amt. (LCY)"; + end; + DocCount := Doc.Count; + TotalVisible := Show; + TotalLCYVisible := Show; + + if Doc.Find('=><') then; // necessary to calculate decimal places + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/RejectDocs.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/RejectDocs.Report.al new file mode 100644 index 00000000000..1f319db58ad --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/RejectDocs.Report.al @@ -0,0 +1,729 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Customer; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +report 7000097 "Reject Docs." +{ + Caption = 'Reject Docs.'; + Permissions = TableData "Cust. Ledger Entry" = imd, + TableData "Vendor Ledger Entry" = imd, + TableData "Cartera Doc." = imd, + TableData "Posted Cartera Doc." = imd, + TableData "Closed Cartera Doc." = imd, + TableData "Posted Bill Group" = imd, + TableData "Closed Bill Group" = imd; + ProcessingOnly = true; + + dataset + { + dataitem(CustLedgEntry; "Cust. Ledger Entry") + { + DataItemTableView = sorting("Entry No.") where(Open = const(true)); + + trigger OnAfterGetRecord() + var + FromJnl: Boolean; + begin + IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("Bill No."); + DocCount := DocCount + 1; + Window.Update(1, DocCount); + + if GLSetup."Unrealized VAT" and + (("Document Type" = "Document Type"::Bill) or ("Document Type" = "Document Type"::Invoice)) + then begin + FromJnl := false; + if PostedDoc."From Journal" then + FromJnl := true; + OnBeforeCustFindVATSetup(VATPostingSetup, CustLedgEntry, FromJnl); + ExistsNoRealVAT := GenJnlPostLine.CustFindVATSetup(VATPostingSetup, CustLedgEntry, FromJnl); + end; + + if ArePostedDocs then begin + PostedDoc.Get(PostedDoc.Type::Receivable, "Entry No."); + PostedBillGr.Get(PostedDoc."Bill Gr./Pmt. Order No."); + if PostedBillGr."Dealing Type" = PostedBillGr."Dealing Type"::Discount then + Discount := true + else + Discount := false; + if PostedBillGr.Factoring = PostedBillGr.Factoring::" " then + Factoring := false + else + Factoring := true; + BankAcc.Get(PostedDoc."Bank Account No."); + BankAcc.TestField("Bank Acc. Posting Group"); + BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); + if IncludeExpenses then begin + BankAcc.TestField("Operation Fees Code"); + FeeRange.InitRejExpenses( + BankAcc."Operation Fees Code", + BankAcc."Currency Code"); + end; + end; + + CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + + if "Document Type" = "Document Type"::Bill then begin + CurrDescription := StrSubstNo(Text1100004, "Document No.", "Bill No."); + CurrDocNo := "Document No."; + CurrDocNo2 := "Bill No."; + PrepareBillRejPosting("Remaining Amount"); + end else begin + CurrDescription := StrSubstNo(Text1100005, "Document No."); + CurrDocNo := "Document No."; + CurrDocNo2 := "Bill No."; + PrepareInvoiceRejPosting("Remaining Amount"); + end; + + if ArePostedDocs then begin + PostedDoc.Get(PostedDoc.Type::Receivable, "Entry No."); + PostedDoc.Status := PostedDoc.Status::Rejected; + PostedDoc."Honored/Rejtd. at Date" := PostingDate; + PostedDoc.Modify(); + "Document Status" := "Document Status"::Rejected; + Modify(); + if IncludeExpenses then + FeeRange.CalcRejExpensesAmt( + BankAcc."Operation Fees Code", + BankAcc."Currency Code", + "Remaining Amount", + "Entry No."); + end else begin + Doc.Get(Doc.Type::Receivable, "Entry No."); + ClosedDoc.TransferFields(Doc); + ClosedDoc.Status := ClosedDoc.Status::Rejected; + ClosedDoc."Honored/Rejtd. at Date" := PostingDate; + ClosedDoc."Bill Gr./Pmt. Order No." := ''; + ClosedDoc."Remaining Amount" := Doc."Remaining Amount"; + ClosedDoc."Remaining Amt. (LCY)" := Doc."Remaining Amt. (LCY)"; + ClosedDoc."Amount for Collection" := 0; + ClosedDoc."Amt. for Collection (LCY)" := 0; + ClosedDoc.Insert(true); + Doc.Delete(); + "Document Status" := "Document Status"::Rejected; + "Document Situation" := "Document Situation"::"Closed Documents"; + Modify(); + end; + + DocPost.InsertDtldCustLedgEntry( + CustLedgEntry, + "Remaining Amount", + "Remaining Amt. (LCY)", + EntryType::Rejection, + PostingDate); + + if GLSetup."Unrealized VAT" and + ExistsNoRealVAT and + (not IsRedrawn) + then begin + CarteraManagement.CustUnrealizedVAT2( + CustLedgEntry, + "Remaining Amt. (LCY)", + GenJnlLine, + ExistVATEntry, + FirstVATEntryNo, + LastVATEntryNo, + NoRealVATBuffer, + FromJnl, + "Document No."); + + TempCurrCode := "Currency Code"; + "Currency Code" := ''; + + if NoRealVATBuffer.Find('-') then + repeat + FindInClosedBills := true; + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer.Account, + -NoRealVATBuffer.Amount, + "Dimension Set ID"); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer."Balance Account", + NoRealVATBuffer.Amount, + "Dimension Set ID"); + FindInClosedBills := false; + until NoRealVATBuffer.Next() = 0; + + "Currency Code" := TempCurrCode; + end; + + if IncludeExpenses and ArePostedDocs then begin + CurrDescription := Text1100006; + CurrDocNo := PostedBillGr."No."; + CurrDocNo2 := ''; + if (FeeRange.GetTotalRejExpensesAmt() <> 0) or (UseJournal = UseJournal::AuxJournal) then begin + BankAccPostingGr.TestField("Rejection Expenses Acc."); + NoRegs := FeeRange.NoRegRejExpenses(); + for i := 0 to NoRegs - 1 do begin + FeeRange.GetRejExpensesAmt(MemIntReg, i); + Get(MemIntReg."Entry No."); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + BankAccPostingGr."Rejection Expenses Acc.", + MemIntReg.Amount, + "Dimension Set ID"); + InsertGenJournalLine( + GenJnlLine."Account Type"::"Bank Account", + BankAcc."No.", + -MemIntReg.Amount, + "Dimension Set ID"); + end; + end; + end; + + if (FeeRange.GetTotalRejExpensesAmt() <> 0) and ArePostedDocs then begin + PostedBillGr."Rejection Expenses Amt." := PostedBillGr."Rejection Expenses Amt." + FeeRange.GetTotalRejExpensesAmt(); + PostedBillGr.Modify(); + end; + end; + + trigger OnPostDataItem() + var + PostedDoc2: Record "Posted Cartera Doc."; + SkipMessage: Boolean; + begin + if GenJnlLine.Find('-') then + repeat + if ArePostedDocs then begin + PostedDoc2.SetRange("Document No.", GenJnlLine."Document No."); + if PostedDoc2.Find('-') then + repeat + PostedBillGr.Get(PostedDoc2."Bill Gr./Pmt. Order No."); + DocPost.CloseBillGroupIfEmpty(PostedBillGr, PostingDate); + until PostedDoc2.Next() = 0; + end; + until GenJnlLine.Next() = 0; + + PostGenJournal(); + if ExistVATEntry then begin + GLReg.FindLast(); + GLReg."From VAT Entry No." := FirstVATEntryNo; + GLReg."To VAT Entry No." := LastVATEntryNo; + GLReg.Modify(); + end; + + Commit(); + + SkipMessage := false; + OnPostDataItemCustLedgEntryOnBeforeShowCompletationMessage(DocCount, SkipMessage); + if not SkipMessage then + Message(Text1100007, DocCount); + end; + + trigger OnPreDataItem() + begin + DocPost.CheckPostingDate(PostingDate); + + Find('-'); + ArePostedDocs := "Document Situation" = "Document Situation"::"Posted BG/PO"; + + if UseJournal = UseJournal::AuxJournal then begin + GenJnlBatch.Get(TemplName, BatchName); + ReasonCode := GenJnlBatch."Reason Code"; + GenJnlTemplate.Get(TemplName); + SourceCode := GenJnlTemplate."Source Code"; + end else begin + ReasonCode := ''; + SourceCodeSetup.Get(); + SourceCode := SourceCodeSetup."Cartera Journal" + end; + + case "Document Type" of + "Document Type"::Bill: + Window.Open( + Text1100001); + "Document Type"::Invoice: + Window.Open( + Text1100002); + else + Window.Open( + Text1100003); + end; + + DocCount := 0; + GenJnlLineNextNo := 0; + ExistVATEntry := false; + end; + } + } + + requestpage + { + SaveValues = true; + SourceTable = Customer; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PostingDate; PostingDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Posting Date'; + ToolTip = 'Specifies the posting date.'; + } + field(IncludeExpenses; IncludeExpenses) + { + ApplicationArea = Basic, Suite; + Caption = 'Include Expenses'; + ToolTip = 'Specifies if you want to include the expenses resulting from document rejections. If expenses are included, the amount will be calculated as it was defined under fees for the operation called Rejection Expenses.'; + } + field(UseJournal; UseJournal) + { + ApplicationArea = Basic, Suite; + Caption = 'Post'; + OptionCaption = 'Direct,Auxiliary Journal'; + ToolTip = 'Specifies where to post the ledger entries associated with the document rejection. Direct: Will post directly to the Ledger Entries table. Auxiliary Journal: Will post through a journal that you specify.'; + + trigger OnValidate() + begin + if UseJournal = UseJournal::Direct then begin + BatchName := ''; + TemplName := ''; + end; + end; + } + group("Auxiliary Journal") + { + Caption = 'Auxiliary Journal'; + field(TemplateName; TemplName) + { + ApplicationArea = Basic, Suite; + Caption = 'Template Name'; + TableRelation = "Gen. Journal Template".Name where(Type = const(Cartera), + Recurring = const(false)); + ToolTip = 'Specifies the template that will be used when posting. By default, the CARTERA template is selected.'; + + trigger OnValidate() + begin + if TemplName = '' then + BatchName := '' + else + if UseJournal = UseJournal::Direct then + Error(Text1100008); + end; + } + field(BatchName; BatchName) + { + ApplicationArea = Basic, Suite; + Caption = 'Batch Name'; + TableRelation = "Gen. Journal Batch".Name; + ToolTip = 'Specifies the name of the journal batch.'; + + trigger OnLookup(var Text: Text): Boolean + begin + if TemplName = '' then + exit; + + if GenJnlBatch.Get(TemplName, Text) then; + GenJnlBatch.SetRange("Journal Template Name", TemplName); + if PAGE.RunModal(PAGE::"General Journal Batches", GenJnlBatch) = ACTION::LookupOK then + BatchName := GenJnlBatch.Name; + end; + + trigger OnValidate() + begin + if TemplName = '' then + BatchName := ''; + end; + } + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + PostingDate := WorkDate(); + end; + } + + labels + { + } + + trigger OnPreReport() + begin + OnBeforeOnPreReport(PostingDate, IncludeExpenses, UseJournal, TemplName, BatchName); + + GLSetup.Get(); + + if UseJournal = UseJournal::AuxJournal then begin + if not GenJnlBatch.Get(TemplName, BatchName) then + Error(Text1100000); + ReasonCode := GenJnlBatch."Reason Code"; + GenJnlTemplate.Get(TemplName); + SourceCode := GenJnlTemplate."Source Code"; + end; + end; + + var + Text1100000: Label 'Please fill in both the Template Name and the Batch Name of the Auxiliary Journal with correct values.'; + Text1100001: Label 'Rejecting receivable bills #1######'; + Text1100002: Label 'Rejecting receivable invoices #1######'; + Text1100003: Label 'Rejecting receivable documents #1######'; + Text1100004: Label 'Rejected Bill %1/%2'; + Text1100005: Label 'Rejected Document %1'; + Text1100006: Label 'Document Rejection Expenses'; + Text1100007: Label '%1 documents have been rejected.'; + Text1100008: Label 'This field must be blank for Direct Posting.'; + GenJnlTemplate: Record "Gen. Journal Template"; + GenJnlBatch: Record "Gen. Journal Batch"; + PostedBillGr: Record "Posted Bill Group"; + GenJnlLine: Record "Gen. Journal Line" temporary; + BankAcc: Record "Bank Account"; + SourceCodeSetup: Record "Source Code Setup"; + CustPostingGr: Record "Customer Posting Group"; + BankAccPostingGr: Record "Bank Account Posting Group"; + Doc: Record "Cartera Doc."; + PostedDoc: Record "Posted Cartera Doc."; + ClosedDoc: Record "Closed Cartera Doc."; + FeeRange: Record "Fee Range"; + GLSetup: Record "General Ledger Setup"; + GLReg: Record "G/L Register"; + Currency: Record Currency; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + DocPost: Codeunit "Document-Post"; + CarteraManagement: Codeunit CarteraManagement; + GenJnlManagement: Codeunit GenJnlManagement; + CarteraJnlForm: Page "Cartera Journal"; + Window: Dialog; + IncludeExpenses: Boolean; + PostingDate: Date; + PostingDate2: Date; + TransactionNo: Integer; + CurrDescription: Text[250]; + CurrDocNo: Code[20]; + CurrDocNo2: Code[20]; + UseJournal: Option Direct,AuxJournal; + BatchName: Code[10]; + TemplName: Code[10]; + Discount: Boolean; + SourceCode: Code[10]; + GenJnlLineNextNo: Integer; + DocCount: Integer; + BalanceAccNo: Code[20]; + ArePostedDocs: Boolean; + ReasonCode: Code[10]; + Factoring: Boolean; + VATPostingSetup: Record "VAT Posting Setup"; + NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; + FirstVATEntryNo: Integer; + LastVATEntryNo: Integer; + ExistVATEntry: Boolean; + IsRedrawn: Boolean; + GainLossAmt: Decimal; + TempCurrCode: Code[10]; + NoRegs: Integer; + i: Integer; + MemIntReg: Record "BG/PO Post. Buffer"; + EntryType: Option " ","Initial Entry",Application,"Unrealized Loss","Unrealized Gain","Realized Loss","Realized Gain","Payment Discount","Payment Discount (VAT Excl.)","Payment Discount (VAT Adjustment)","Appln. Rounding","Correction of Remaining Amount",,,,,,,,,Settlement,Rejection,Redrawal,Expenses; + ExistsNoRealVAT: Boolean; + FindInClosedBills: Boolean; + + local procedure PrepareBillRejPosting(RemainingAmt: Decimal) + var + TempCurrencyCode: Code[10]; + Type: Option Receivable,Payable; + begin + CustPostingGr.Get(CustLedgEntry."Customer Posting Group"); + CustPostingGr.TestField("Rejected Bills Acc."); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + CustPostingGr."Rejected Bills Acc.", + RemainingAmt, + CustLedgEntry."Dimension Set ID"); + if ArePostedDocs then + if Discount then begin + CustPostingGr.TestField("Discted. Bills Acc."); + BalanceAccNo := CustPostingGr."Discted. Bills Acc."; + end else begin + CustPostingGr.TestField("Bills on Collection Acc."); + BalanceAccNo := CustPostingGr."Bills on Collection Acc."; + end + else begin + CustPostingGr.TestField("Bills Account"); + BalanceAccNo := CustPostingGr."Bills Account"; + end; + OnAfterGetBillsBalanceAccNo(GenJnlLine, CustLedgEntry, BalanceAccNo); + + PostingDate2 := 0D; + GainLossAmt := 0; + if CustLedgEntry."Currency Code" <> '' then begin + Currency.Get(CustLedgEntry."Currency Code"); + if ArePostedDocs then + PostingDate2 := CarteraManagement.GetLastDate(CustLedgEntry."Currency Code", PostedBillGr."Posting Date", Type::Receivable) + else + PostingDate2 := CarteraManagement.GetLastDate(CustLedgEntry."Currency Code", CustLedgEntry."Posting Date", Type::Receivable); + + GainLossAmt := CarteraManagement.GetGainLoss( + PostingDate2, + PostingDate, + RemainingAmt, + CustLedgEntry."Currency Code"); + end; + + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + BalanceAccNo, + -RemainingAmt, + CustLedgEntry."Dimension Set ID"); + + if GainLossAmt <> 0 then begin + TempCurrencyCode := CustLedgEntry."Currency Code"; + CustLedgEntry."Currency Code" := ''; + if GainLossAmt > 0 then begin + Currency.TestField("Realized Gains Acc."); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + Currency."Realized Gains Acc.", + -GainLossAmt, + CustLedgEntry."Dimension Set ID"); + end else begin + Currency.TestField("Realized Losses Acc."); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + Currency."Realized Losses Acc.", + -GainLossAmt, + CustLedgEntry."Dimension Set ID"); + end; + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + BalanceAccNo, + GainLossAmt, + CustLedgEntry."Dimension Set ID"); + + CustLedgEntry."Currency Code" := TempCurrencyCode; + end; + + if Discount then begin + BankAccPostingGr.TestField("Liabs. for Disc. Bills Acc."); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + BankAccPostingGr."Liabs. for Disc. Bills Acc.", + RemainingAmt, + CustLedgEntry."Dimension Set ID"); + + InsertGenJournalLine( + GenJnlLine."Account Type"::"Bank Account", + BankAcc."No.", + -RemainingAmt, + CustLedgEntry."Dimension Set ID"); + end; + end; + + local procedure PrepareInvoiceRejPosting(RemainingAmt: Decimal) + var + TempCurrencyCode: Code[10]; + Type: Option Receivable,Payable; + begin + CustPostingGr.Get(CustLedgEntry."Customer Posting Group"); + CustPostingGr.TestField("Rejected Factoring Acc."); + + PostingDate2 := 0D; + GainLossAmt := 0; + if CustLedgEntry."Currency Code" <> '' then begin + Currency.Get(CustLedgEntry."Currency Code"); + if ArePostedDocs then + PostingDate2 := CarteraManagement.GetLastDate(CustLedgEntry."Currency Code", PostedBillGr."Posting Date", Type::Receivable) + else + PostingDate2 := CarteraManagement.GetLastDate(CustLedgEntry."Currency Code", CustLedgEntry."Posting Date", Type::Receivable); + GainLossAmt := CarteraManagement.GetGainLoss( + PostingDate2, + PostingDate, + RemainingAmt, + CustLedgEntry."Currency Code"); + end; + + if ArePostedDocs then begin + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + CustPostingGr."Rejected Factoring Acc.", + RemainingAmt, + CustLedgEntry."Dimension Set ID"); + if ArePostedDocs then + if Discount then begin + CustPostingGr.TestField("Factoring for Discount Acc."); + BalanceAccNo := CustPostingGr."Factoring for Discount Acc."; + end else begin + CustPostingGr.TestField("Factoring for Collection Acc."); + BalanceAccNo := CustPostingGr."Factoring for Collection Acc."; + end; + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + BalanceAccNo, + -RemainingAmt, + CustLedgEntry."Dimension Set ID"); + end; + + if GainLossAmt <> 0 then begin + TempCurrencyCode := CustLedgEntry."Currency Code"; + CustLedgEntry."Currency Code" := ''; + if GainLossAmt > 0 then begin + Currency.TestField("Realized Gains Acc."); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + Currency."Realized Gains Acc.", + -GainLossAmt, + CustLedgEntry."Dimension Set ID"); + end else begin + Currency.TestField("Realized Losses Acc."); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + Currency."Realized Losses Acc.", + -GainLossAmt, + CustLedgEntry."Dimension Set ID"); + end; + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + BalanceAccNo, + GainLossAmt, + CustLedgEntry."Dimension Set ID"); + + CustLedgEntry."Currency Code" := TempCurrencyCode; + end; + + if Discount then begin + BankAccPostingGr.TestField("Liabs. for Factoring Acc."); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + BankAccPostingGr."Liabs. for Factoring Acc.", + DocPost.FindDisctdAmt(RemainingAmt, CustLedgEntry."Customer No.", BankAcc."No."), + CustLedgEntry."Dimension Set ID"); + + InsertGenJournalLine( + GenJnlLine."Account Type"::"Bank Account", + BankAcc."No.", + -DocPost.FindDisctdAmt(RemainingAmt, CustLedgEntry."Customer No.", BankAcc."No."), + CustLedgEntry."Dimension Set ID"); + end; + end; + + local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal; DimSetID: Integer) + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + if UseJournal = UseJournal::AuxJournal then begin + GenJnlLine."Journal Template Name" := TemplName; + GenJnlLine."Journal Batch Name" := BatchName; + end; + GenJnlLine."Document No." := CurrDocNo; + GenJnlLine."Bill No." := CurrDocNo2; + GenJnlLine.Validate("Account Type", AccType); + GenJnlLine.Validate("Account No.", AccNo); + GenJnlLine.Description := CopyStr(CurrDescription, 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", CustLedgEntry."Currency Code"); + GenJnlLine.Validate(Amount, Amount2); + if AccType = GenJnlLine."Account Type"::"G/L Account" then begin + GenJnlLine."Source No." := CustLedgEntry."Customer No."; + GenJnlLine."Source Type" := GenJnlLine."Source Type"::Customer; + end; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."Reason Code" := ReasonCode; + GenJnlLine."Dimension Set ID" := + CarteraManagement.GetCombinedDimSetID(GenJnlLine, DimSetID); + if UseJournal = UseJournal::AuxJournal then + GenJnlLine."System-Created Entry" := false + else + GenJnlLine."System-Created Entry" := true; + GenJnlLine.Insert(); + end; + + local procedure PostGenJournal() + var + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + GenJnlLine2: Record "Gen. Journal Line"; + LastLineNo: Integer; + begin + OnBeforePostGenJournal(GenJnlLine, CustLedgEntry); + Window.Close(); + + if not GenJnlLine.Find('-') then + exit; + + if UseJournal = UseJournal::AuxJournal then begin + GenJnlLine2.LockTable(); + GenJnlLine2.SetRange("Journal Template Name", TemplName); + GenJnlLine2.SetRange("Journal Batch Name", BatchName); + if GenJnlLine2.FindLast() then begin + LastLineNo := GenJnlLine2."Line No."; + TransactionNo := GenJnlLine2."Transaction No." + 1; + end; + repeat + GenJnlLine2 := GenJnlLine; + GenJnlLine2."Line No." := GenJnlLine2."Line No." + LastLineNo; + GenJnlLine2."Transaction No." := TransactionNo; + GenJnlLine2.Insert(); + until GenJnlLine.Next() = 0; + Commit(); + GenJnlLine2.Reset(); + GenJnlTemplate.Get(TemplName); + GenJnlLine2.FilterGroup := 2; + GenJnlLine2.SetRange("Journal Template Name", TemplName); + GenJnlLine2.FilterGroup := 0; + GenJnlManagement.SetName(BatchName, GenJnlLine2); + CarteraJnlForm.SetTableView(GenJnlLine2); + CarteraJnlForm.SetRecord(GenJnlLine2); + CarteraJnlForm.AllowClosing(true); + CarteraJnlForm.RunModal(); + end + else + repeat + GenJnlLine2 := GenJnlLine; + GenJnlPostLine.RunWithCheck(GenJnlLine2); + until GenJnlLine.Next() = 0; + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCustFindVATSetup(var VATPostingSetup: Record "VAT Posting Setup"; CustLedgEntry: Record "Cust. Ledger Entry"; var IsFromJnl: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterGetBillsBalanceAccNo(var GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry"; var BalanceAccNo: Code[20]) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforePostGenJournal(var GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeOnPreReport(var PostingDate: Date; var IncludeExpenses: Boolean; var UseJournal: Option; var TemplName: Code[10]; var BatchName: Code[10]) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnPostDataItemCustLedgEntryOnBeforeShowCompletationMessage(DocumentCount: Integer; var SkipMessage: Boolean) + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ReportSelectionCartera.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ReportSelectionCartera.Page.al new file mode 100644 index 00000000000..9cfe590e318 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ReportSelectionCartera.Page.al @@ -0,0 +1,116 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +using System.Globalization; +using System.Reflection; + +page 7000045 "Report Selection - Cartera" +{ + AboutTitle = 'About report selection for cartera'; + AboutText = 'On this page, you set up the default reports that are used when printing cartera documents such as bill groups, payment orders, and bills. Use the Usage field to select the type of document, then specify which reports to use in the list below.'; + AdditionalSearchTerms = 'Cartera Report Selections'; + ApplicationArea = Basic, Suite; + Caption = 'Report Selection - Cartera'; + PageType = Worksheet; + SaveValues = true; + SourceTable = "Cartera Report Selections"; + UsageCategory = Administration; + + layout + { + area(content) + { + field(ReportUsage2; ReportUsage2) + { + ApplicationArea = Basic, Suite; + Caption = 'Usage'; + ToolTip = 'Specifies the business purpose of the report.'; + + trigger OnValidate() + begin + SetUsageFilter(); + ReportUsage2OnAfterValidate(); + end; + } + repeater(Control1) + { + ShowCaption = false; + field(Sequence; Rec.Sequence) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the order number or the sequence in which you want to print this report.'; + } + field("Report ID"; Rec."Report ID") + { + ApplicationArea = Basic, Suite; + LookupPageID = Objects; + ToolTip = 'Specifies the number of the report to be printed.'; + } + field("Report Name"; Rec."Report Name") + { + ApplicationArea = Basic, Suite; + DrillDown = false; + ToolTip = 'Specifies the number of the report you want to print.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + ObjTransl.TranslateObject(ObjTransl."Object Type"::Report, Rec."Report ID"); + end; + + trigger OnNewRecord(BelowxRec: Boolean) + begin + Rec.NewRecord(); + end; + + trigger OnOpenPage() + begin + SetUsageFilter(); + end; + + var + ObjTransl: Record "Object Translation"; + ReportUsage2: Enum "Report Selection Usage Cartera"; + + local procedure SetUsageFilter() + begin + Rec.FilterGroup(2); + case ReportUsage2 of + "Report Selection Usage Cartera"::"Bill Group": + Rec.SetRange(Usage, Rec.Usage::"Bill Group"); + "Report Selection Usage Cartera"::"Posted Bill Group": + Rec.SetRange(Usage, Rec.Usage::"Posted Bill Group"); + "Report Selection Usage Cartera"::"Closed Bill Group": + Rec.SetRange(Usage, Rec.Usage::"Closed Bill Group"); + "Report Selection Usage Cartera"::Bill: + Rec.SetRange(Usage, Rec.Usage::Bill); + "Report Selection Usage Cartera"::"Bill Group - Test": + Rec.SetRange(Usage, Rec.Usage::"Bill Group - Test"); + "Report Selection Usage Cartera"::"Payment Order": + Rec.SetRange(Usage, Rec.Usage::"Payment Order"); + "Report Selection Usage Cartera"::"Posted Payment Order": + Rec.SetRange(Usage, Rec.Usage::"Posted Payment Order"); + "Report Selection Usage Cartera"::"Payment Order - Test": + Rec.SetRange(Usage, Rec.Usage::"Payment Order - Test"); + "Report Selection Usage Cartera"::"Closed Payment Order": + Rec.SetRange(Usage, Rec.Usage::"Closed Payment Order"); + end; + Rec.FilterGroup(0); + end; + + local procedure ReportUsage2OnAfterValidate() + begin + CurrPage.Update(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ReportSelectionUsageCartera.Enum.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ReportSelectionUsageCartera.Enum.al new file mode 100644 index 00000000000..d160f4ec8ff --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/ReceivablesPayables/ReportSelectionUsageCartera.Enum.al @@ -0,0 +1,21 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.ReceivablesPayables; + +enum 7000045 "Report Selection Usage Cartera" +{ + Extensible = true; + AssignmentCompatibility = true; + + value(0; "Bill Group") { Caption = 'Bill Group'; } + value(1; "Posted Bill Group") { Caption = 'Posted Bill Group'; } + value(2; "Closed Bill Group") { Caption = 'Closed Bill Group'; } + value(3; "Bill") { Caption = 'Bill'; } + value(4; "Bill Group - Test") { Caption = 'Bill Group - Test'; } + value(5; "Payment Order") { Caption = 'Payment Order'; } + value(6; "Posted Payment Order") { Caption = 'Posted Payment Order'; } + value(7; "Payment Order - Test") { Caption = 'Payment Order - Test'; } + value(8; "Closed Payment Order") { Caption = 'Closed Payment Order'; } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccPayablesActivities.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccPayablesActivities.PageExt.al new file mode 100644 index 00000000000..4a7e78e5b4d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccPayablesActivities.PageExt.al @@ -0,0 +1,61 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; + +pageextension 7000003 "CRT Acc. Payables Activities" extends "Acc. Payables Activities" +{ + layout + { + addafter("Document Approvals") + { + cuegroup(Cartera) + { + Caption = 'Cartera'; + field("Payable Documents"; Rec."Payable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Payables Cartera Docs"; + ToolTip = 'Specifies the payables document that is associated with the bill group.'; + } + field("Posted Payable Documents"; Rec."Posted Payable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Posted Cartera Documents"; + ToolTip = 'Specifies the payables documents that have been posted.'; + } + + actions + { + action("New Payment Order") + { + ApplicationArea = Basic, Suite; + Caption = 'New Payment Order'; + RunObject = Page "Payment Orders"; + RunPageMode = Create; + ToolTip = 'Create a new order for payables documents for submission to the bank for electronic payment.'; + } + action("Posted Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders List'; + RunObject = Page "Posted Payment Orders List"; + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + action("Posted Payment Orders Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders Select.'; + RunObject = Page "Posted Payment Orders Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a payment order.'; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccReceivableActivities.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccReceivableActivities.PageExt.al new file mode 100644 index 00000000000..8984be28f27 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccReceivableActivities.PageExt.al @@ -0,0 +1,61 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +pageextension 7000005 "CRT Acc. Receivable Activities" extends "Acc. Receivable Activities" +{ + layout + { + addafter("Document Approvals") + { + cuegroup(Cartera) + { + Caption = 'Cartera'; + field("Receivable Documents"; Rec."Receivable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Receivables Cartera Docs"; + ToolTip = 'Specifies the receivables document that is associated with the bill group.'; + } + field("Posted Receivable Documents"; Rec."Posted Receivable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Posted Cartera Documents"; + ToolTip = 'Specifies the receivables documents that have been posted.'; + } + + actions + { + action("New Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'New Bill Group'; + RunObject = Page "Bill Groups"; + RunPageMode = Create; + ToolTip = 'Create a new group of receivables documents for submission to the bank for electronic collection.'; + } + action("Posted Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups List'; + RunObject = Page "Posted Bill Groups List"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + action("Posted Bill Group Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Select.'; + RunObject = Page "Posted Bill Group Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a bill group.'; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccReceivablesAdmRC.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccReceivablesAdmRC.PageExt.al new file mode 100644 index 00000000000..220ac383673 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccReceivablesAdmRC.PageExt.al @@ -0,0 +1,142 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Bank.Reports; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; +using Microsoft.Sales.Reports; + +pageextension 7000163 "CRT Acc. Receivables Adm. RC" extends "Acc. Receivables Adm. RC" +{ + actions + { + addafter("Customer - Due Payments") + { + group("Cartera Bill Groups") + { + Caption = 'Cartera Bill Groups'; + action("Closed Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Group Listing'; + Image = "Report"; + RunObject = Report "Closed Bill Group Listing"; + ToolTip = 'View the list of completed bill groups.'; + } + action("Posted Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Listing'; + Image = "Report"; + RunObject = Report "Posted Bill Group Listing"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + action("Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group Listing'; + Image = "Report"; + RunObject = Report "Bill Group Listing"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + action("Bank - Summ. Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Summ. Bill Group'; + Image = "Report"; + RunObject = Report "Bank - Summ. Bill Group"; + ToolTip = 'View a detailed summary for existing bill groups.'; + } + action("Bank - Risk") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Risk'; + Image = "Report"; + RunObject = Report "Bank - Risk"; + ToolTip = 'View the risk status for discounting bills with the selected bank.'; + } + action("Notice Assignment Credits") + { + ApplicationArea = Basic, Suite; + Caption = 'Notice Assignment Credits'; + Image = "Report"; + RunObject = Report "Notice Assignment Credits"; + ToolTip = 'Define how your company decides to administer its billing using a factoring (factor) entity. You send your customers a notification letter, telling them that it is going to assign its billing to another entity. As of that moment, the client will no longer have to pay the company, they will pay the factoring entity instead.'; + } + } + } + addafter("Sales Invoices") + { + action("Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Groups List'; + RunObject = Page "Bill Groups List"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + action("Posted Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups List'; + RunObject = Page "Posted Bill Groups List"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + } + addafter("Posted Sales Credit Memos") + { + action("Receivable Closed Cartera Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Receivable Closed Cartera Docs'; + RunObject = Page "Receivable Closed Cartera Docs"; + ToolTip = 'View the customer bills and invoices that are in the closed bill groups.'; + } + action("Closed Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Groups List'; + RunObject = Page "Closed Bill Groups List"; + ToolTip = 'View the list of completed bill groups.'; + } + } + addafter("&Sales") + { + action("Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group'; + Image = VoucherGroup; + RunObject = Page "Bill Groups"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + } + addafter("Combine Return S&hipments") + { + separator(Action1100020) + { + } + action("Posted Bill Group Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Select.'; + RunObject = Page "Posted Bill Group Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a bill group.'; + } + group("Bill Group - Export Formats") + { + Caption = 'Bill Group - Export Formats'; + action("Bill Group - Export Factoring") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group - Export Factoring'; + Image = "Report"; + RunObject = Report "Bill group - Export factoring"; + ToolTip = 'Send the factoring bill groups to a magnetic media.'; + } + } + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccountMgrActivities.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccountMgrActivities.PageExt.al new file mode 100644 index 00000000000..ebb4d06af42 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccountMgrActivities.PageExt.al @@ -0,0 +1,54 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Purchases.Payables; +using Microsoft.Sales.Receivables; + +pageextension 7000162 "CRT Account Mgr. Activities" extends "Account Manager Activities" +{ + layout + { + addafter("Document Approvals") + { + cuegroup(Cartera) + { + Caption = 'Cartera'; + field("Receivable Documents"; Rec."Receivable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Receivables Cartera Docs"; + ToolTip = 'Specifies the receivables document that is associated with the bill group.'; + } + field("Payable Documents"; Rec."Payable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Payables Cartera Docs"; + ToolTip = 'Specifies the payables document that is associated with the bill group.'; + } + + actions + { + action("New Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'New Bill Group'; + RunObject = Page "Bill Groups"; + RunPageMode = Create; + ToolTip = 'Create a new group of receivables documents for submission to the bank for electronic collection.'; + } + action("New Payment Order") + { + ApplicationArea = Basic, Suite; + Caption = 'New Payment Order'; + RunObject = Page "Payment Orders"; + RunPageMode = Create; + ToolTip = 'Create a new order for payables documents for submission to the bank for electronic payment.'; + } + } + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccountingMgrRoleCtr.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccountingMgrRoleCtr.PageExt.al new file mode 100644 index 00000000000..f24266b4560 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTAccountingMgrRoleCtr.PageExt.al @@ -0,0 +1,24 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Finance.ReceivablesPayables; + +pageextension 7000161 "CRT Accounting Mgr. Role Ctr." extends "Accounting Manager Role Center" +{ + actions + { + addafter("Cost Accounting Setup") + { + action("Cartera Setup") + { + ApplicationArea = Basic, Suite; + Caption = 'Cartera Setup'; + RunObject = Page "Cartera Setup"; + ToolTip = 'Configure your company''s policies for bill groups and payment orders.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTBookkeeperActivities.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTBookkeeperActivities.PageExt.al new file mode 100644 index 00000000000..0851a6629ba --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTBookkeeperActivities.PageExt.al @@ -0,0 +1,105 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +pageextension 7000009 "CRT Bookkeeper Activities" extends "Bookkeeper Activities" +{ + layout + { + addafter(Receivables) + { + cuegroup("Cartera Receivables") + { + Caption = 'Cartera Receivables'; + field("Receivable Documents"; Rec."Receivable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Receivables Cartera Docs"; + ToolTip = 'Specifies the receivables document that is associated with the bill group.'; + } + field("Posted Receivable Documents"; Rec."Posted Receivable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Posted Cartera Documents"; + ToolTip = 'Specifies the receivables documents that have been posted.'; + } + + actions + { + action("New Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'New Bill Group'; + RunObject = Page "Bill Groups"; + RunPageMode = Create; + ToolTip = 'Create a new group of receivables documents for submission to the bank for electronic collection.'; + } + action("Posted Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups List'; + RunObject = Page "Posted Bill Groups List"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + action("Posted Bill Group Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Select.'; + RunObject = Page "Posted Bill Group Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a bill group.'; + } + } + } + cuegroup("Cartera Payables") + { + Caption = 'Cartera Payables'; + field("Payable Documents"; Rec."Payable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Payables Cartera Docs"; + ToolTip = 'Specifies the payables document that is associated with the bill group.'; + } + field("Posted Payable Documents"; Rec."Posted Payable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Posted Cartera Documents"; + ToolTip = 'Specifies the payables documents that have been posted.'; + } + + actions + { + action("New Payment Order") + { + ApplicationArea = Basic, Suite; + Caption = 'New Payment Order'; + RunObject = Page "Payment Orders"; + RunPageMode = Create; + ToolTip = 'Create a new order for payables documents for submission to the bank for electronic payment.'; + } + action("Posted Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders List'; + RunObject = Page "Posted Payment Orders List"; + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + action("Posted Payment Orders Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders Select.'; + RunObject = Page "Posted Payment Orders Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a payment order.'; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTBookkeeperRoleCenter.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTBookkeeperRoleCenter.PageExt.al new file mode 100644 index 00000000000..32f87850645 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTBookkeeperRoleCenter.PageExt.al @@ -0,0 +1,218 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Bank.Reports; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; +using Microsoft.Sales.Reports; + +pageextension 7000164 "CRT Bookkeeper Role Center" extends "Bookkeeper Role Center" +{ + actions + { + addafter("Customer - Due Payments") + { + group("Cartera Bill Groups") + { + Caption = 'Cartera Bill Groups'; + action("Closed Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Group Listing'; + Image = "Report"; + RunObject = Report "Closed Bill Group Listing"; + ToolTip = 'View the list of completed bill groups.'; + } + action("Posted Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Listing'; + Image = "Report"; + RunObject = Report "Posted Bill Group Listing"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + action("Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group Listing'; + Image = "Report"; + RunObject = Report "Bill Group Listing"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + action("Bank - Summ. Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Summ. Bill Group'; + Image = "Report"; + RunObject = Report "Bank - Summ. Bill Group"; + ToolTip = 'View a detailed summary for existing bill groups.'; + } + action("Bank - Risk") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Risk'; + Image = "Report"; + RunObject = Report "Bank - Risk"; + ToolTip = 'View the risk status for discounting bills with the selected bank.'; + } + action("Notice Assignment Credits") + { + ApplicationArea = Basic, Suite; + Caption = 'Notice Assignment Credits'; + Image = "Report"; + RunObject = Report "Notice Assignment Credits"; + ToolTip = 'Define how your company decides to administer its billing using a factoring (factor) entity. You send your customers a notification letter, telling them that it is going to assign its billing to another entity. As of that moment, the client will no longer have to pay the company, they will pay the factoring entity instead.'; + } + } + } + addafter("Vendor - Due Payments") + { + group("Cartera Payment Orders") + { + Caption = 'Cartera Payment Orders'; + action("Closed Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Payment Order Listing'; + Image = "Report"; + RunObject = Report "Closed Payment Order Listing"; + ToolTip = 'View the list of completed payment orders.'; + } + action("Posted Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Order Listing'; + Image = "Report"; + RunObject = Report "Posted Payment Order Listing"; + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + action("Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order Listing'; + Image = "Report"; + RunObject = Report "Payment Order Listing"; + ToolTip = 'View or edit payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + } + } + addafter("Sales Orders") + { + action("Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Groups List'; + RunObject = Page "Bill Groups List"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + action("Posted Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups List'; + RunObject = Page "Posted Bill Groups List"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + action("Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Orders List'; + RunObject = Page "Payment Orders List"; + ToolTip = 'View or edit payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + action("Posted Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders List'; + RunObject = Page "Posted Payment Orders List"; + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + } + addafter("Posted Sales Credit Memos") + { + action("Receivable Closed Cartera Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Receivable Closed Cartera Docs'; + RunObject = Page "Receivable Closed Cartera Docs"; + ToolTip = 'View the customer bills and invoices that are in the closed bill groups.'; + } + action("Closed Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Groups List'; + RunObject = Page "Closed Bill Groups List"; + ToolTip = 'View the list of completed bill groups.'; + } + } + addafter("Posted Purchase Credit Memos") + { + action("Payable Closed Cartera Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Payable Closed Cartera Docs'; + RunObject = Page "Payable Closed Cartera Docs"; + ToolTip = 'View the vendor bills and invoices that are in closed bill groups.'; + } + action("Closed Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Payment Orders List'; + RunObject = Page "Closed Payment Orders List"; + ToolTip = 'View the list of completed payment orders.'; + } + } + addafter("Sales Credit &Memo") + { + action("Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group'; + Image = VoucherGroup; + RunObject = Page "Bill Groups"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + action("Payment Order") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order'; + RunObject = Page "Payment Orders"; + ToolTip = 'Create a new payment order to submit payables as a file to the bank for electronic payment.'; + } + } + addafter("B&ank Account Reconciliations") + { + action("Posted Bill Group Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Select.'; + RunObject = Page "Posted Bill Group Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a bill group.'; + } + group("Bill Group - Export Formats") + { + Caption = 'Bill Group - Export Formats'; + action("Payment Order - Export N34") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order - Export N34'; + Image = "Report"; + RunObject = Report "Payment order - Export N34"; + ToolTip = 'Send the payment orders to magnetic media, following the Higher Banking Council''s (CSB) guidelines (Norm 34).'; + } + action("Bill Group - Export Factoring") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group - Export Factoring'; + Image = "Report"; + RunObject = Report "Bill group - Export factoring"; + ToolTip = 'Send the factoring bill groups to a magnetic media.'; + } + } + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTFinanceCue.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTFinanceCue.TableExt.al new file mode 100644 index 00000000000..5ea902982c4 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTFinanceCue.TableExt.al @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Finance.ReceivablesPayables; + +tableextension 7000054 "CRT Finance Cue" extends "Finance Cue" +{ + fields + { + field(7000000; "Receivable Documents"; Integer) + { + CalcFormula = count("Cartera Doc." where(Type = const(Receivable), + "Bill Gr./Pmt. Order No." = const(''))); + Caption = 'Receivable Documents'; + FieldClass = FlowField; + } + field(7000001; "Payable Documents"; Integer) + { + CalcFormula = count("Cartera Doc." where(Type = const(Payable), + "Bill Gr./Pmt. Order No." = const(''))); + Caption = 'Payable Documents'; + FieldClass = FlowField; + } + field(7000002; "Posted Receivable Documents"; Integer) + { + CalcFormula = count("Posted Cartera Doc." where(Type = const(Receivable))); + Caption = 'Posted Receivable Documents'; + FieldClass = FlowField; + } + field(7000003; "Posted Payable Documents"; Integer) + { + CalcFormula = count("Posted Cartera Doc." where(Type = const(Payable))); + Caption = 'Posted Payable Documents'; + FieldClass = FlowField; + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTFinanceManagerRC.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTFinanceManagerRC.PageExt.al new file mode 100644 index 00000000000..e1cb0d671c1 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTFinanceManagerRC.PageExt.al @@ -0,0 +1,257 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.RoleCenters; + +using Microsoft.Bank.Reports; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Reports; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; +using Microsoft.Sales.Reports; + +pageextension 7000171 "CRT Finance Manager RC" extends "Finance Manager Role Center" +{ + actions + { + addafter("Group") + { + group("Group62") + { + Caption = 'Cartera'; + group("Group63") + { + Caption = 'Receivables'; + action("Cartera Journal") + { + ApplicationArea = Basic, Suite; + Caption = 'Cartera Journal'; + RunObject = page "Cartera Journal"; + } + action("Receivables Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Receivables Docs'; + RunObject = page "Receivables Cartera Docs"; + } + action("Bill Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Groups'; + RunObject = page "Bill Groups List"; + } + action("Posted Bill Group Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups'; + RunObject = page "Posted Bill Groups List"; + } + action("Closed Receivables Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Receivables Docs'; + RunObject = page "Receivable Closed Cartera Docs"; + } + action("Closed Bill Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Groups'; + RunObject = page "Closed Bill Groups List"; + } + group("Group64") + { + Caption = 'Batch Settlement'; + action("Posted Bill &Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups (Batch)'; + RunObject = page "Posted Bill Group Select."; + } + } + } + group("Group65") + { + Caption = 'Payables'; + action("Cartera Journal1") + { + ApplicationArea = Basic, Suite; + Caption = 'Cartera Journal'; + RunObject = page "Cartera Journal"; + } + action("Payables Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Payables Docs'; + RunObject = page "Payables Cartera Docs"; + } + action("Payment Orders") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Orders'; + RunObject = page "Payment Orders List"; + } + action("Posted Payment Orders") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders'; + RunObject = page "Posted Payment Orders List"; + } + action("Closed Payables Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Payables Docs'; + RunObject = page "Payable Closed Cartera Docs"; + } + action("Closed Payment Orders") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Payment Orders'; + RunObject = page "Closed Payment Orders List"; + } + group("Group66") + { + Caption = 'Batch Settlement'; + action("Posted Payment &Orders") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders (Batch)'; + RunObject = page "Posted Payment Orders Select."; + } + } + } + group("Group67") + { + Caption = 'Reports'; + action("Bank - Summ. Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Summ. Bill Group'; + RunObject = report "Bank - Summ. Bill Group"; + } + action("Bank - Risk") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Risk'; + RunObject = report "Bank - Risk"; + } + action("Customer - Due Payments") + { + ApplicationArea = Basic, Suite; + Caption = 'Customer - Due Payments'; + RunObject = report "Customer - Due Payments"; + } + action("Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order Listing'; + RunObject = report "Payment Order Listing"; + } + action("Closed Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Payment Order Listing'; + RunObject = report "Closed Payment Order Listing"; + } + action("Posted Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Order Listing'; + RunObject = report "Posted Payment Order Listing"; + } + action("Closed Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Group Listing'; + RunObject = report "Closed Bill Group Listing"; + } + action("Posted Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Listing'; + RunObject = report "Posted Bill Group Listing"; + } + action("Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group Listing'; + RunObject = report "Bill Group Listing"; + } + action("Notice Assignement Credits") + { + ApplicationArea = Basic, Suite; + Caption = 'Notice Assignement Credits'; + RunObject = report "Notice Assignment Credits"; + } + action("Payment order - Export N34") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment order - Export N34'; + RunObject = report "Payment order - Export N34"; + } + action("PO - Export N34.1") + { + ApplicationArea = Basic, Suite; + Caption = 'PO - Export N34.1'; + RunObject = report "PO - Export N34.1"; + } + action("Void PO - Export") + { + ApplicationArea = Basic, Suite; + Caption = 'Void PO - Export'; + RunObject = report "Void PO - Export"; + } + action("Vendor - Due Payments") + { + ApplicationArea = Basic, Suite; + Caption = 'Vendor - Due Payments'; + RunObject = report "Vendor - Due Payments"; + } + action("Bill group - Export factoring") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill group - Export factoring'; + RunObject = report "Bill group - Export factoring"; + } + action("Bill group - Export factoring1") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill group - Export factoring'; + RunObject = report "Bill group - Export factoring"; + } + } + group("Group68") + { + Caption = 'Setup'; + action("Cartera Setup") + { + ApplicationArea = Basic, Suite; + Caption = 'Cartera Setup'; + RunObject = page "Cartera Setup"; + } + action("Cartera Source Code Setup") + { + ApplicationArea = Basic, Suite; + Caption = 'Cartera Source Code Setup'; + RunObject = page "Cartera Source Cd. Setup"; + } + action("Category Codes") + { + ApplicationArea = Basic, Suite; + Caption = 'Category Codes'; + RunObject = page "Category Codes"; + } + action("Cartera Report Selections") + { + ApplicationArea = Basic, Suite; + Caption = 'Cartera Report Selections'; + RunObject = page "Report Selection - Cartera"; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSBOwnerCue.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSBOwnerCue.TableExt.al new file mode 100644 index 00000000000..7c48a4f8b83 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSBOwnerCue.TableExt.al @@ -0,0 +1,42 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.RoleCenters; + +using Microsoft.Finance.ReceivablesPayables; + +tableextension 7000091 "CRT SB Owner Cue" extends "SB Owner Cue" +{ + fields + { + field(7000000; "Receivable Documents"; Integer) + { + CalcFormula = count("Cartera Doc." where(Type = const(Receivable), + "Bill Gr./Pmt. Order No." = const(''))); + Caption = 'Receivable Documents'; + FieldClass = FlowField; + } + field(7000001; "Payable Documents"; Integer) + { + CalcFormula = count("Cartera Doc." where(Type = const(Payable), + "Bill Gr./Pmt. Order No." = const(''))); + Caption = 'Payable Documents'; + FieldClass = FlowField; + } + field(7000002; "Posted Receivable Documents"; Integer) + { + CalcFormula = count("Posted Cartera Doc." where(Type = const(Receivable), + "Bill Gr./Pmt. Order No." = const(''))); + Caption = 'Posted Receivable Documents'; + FieldClass = FlowField; + } + field(7000003; "Posted Payable Documents"; Integer) + { + CalcFormula = count("Posted Cartera Doc." where(Type = const(Payable), + "Bill Gr./Pmt. Order No." = const(''))); + Caption = 'Posted Payable Documents'; + FieldClass = FlowField; + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSmallBusinessOwnerAct.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSmallBusinessOwnerAct.PageExt.al new file mode 100644 index 00000000000..b3d1a0068a8 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSmallBusinessOwnerAct.PageExt.al @@ -0,0 +1,105 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.RoleCenters; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +pageextension 7000186 "CRT Small Business Owner Act." extends "Small Business Owner Act." +{ + layout + { + addlast(content) + { + cuegroup("Cartera Receivables") + { + Caption = 'Cartera Receivables'; + field("Receivable Documents"; Rec."Receivable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Receivables Cartera Docs"; + ToolTip = 'Specifies the receivables document associated with the bill group.'; + } + field("Posted Receivable Documents"; Rec."Posted Receivable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Posted Cartera Documents"; + ToolTip = 'Specifies the receivables documents that have been posted.'; + } + + actions + { + action("New Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'New Bill Group'; + RunObject = Page "Bill Groups"; + RunPageMode = Create; + ToolTip = 'Create a new group of receivables documents for submission to the bank for electronic collection.'; + } + action("Posted Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups List'; + RunObject = Page "Posted Bill Groups List"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + action("Posted Bill Group Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Select.'; + RunObject = Page "Posted Bill Group Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a bill group.'; + } + } + } + cuegroup("Cartera Payables") + { + Caption = 'Cartera Payables'; + field("Payable Documents"; Rec."Payable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Payables Cartera Docs"; + ToolTip = 'Specifies the payables document associated with the bill group.'; + } + field("Posted Payable Documents"; Rec."Posted Payable Documents") + { + ApplicationArea = Basic, Suite; + DrillDownPageID = "Posted Cartera Documents"; + ToolTip = 'Specifies the payables documents that have been posted.'; + } + + actions + { + action("New Payment Order") + { + ApplicationArea = Basic, Suite; + Caption = 'New Payment Order'; + RunObject = Page "Payment Orders"; + RunPageMode = Create; + ToolTip = 'Create a new order for payables documents for submission to the bank for electronic payment.'; + } + action("Posted Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders List'; + RunObject = Page "Posted Payment Orders List"; + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + action("Posted Payment Orders Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders Select.'; + RunObject = Page "Posted Payment Orders Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a payment order.'; + } + } + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSmallBusinessOwnerRC.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSmallBusinessOwnerRC.PageExt.al new file mode 100644 index 00000000000..07709dbf77f --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Finance/RoleCenters/CRTSmallBusinessOwnerRC.PageExt.al @@ -0,0 +1,244 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.RoleCenters; + +using Microsoft.Bank.Reports; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; +using Microsoft.Sales.Reports; + +pageextension 7000187 "CRT Small Business Owner RC" extends "Small Business Owner RC" +{ + actions + { + addlast(reporting) + { + group("Cartera Bill Groups") + { + Caption = 'Cartera Bill Groups'; + action("Closed Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Group Listing'; + Image = "Report"; + RunObject = Report "Closed Bill Group Listing"; + ToolTip = 'View the list of completed bill groups.'; + } + action("Posted Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Listing'; + Image = "Report"; + RunObject = Report "Posted Bill Group Listing"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + action("Bill Group Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group Listing'; + Image = "Report"; + RunObject = Report "Bill Group Listing"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + } + action("Bank - Summ. Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Summ. Bill Group'; + Image = "Report"; + RunObject = Report "Bank - Summ. Bill Group"; + ToolTip = 'View a detailed summary for existing bill groups.'; + } + action("Bank - Risk") + { + ApplicationArea = Basic, Suite; + Caption = 'Bank - Risk'; + Image = "Report"; + RunObject = Report "Bank - Risk"; + ToolTip = 'View the risk status for discounting bills with the selected bank.'; + } + action("Notice Assignment Credits") + { + ApplicationArea = Basic, Suite; + Caption = 'Notice Assignment Credits'; + Image = "Report"; + RunObject = Report "Notice Assignment Credits"; + ToolTip = 'Define how your company decides to administer its billing using a factoring (factor) entity. You send your customers a notification letter, telling them that it is going to assign its billing to another entity. As of that moment, the client will no longer have to pay the company, they will pay the factoring entity instead.'; + } + separator(Action1100023) + { + } + group("Cartera Payment Orders") + { + Caption = 'Cartera Payment Orders'; + action("Closed Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Payment Order Listing'; + Image = "Report"; + RunObject = Report "Closed Payment Order Listing"; + ToolTip = 'View the list of completed payment orders.'; + } + action("Posted Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Order Listing'; + Image = "Report"; + RunObject = Report "Posted Payment Order Listing"; + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + action("Payment Order Listing") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order Listing'; + Image = "Report"; + RunObject = Report "Payment Order Listing"; + ToolTip = 'View or edit payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + } + } + addafter("Sales Orders") + { + action("Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Groups List'; + RunObject = Page "Bill Groups List"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + action("Posted Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups List'; + RunObject = Page "Posted Bill Groups List"; + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + } + addafter("Purchase Orders") + { + action("Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Orders List'; + RunObject = Page "Payment Orders List"; + ToolTip = 'View or edit payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + action("Posted Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders List'; + RunObject = Page "Posted Payment Orders List"; + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + } + addlast(Journals) + { + action("Cartera Journal") + { + ApplicationArea = Basic, Suite; + Caption = 'Cartera Journal'; + RunObject = Page "General Journal Batches"; + RunPageView = where("Template Type" = const(Cartera)); + ToolTip = 'Prepare to post entries for Cartera documents, which are bills and invoices for customers and vendors. There are two types of bills: receivable bills and payable bills. Receivable bills are sent to a customer to be credited after their due date arrives. Payable bills are sent to a customer from a vendor in order to receive payment when the due date arrives.'; + } + } + addafter("Posted Sales Credit Memos") + { + action("Receivable Closed Cartera Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Receivable Closed Cartera Docs'; + RunObject = Page "Receivable Closed Cartera Docs"; + ToolTip = 'View the customer bills and invoices that are in the closed bill groups.'; + } + action("Closed Bill Groups List") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Groups List'; + RunObject = Page "Closed Bill Groups List"; + ToolTip = 'View the list of completed bill groups.'; + } + } + addafter("Posted Purchase Credit Memos") + { + action("Payable Closed Cartera Docs") + { + ApplicationArea = Basic, Suite; + Caption = 'Payable Closed Cartera Docs'; + RunObject = Page "Payable Closed Cartera Docs"; + ToolTip = 'View the vendor bills and invoices that are in closed bill groups.'; + } + action("Closed Payment Orders List") + { + ApplicationArea = Basic, Suite; + Caption = 'Closed Payment Orders List'; + RunObject = Page "Closed Payment Orders List"; + ToolTip = 'View the list of completed payment orders.'; + } + } + addafter("Sales Credit &Memo") + { + action("Bill Group") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group'; + Image = VoucherGroup; + RunObject = Page "Bill Groups"; + ToolTip = 'View or edit a bill group. Bill groups are receivables documents that are grouped together to submit to a bank for collection. For example, you may want to group documents for the same customer or group documents with the same due date.'; + } + action("Payment Order") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order'; + RunObject = Page "Payment Orders"; + ToolTip = 'Create a new payment order to submit payables as a file to the bank for electronic payment.'; + } + } + addafter("&Bank Account Reconciliation") + { + action("Posted Bill Group Select.") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Select.'; + RunObject = Page "Posted Bill Group Select."; + ToolTip = 'View or edit where ledger entries are posted when you post a bill group.'; + } + group("Bill Group - Export Formats") + { + Caption = 'Bill Group - Export Formats'; + action("Payment Order - Export N34") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order - Export N34'; + Image = "Report"; + RunObject = Report "Payment order - Export N34"; + ToolTip = 'Send the payment orders to magnetic media, following the Higher Banking Council''s (CSB) guidelines (Norm 34).'; + } + action("Bill Group - Export Factoring") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Group - Export Factoring'; + Image = "Report"; + RunObject = Report "Bill group - Export factoring"; + ToolTip = 'Send the factoring bill groups to a magnetic media.'; + } + } + } + addafter("S&ales && Receivables Setup") + { + action("Cartera Setup") + { + ApplicationArea = Basic, Suite; + Caption = 'Cartera Setup'; + RunObject = Page "Cartera Setup"; + ToolTip = 'Configure your company''s policies for bill groups and payment orders.'; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTBankAccountsView.PermissionSetExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTBankAccountsView.PermissionSetExt.al new file mode 100644 index 00000000000..2d579bd7199 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTBankAccountsView.PermissionSetExt.al @@ -0,0 +1,24 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Security.AccessControl; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +permissionsetextension 7000103 "CRT Bank Accounts - View" extends "Bank Accounts - View" +{ + Permissions = tabledata "Bill Group" = R, + tabledata "Cartera Doc." = R, + tabledata "Closed Bill Group" = R, + tabledata "Closed Cartera Doc." = R, + tabledata "Closed Payment Order" = R, + tabledata "Payment Order" = R, + tabledata "Posted Bill Group" = R, + tabledata "Posted Cartera Doc." = R, + tabledata "Posted Payment Order" = R; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTGLJournalsEdit.PermissionSetExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTGLJournalsEdit.PermissionSetExt.al new file mode 100644 index 00000000000..decba6b6474 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTGLJournalsEdit.PermissionSetExt.al @@ -0,0 +1,24 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Security.AccessControl; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +permissionsetextension 7000104 "CRT GL Journals - Edit" extends "General Ledger Journals - Edit" +{ + Permissions = tabledata "Bill Group" = R, + tabledata "Cartera Doc." = R, + tabledata "Closed Bill Group" = R, + tabledata "Closed Cartera Doc." = R, + tabledata "Closed Payment Order" = R, + tabledata "Payment Order" = R, + tabledata "Posted Bill Group" = R, + tabledata "Posted Cartera Doc." = R, + tabledata "Posted Payment Order" = R; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTGlobalDimMgt.PermissionSetExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTGlobalDimMgt.PermissionSetExt.al new file mode 100644 index 00000000000..7e145bb87d0 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTGlobalDimMgt.PermissionSetExt.al @@ -0,0 +1,14 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Security.AccessControl; + +using Microsoft.Finance.ReceivablesPayables; + +permissionsetextension 7000102 "CRT GLOBAL DIM MGT" extends "D365 GLOBAL DIM MGT" +{ + Permissions = tabledata "Cartera Doc." = RM, + tabledata "Closed Cartera Doc." = RM, + tabledata "Posted Cartera Doc." = RM; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTLOCAL.PermissionSetExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTLOCAL.PermissionSetExt.al new file mode 100644 index 00000000000..91b7c154fc6 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTLOCAL.PermissionSetExt.al @@ -0,0 +1,36 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Security.AccessControl; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +permissionsetextension 7000100 "CRT LOCAL" extends "LOCAL" +{ + Permissions = tabledata "BG/PO Comment Line" = RIMD, + tabledata "BG/PO Post. Buffer" = RIMD, + tabledata "Bill Group" = RIMD, + tabledata "Cartera Doc." = RIMd, + tabledata "Cartera Report Selections" = RIMD, + tabledata "Cartera Setup" = RIMD, + tabledata "Closed Bill Group" = RIMd, + tabledata "Closed Cartera Doc." = RIMd, + tabledata "Closed Payment Order" = RIMd, + tabledata "Customer Rating" = RIMD, + tabledata "Doc. Post. Buffer" = RIMD, + tabledata "Fee Range" = RIMD, + tabledata Installment = RIMD, + tabledata "Non-Payment Period" = RIMD, + tabledata "Operation Fee" = RIMD, + tabledata "Payment Day" = RIMD, + tabledata "Payment Order" = RIMD, + tabledata "Posted Bill Group" = RIMd, + tabledata "Posted Cartera Doc." = RIMd, + tabledata "Posted Payment Order" = RIMd, + tabledata Suffix = RIMD; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTLOCALREAD.PermissionSetExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTLOCALREAD.PermissionSetExt.al new file mode 100644 index 00000000000..a4fc8362364 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Permissions/CRTLOCALREAD.PermissionSetExt.al @@ -0,0 +1,36 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Security.AccessControl; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +permissionsetextension 7000101 "CRT LOCAL READ" extends "LOCAL READ" +{ + Permissions = tabledata "BG/PO Comment Line" = R, + tabledata "BG/PO Post. Buffer" = R, + tabledata "Bill Group" = R, + tabledata "Cartera Doc." = R, + tabledata "Cartera Report Selections" = R, + tabledata "Cartera Setup" = R, + tabledata "Closed Bill Group" = R, + tabledata "Closed Cartera Doc." = R, + tabledata "Closed Payment Order" = R, + tabledata "Customer Rating" = R, + tabledata "Doc. Post. Buffer" = R, + tabledata "Fee Range" = R, + tabledata Installment = R, + tabledata "Non-Payment Period" = R, + tabledata "Operation Fee" = R, + tabledata "Payment Day" = R, + tabledata "Payment Order" = R, + tabledata "Posted Bill Group" = R, + tabledata "Posted Cartera Doc." = R, + tabledata "Posted Payment Order" = R, + tabledata Suffix = R; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseCreditMemo.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseCreditMemo.PageExt.al new file mode 100644 index 00000000000..79858656d2f --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseCreditMemo.PageExt.al @@ -0,0 +1,31 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Document; + +using Microsoft.Purchases.Payables; + +pageextension 7000172 "CRT Purchase Credit Memo" extends "Purchase Credit Memo" +{ + layout + { + addafter("Applies-to Doc. No.") + { + field("Applies-to Bill No."; Rec."Applies-to Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if you want to settle an open payable bill with a credit memo from a vendor.'; + } + } + addafter(Control1904651607) + { + part(Control1903433907; "Cartera Payables Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Pay-to Vendor No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseInvoice.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseInvoice.PageExt.al new file mode 100644 index 00000000000..27ca80ac076 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseInvoice.PageExt.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Document; + +using Microsoft.Purchases.Payables; + +pageextension 7000178 "CRT Purchase Invoice" extends "Purchase Invoice" +{ + layout + { + addafter(Control1904651607) + { + part(Control1903433907; "Cartera Payables Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Pay-to Vendor No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseOrder.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseOrder.PageExt.al new file mode 100644 index 00000000000..702828dd598 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseOrder.PageExt.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Document; + +using Microsoft.Purchases.Payables; + +pageextension 7000177 "CRT Purchase Order" extends "Purchase Order" +{ + layout + { + addafter(Control1904651607) + { + part(Control1903433907; "Cartera Payables Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Pay-to Vendor No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseQuote.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseQuote.PageExt.al new file mode 100644 index 00000000000..466d57c580d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseQuote.PageExt.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Document; + +using Microsoft.Purchases.Payables; + +pageextension 7000176 "CRT Purchase Quote" extends "Purchase Quote" +{ + layout + { + addafter(Control1904651607) + { + part(Control1903433907; "Cartera Payables Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Pay-to Vendor No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseReturnOrder.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseReturnOrder.PageExt.al new file mode 100644 index 00000000000..6079a0d7561 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Document/CRTPurchaseReturnOrder.PageExt.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Document; + +using Microsoft.Purchases.Payables; + +pageextension 7000175 "CRT Purchase Return Order" extends "Purchase Return Order" +{ + layout + { + addafter(IncomingDocAttachFactBox) + { + part(Control1903433907; "Cartera Payables Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Pay-to Vendor No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchCrMemoHdr.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchCrMemoHdr.Codeunit.al new file mode 100644 index 00000000000..3f512549e67 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchCrMemoHdr.Codeunit.al @@ -0,0 +1,19 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Purchases.Payables; + +codeunit 7000101 "CRT Purch. Cr. Memo Hdr." +{ + Access = Internal; + + [EventSubscriber(ObjectType::Table, Database::"Purch. Cr. Memo Hdr.", 'OnLookupAppliesToDocNoOnAfterSetFilters', '', false, false)] + local procedure OnLookupAppliesToDocNoOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.") + begin + VendLedgEntry.SetRange("Bill No.", PurchCrMemoHeader."Applies-to Bill No."); + end; + +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchCrMemoHdr.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchCrMemoHdr.TableExt.al new file mode 100644 index 00000000000..ca1147bf931 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchCrMemoHdr.TableExt.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +tableextension 7000093 "CRT Purch. Cr. Memo Hdr." extends "Purch. Cr. Memo Hdr." +{ + fields + { + field(7000000; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchInvHeader.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchInvHeader.Codeunit.al new file mode 100644 index 00000000000..7d0e49a9a42 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchInvHeader.Codeunit.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Purchases.Payables; + +codeunit 7000106 "CRT Purch. Inv. Header" +{ + Access = Internal; + + [EventSubscriber(ObjectType::Table, Database::"Purch. Inv. Header", 'OnLookupAppliesToDocNoOnAfterSetFilters', '', false, false)] + local procedure OnLookupAppliesToDocNoOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchInvHeader: Record "Purch. Inv. Header") + begin + VendLedgEntry.SetRange("Bill No.", PurchInvHeader."Applies-to Bill No."); + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchInvHeader.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchInvHeader.TableExt.al new file mode 100644 index 00000000000..0c166d2cc1e --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchInvHeader.TableExt.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +tableextension 7000094 "CRT Purch. Inv. Header" extends "Purch. Inv. Header" +{ + fields + { + field(7000000; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchRcptHeader.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchRcptHeader.Codeunit.al new file mode 100644 index 00000000000..08a3bf5acaf --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchRcptHeader.Codeunit.al @@ -0,0 +1,19 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Purchases.Payables; + +codeunit 7000102 "CRT Purch. Rcpt. Header" +{ + Access = Internal; + + [EventSubscriber(ObjectType::Table, Database::"Purch. Rcpt. Header", 'OnLookupAppliesToDocNoOnAfterSetFilters', '', true, true)] + local procedure OnLookupAppliesToDocNoOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchRcptHeader: Record "Purch. Rcpt. Header") + begin + VendLedgEntry.SetRange("Bill No.", PurchRcptHeader."Applies-to Bill No."); + end; + +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchRcptHeader.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchRcptHeader.TableExt.al new file mode 100644 index 00000000000..5708ef334a7 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/CRTPurchRcptHeader.TableExt.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +tableextension 7000095 "CRT Purch. Rcpt. Header" extends "Purch. Rcpt. Header" +{ + fields + { + field(7000000; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPOAnalysisLCYFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPOAnalysisLCYFactBox.Page.al new file mode 100644 index 00000000000..0434bae7121 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPOAnalysisLCYFactBox.Page.al @@ -0,0 +1,174 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Finance.ReceivablesPayables; + +page 35299 "Post. PO Analysis LCY Fact Box" +{ + Caption = 'Post. PO Analysis LCY Fact Box'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SourceTable = "Posted Payment Order"; + + layout + { + area(content) + { + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code associated with this posted payment order.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this posted payment order.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; + } + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoOpen; NoOpen) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + group("Amount (LCY)") + { + Caption = 'Amount (LCY)'; + field(OpenAmtLCY; OpenAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmtLCY; HonoredAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(RejectedAmtLCY; RejectedAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmtLCY; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + PostedDoc: Record "Posted Cartera Doc."; + OpenAmt: Decimal; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + OpenAmtLCY: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoOpen: Integer; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); + PostedDoc.SetRange(Type, PostedDoc.Type::Payable); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); + Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + OpenAmt := PostedDoc."Amount for Collection"; + OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoOpen := PostedDoc.Count; + + PostedDoc.SetRange(Status); + PostedDoc.SetRange(Redrawn, true); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := PostedDoc."Amount for Collection"; + RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRedrawn := PostedDoc.Count; + PostedDoc.SetRange(Redrawn); + + PostedDoc.SetRange(Status, PostedDoc.Status::Honored); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; + HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; + NoHonored := PostedDoc.Count - NoRedrawn; + + PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RejectedAmt := PostedDoc."Amount for Collection"; + RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRejected := PostedDoc.Count; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPOAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPOAnalysisNonLCYFB.Page.al new file mode 100644 index 00000000000..3677c68a7bc --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPOAnalysisNonLCYFB.Page.al @@ -0,0 +1,174 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Finance.ReceivablesPayables; + +page 35300 "Post. PO Analysis Non LCY FB" +{ + Caption = 'Post. PO Analysis Non LCY FB'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SourceTable = "Posted Payment Order"; + + layout + { + area(content) + { + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code associated with this posted payment order.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this posted payment order.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; + } + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoOpen; NoOpen) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + group(Amount) + { + Caption = 'Amount'; + field(OpenAmt; OpenAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmt; HonoredAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(RejectedAmt; RejectedAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmt; RedrawnAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + PostedDoc: Record "Posted Cartera Doc."; + OpenAmt: Decimal; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + OpenAmtLCY: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoOpen: Integer; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); + PostedDoc.SetRange(Type, PostedDoc.Type::Payable); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); + Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + OpenAmt := PostedDoc."Amount for Collection"; + OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoOpen := PostedDoc.Count; + + PostedDoc.SetRange(Status); + PostedDoc.SetRange(Redrawn, true); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := PostedDoc."Amount for Collection"; + RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRedrawn := PostedDoc.Count; + PostedDoc.SetRange(Redrawn); + + PostedDoc.SetRange(Status, PostedDoc.Status::Honored); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; + HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; + NoHonored := PostedDoc.Count - NoRedrawn; + + PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RejectedAmt := PostedDoc."Amount for Collection"; + RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRejected := PostedDoc.Count; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPaymentOrdersAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPaymentOrdersAnalysis.Page.al new file mode 100644 index 00000000000..aaf04bd4a5c --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPaymentOrdersAnalysis.Page.al @@ -0,0 +1,241 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000059 "Post. Payment Orders Analysis" +{ + Caption = 'Post. Payment Orders Analysis'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SourceTable = "Posted Payment Order"; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field("Category Filter"; Rec."Category Filter") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a category filter for the documents included in this posted payment order.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + } + group(Control16) + { + ShowCaption = false; + fixed(Control1902454701) + { + ShowCaption = false; + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoOpen; NoOpen) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code associated with this posted payment order.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this posted payment order.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; + } + } + group(Amount) + { + Caption = 'Amount'; + field(OpenAmt; OpenAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmt; HonoredAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Closed'; + Editable = false; + ToolTip = 'Specifies if the document is closed.'; + } + field(RejectedAmt; RejectedAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmt; RedrawnAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + group("Amount (LCY)") + { + Caption = 'Amount (LCY)'; + field(OpenAmtLCY; OpenAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmtLCY; HonoredAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Closed'; + Editable = false; + ToolTip = 'Specifies if the document is closed.'; + } + field(RejectedAmtLCY; RejectedAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmtLCY; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + PostedDoc: Record "Posted Cartera Doc."; + OpenAmt: Decimal; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + OpenAmtLCY: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoOpen: Integer; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); + PostedDoc.SetRange(Type, PostedDoc.Type::Payable); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); + Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + OpenAmt := PostedDoc."Amount for Collection"; + OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoOpen := PostedDoc.Count; + + PostedDoc.SetRange(Status); + PostedDoc.SetRange(Redrawn, true); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := PostedDoc."Amount for Collection"; + RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRedrawn := PostedDoc.Count; + PostedDoc.SetRange(Redrawn); + + PostedDoc.SetRange(Status, PostedDoc.Status::Honored); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; + HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; + NoHonored := PostedDoc.Count - NoRedrawn; + + PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RejectedAmt := PostedDoc."Amount for Collection"; + RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRejected := PostedDoc.Count; + end; + + local procedure CategoryFilterOnAfterValidate() + begin + UpdateStatistics(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPmtOrdMaturityLin.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPmtOrdMaturityLin.Page.al new file mode 100644 index 00000000000..a214eb0255f --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostPmtOrdMaturityLin.Page.al @@ -0,0 +1,139 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Enums; +using Microsoft.Foundation.Period; +using System.Utilities; + +page 7000058 "Post. Pmt. Ord. Maturity Lin." +{ + Caption = 'Lines'; + PageType = ListPart; + SourceTable = Date; + + layout + { + area(content) + { + repeater(Control1) + { + Editable = false; + ShowCaption = false; + field("Period Start"; Rec."Period Start") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the starting date of the period that you want to view.'; + } + field("Period Name"; Rec."Period Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the period shown on the line.'; + } + field(DocAmount; DocAmount) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = PostedPmtOrd."Currency Code"; + AutoFormatType = 1; + Caption = 'Amount'; + DrillDown = true; + ToolTip = 'Specifies the amount for the posted payment order for the period.'; + + trigger OnDrillDown() + begin + ShowDocEntries(); + end; + } + field(DocAmountLCY; DocAmountLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount (LCY)'; + DrillDown = true; + ToolTip = 'Specifies the amount for the posted payment order for the period.'; + + trigger OnDrillDown() + begin + ShowDocEntries(); + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + SetDateFilter(); + if PostedPmtOrd."No." <> '' then begin + PostedPmtOrd.CalcFields("Amount Grouped", "Amount Grouped (LCY)"); + DocAmount := PostedPmtOrd."Amount Grouped"; + DocAmountLCY := PostedPmtOrd."Amount Grouped (LCY)"; + end else begin + DocAmount := 0; + DocAmountLCY := 0; + end; + end; + + trigger OnFindRecord(Which: Text): Boolean + begin + exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); + end; + + trigger OnNextRecord(Steps: Integer): Integer + begin + exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); + end; + + trigger OnOpenPage() + begin + Rec.Reset(); + end; + + var + PostedPmtOrd: Record "Posted Payment Order"; + PostedDoc: Record "Posted Cartera Doc."; + PeriodPageManagement: Codeunit PeriodPageManagement; + PeriodLength: Enum "Analysis Period Type"; + AmountType: Enum "Analysis Amount Type"; + DocAmount: Decimal; + DocAmountLCY: Decimal; + + [Scope('OnPrem')] + procedure Set(var NewPostedPmtOrd: Record "Posted Payment Order"; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") + begin + PostedPmtOrd.Copy(NewPostedPmtOrd); + PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); + AmountType := "Analysis Amount Type".FromInteger(NewAmountType); + CurrPage.Update(false); + end; + + [Scope('OnPrem')] + procedure SetDateFilter() + begin + if AmountType = AmountType::"Net Change" then + PostedPmtOrd.SetRange("Due Date Filter", Rec."Period Start", Rec."Period End") + else + PostedPmtOrd.SetRange("Due Date Filter", 0D, Rec."Period End"); + end; + + local procedure ShowDocEntries() + begin + SetDateFilter(); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", PostedPmtOrd."No."); + PostedDoc.SetRange("Collection Agent", PostedDoc."Collection Agent"::Bank); + PostedDoc.SetFilter("Due Date", PostedPmtOrd.GetFilter("Due Date Filter")); + PostedDoc.SetFilter("Global Dimension 1 Code", PostedPmtOrd.GetFilter("Global Dimension 1 Filter")); + PostedDoc.SetFilter("Global Dimension 2 Code", PostedPmtOrd.GetFilter("Global Dimension 2 Filter")); + PostedDoc.SetFilter("Category Code", PostedPmtOrd.GetFilter("Category Filter")); + PAGE.RunModal(0, PostedDoc); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrder.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrder.Table.al new file mode 100644 index 00000000000..bab77954500 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrder.Table.al @@ -0,0 +1,244 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +table 7000021 "Posted Payment Order" +{ + Caption = 'Posted Payment Order'; + DrillDownPageID = "Posted Payment Orders List"; + LookupPageID = "Posted Payment Orders List"; + DataClassification = CustomerContent; + + fields + { + field(2; "No."; Code[20]) + { + Caption = 'No.'; + } + field(3; "Bank Account No."; Code[20]) + { + Caption = 'Bank Account No.'; + TableRelation = "Bank Account"; + } + field(4; "Bank Account Name"; Text[100]) + { + CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); + Caption = 'Bank Account Name'; + Editable = false; + FieldClass = FlowField; + } + field(5; "Posting Description"; Text[100]) + { + Caption = 'Posting Description'; + } + field(7; Amount; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Amount'; + Editable = false; + FieldClass = FlowField; + } + field(8; "Reason Code"; Code[10]) + { + Caption = 'Reason Code'; + TableRelation = "Reason Code"; + } + field(9; "No. Printed"; Integer) + { + Caption = 'No. Printed'; + } + field(10; "Posting Date"; Date) + { + Caption = 'Posting Date'; + } + field(11; Comment; Boolean) + { + CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), + Type = filter(Payable))); + Caption = 'Comment'; + Editable = false; + FieldClass = FlowField; + } + field(12; "Category Filter"; Code[10]) + { + Caption = 'Category Filter'; + FieldClass = FlowFilter; + TableRelation = "Category Code"; + ValidateTableRelation = false; + } + field(13; "Due Date Filter"; Date) + { + Caption = 'Due Date Filter'; + FieldClass = FlowFilter; + } + field(14; "Global Dimension 1 Filter"; Code[20]) + { + CaptionClass = '1,3,1'; + Caption = 'Global Dimension 1 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(15; "Global Dimension 2 Filter"; Code[20]) + { + CaptionClass = '1,3,2'; + Caption = 'Global Dimension 2 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(16; "Amount Grouped"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Amount Grouped'; + Editable = false; + FieldClass = FlowField; + } + field(17; "Remaining Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Remaining Amount'; + Editable = false; + FieldClass = FlowField; + } + field(18; "Status Filter"; Enum "Cartera Document Status") + { + Caption = 'Status Filter'; + FieldClass = FlowFilter; + } + field(29; "Payment Order Expenses Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Payment Order Expenses Amt.'; + } + field(33; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + Editable = false; + TableRelation = Currency; + } + field(34; "Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Amount (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(35; "Amount Grouped (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Amt. for Collection (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Amount Grouped (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(36; "Remaining Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Remaining Amount (LCY)'; + Editable = false; + FieldClass = FlowField; + } + } + + keys + { + key(Key1; "No.") + { + Clustered = true; + } + key(Key2; "Bank Account No.", "Posting Date") + { + SumIndexFields = "Payment Order Expenses Amt."; + } + key(Key3; "Bank Account No.", "Posting Date", "Currency Code") + { + SumIndexFields = "Payment Order Expenses Amt."; + } + } + + fieldgroups + { + } + + var + Text1100000: Label 'untitled'; + PostedPmtOrd: Record "Posted Payment Order"; + + [Scope('OnPrem')] + procedure PrintRecords(ShowRequestForm: Boolean) + var + CarteraReportSelection: Record "Cartera Report Selections"; + begin + PostedPmtOrd.Copy(Rec); + CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Posted Payment Order"); + CarteraReportSelection.SetFilter("Report ID", '<>0'); + CarteraReportSelection.Find('-'); + repeat + REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, PostedPmtOrd); + until CarteraReportSelection.Next() = 0; + end; + + procedure Caption(): Text + begin + if "No." = '' then + exit(Text1100000); + CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrderListing.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrderListing.Report.al new file mode 100644 index 00000000000..bdc35698d0f --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrderListing.Report.al @@ -0,0 +1,414 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Vendor; +using System.Utilities; + +report 7000011 "Posted Payment Order Listing" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Purchases/History/PostedPaymentOrderListing.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Order Listing'; + Permissions = TableData "Posted Payment Order" = r; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(PostedPmtOrd; "Posted Payment Order") + { + DataItemTableView = sorting("No."); + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + column(PostedPmtOrd_No_; "No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(PostedPmtOrd__No__; PostedPmtOrd."No.") + { + } + column(STRSUBSTNO_Text1100001_CopyText_; StrSubstNo(Text1100001, CopyText)) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") + { + } + column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") + { + } + column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") + { + } + column(PostedPmtOrd__Posting_Date_; Format(PostedPmtOrd."Posting Date")) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(PostedPmtOrd__Currency_Code_; PostedPmtOrd."Currency Code") + { + } + column(PrintAmountsInLCY; PrintAmountsInLCY) + { + } + column(OutputNo; OutputNo) + { + } + column(PageLoop_Number; Number) + { + } + column(PostedPmtOrd__No__Caption; PostedPmtOrd__No__CaptionLbl) + { + } + column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) + { + } + column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) + { + } + column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) + { + } + column(PostedPmtOrd__Posting_Date_Caption; PostedPmtOrd__Posting_Date_CaptionLbl) + { + } + column(PostedPmtOrd__Currency_Code_Caption; PostedPmtOrd__Currency_Code_CaptionLbl) + { + } + column(PageCaption; PageCaptionLbl) + { + } + dataitem(PostedDoc; "Posted Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = PostedPmtOrd; + DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where("Collection Agent" = const(Bank), Type = const(Payable)); + column(AmtForCollection; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmtForCollection_Control32; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Vendor_City; Vendor.City) + { + } + column(Vendor_County; Vendor.County) + { + } + column(Vendor__Post_Code_; Vendor."Post Code") + { + } + column(Vendor_Name; Vendor.Name) + { + } + column(PostedDoc__Account_No__; "Account No.") + { + } + column(PostedDoc__Honored_Rejtd__at_Date_; "Honored/Rejtd. at Date") + { + } + column(PostedDoc_Status; Status) + { + } + column(PostedDoc__Document_No__; "Document No.") + { + } + column(PostedDoc__Document_Type_; "Document Type") + { + } + column(PostedDoc__Due_Date_; Format("Due Date")) + { + } + column(Vendor_Name_Control28; Vendor.Name) + { + } + column(Vendor_City_Control30; Vendor.City) + { + } + column(AmtForCollection_Control31; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Vendor_County_Control35; Vendor.County) + { + } + column(PostedDoc__Document_No___Control3; "Document No.") + { + } + column(PostedDoc__No__; "No.") + { + } + column(Vendor__Post_Code__Control9; Vendor."Post Code") + { + } + column(PostedDoc_Status_Control78; Status) + { + } + column(PostedDoc__Honored_Rejtd__at_Date__Control80; "Honored/Rejtd. at Date") + { + } + column(PostedDoc__Due_Date__Control8; Format("Due Date")) + { + } + column(PostedDoc__Account_No___Control1; "Account No.") + { + } + column(PostedDoc__Document_Type__Control23; "Document Type") + { + } + column(AmtForCollection_Control36; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmtForCollection_Control39; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(PostedDoc_Type; Type) + { + } + column(PostedDoc_Entry_No_; "Entry No.") + { + } + column(PostedDoc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") + { + } + column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) + { + } + column(Document_No_Caption; Document_No_CaptionLbl) + { + } + column(Bill_No_Caption; Bill_No_CaptionLbl) + { + } + column(Vendor_Name_Control28Caption; Vendor_Name_Control28CaptionLbl) + { + } + column(Vendor__Post_Code__Control9Caption; Vendor__Post_Code__Control9CaptionLbl) + { + } + column(Vendor_City_Control30Caption; Vendor_City_Control30CaptionLbl) + { + } + column(AmtForCollection_Control31Caption; AmtForCollection_Control31CaptionLbl) + { + } + column(Vendor_County_Control35Caption; Vendor_County_Control35CaptionLbl) + { + } + column(PostedDoc_Status_Control78Caption; FieldCaption(Status)) + { + } + column(PostedDoc__Honored_Rejtd__at_Date__Control80Caption; FieldCaption("Honored/Rejtd. at Date")) + { + } + column(PostedDoc__Due_Date__Control8Caption; PostedDoc__Due_Date__Control8CaptionLbl) + { + } + column(PostedDoc__Account_No___Control1Caption; PostedDoc__Account_No___Control1CaptionLbl) + { + } + column(PostedDoc__Document_Type__Control23Caption; FieldCaption("Document Type")) + { + } + column(ContinuedCaption; ContinuedCaptionLbl) + { + } + column(EmptyStringCaption; EmptyStringCaptionLbl) + { + } + column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + Vendor.Get("Account No."); + if PrintAmountsInLCY then + AmtForCollection := "Amt. for Collection (LCY)" + else + AmtForCollection := "Amount for Collection"; + end; + + trigger OnPreDataItem() + begin + Clear(AmtForCollection); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then + CopyText := Text1100000; + OutputNo := OutputNo + 1; + end; + + trigger OnPreDataItem() + begin + NoOfLoops := Abs(NoOfCopies) + 1; + CopyText := ''; + SetRange(Number, 1, NoOfLoops); + + OutputNo := 1; + end; + } + + trigger OnAfterGetRecord() + begin + BankAcc.Get(PostedPmtOrd."Bank Account No."); + FormatAddress.FormatAddr( + BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", + BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + FormatAddress.Company(CompanyAddr, CompanyInfo); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Copies'; + ToolTip = 'Specifies how many copies of the document to print.'; + } + field(PrintAmountsInLCY; PrintAmountsInLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show amounts in LCY'; + ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + Text1100000: Label 'COPY'; + Text1100001: Label 'Payment Order %1'; + CompanyInfo: Record "Company Information"; + BankAcc: Record "Bank Account"; + Vendor: Record Vendor; + FormatAddress: Codeunit "Format Address"; + BankAccAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + NoOfLoops: Integer; + NoOfCopies: Integer; + CopyText: Text[30]; + PrintAmountsInLCY: Boolean; + AmtForCollection: Decimal; + OutputNo: Integer; + PostedPmtOrd__No__CaptionLbl: Label 'Payment Order No.'; + CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; + CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; + CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; + PostedPmtOrd__Posting_Date_CaptionLbl: Label 'Date'; + PostedPmtOrd__Currency_Code_CaptionLbl: Label 'Currency Code'; + PageCaptionLbl: Label 'Page'; + All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; + Document_No_CaptionLbl: Label 'Document No.'; + Bill_No_CaptionLbl: Label 'Bill No.'; + Vendor_Name_Control28CaptionLbl: Label 'Name'; + Vendor__Post_Code__Control9CaptionLbl: Label 'Post Code'; + Vendor_City_Control30CaptionLbl: Label 'City /'; + AmtForCollection_Control31CaptionLbl: Label 'Amount for Collection'; + Vendor_County_Control35CaptionLbl: Label 'County'; + PostedDoc__Due_Date__Control8CaptionLbl: Label 'Due Date'; + PostedDoc__Account_No___Control1CaptionLbl: Label 'Vendor No.'; + ContinuedCaptionLbl: Label 'Continued'; + EmptyStringCaptionLbl: Label '/', Locked = true; + ContinuedCaption_Control15Lbl: Label 'Continued'; + TotalCaptionLbl: Label 'Total'; + + [Scope('OnPrem')] + procedure GetCurrencyCode(): Code[10] + begin + if PrintAmountsInLCY then + exit(''); + + exit(PostedDoc."Currency Code"); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrderListing.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrderListing.rdlc new file mode 100644 index 00000000000..7250213ae68 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrderListing.rdlc @@ -0,0 +1,2595 @@ + + + 0 + + + + SQL + + + None + f19ae7ed-0570-45ae-9fdc-fb2bc3080634 + + + + + + + + + + + 18.50001cm + + + + + 12.49197cm + + + + + + + + + + 1.4cm + + + 1.35cm + + + 1.35cm + + + 0.3cm + + + 0.7cm + + + 0.7cm + + + 1.9cm + + + 1.5cm + + + 3.3cm + + + 1.5cm + + + 2.6cm + + + 1.9cm + + + + + 0.423cm + + + + + true + true + + + + + =First(Fields!All_amounts_are_in_LCYCaption.Value) + + + + + + All_amounts_are_in_LCYCaption + 48 + + + 8 + + + + + + + + + + + + + true + true + + + + + + + + + + + textbox12 + 47 + + + 4 + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!PostedDoc__Due_Date__Control8Caption.Value) + + + + + + + 46 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_Type__Control23Caption.Value + + + + + + 45 + + + + + + + + true + + + + + =First(Fields!Document_No_Caption.Value) + + + + + + + 44 + + + + + + + + true + true + + + + + + + + + + + + textbox2 + 43 + + + + + + + + true + + + + + =First(Fields!Bill_No_Caption.Value) + + + + + + + 42 + + + + + + + + true + + + + + =First(Fields!PostedDoc_Status_Control78Caption.Value) + + + + + + 41 + + + + + + + + true + + + + + =First(Fields!PostedDoc__Honored_Rejtd__at_Date__Control80Caption.Value) + + + + + + + 40 + + + + + + + + true + + + + + =First(Fields!PostedDoc__Account_No___Control1Caption.Value) + + + + + + + 39 + + + + + + + + true + + + + + =First(Fields!Vendor_Name_Control28Caption.Value) + + + + + + 38 + + + + + + + + true + + + + + =First(Fields!Vendor__Post_Code__Control9Caption.Value) + + + + + + 37 + + + + + + + + true + + + + + =First(Fields!Vendor_City_Control30Caption.Value) + Chr(10) + First(Fields!Vendor_County_Control35Caption.Value) + + + + + + 36 + + + + + + + + true + + + + + =First(Fields!AmtForCollection_Control31Caption.Value) + + + + + + + 35 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + 0.425cm + + + + + true + + + + + =Fields!PostedDoc__Due_Date_.Value + + + + + + 33 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_Type_.Value + + + + + + 32 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_No__.Value + + + + + + + 31 + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + + + + + =Fields!PostedDoc_Status.Value + + + + + + 28 + + + + + + + + true + + + + + =Fields!PostedDoc__Honored_Rejtd__at_Date_.Value + + + + + + 27 + + + + + + + + true + + + + + =Fields!PostedDoc__Account_No__.Value + + + + + + + 26 + + + + + + + + true + + + + + =Fields!Vendor_Name.Value + + + + + + 25 + + + + + + + + true + + + + + =Fields!Vendor__Post_Code_.Value + + + + + + + 24 + + + + + + + + true + + + + + =Fields!Vendor_City.Value + + + + + + 23 + + + + + + + + true + true + + + + + =Fields!AmtForCollection.Value + + + + + + 22 + + + + + + + + 0.425cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + true + + + + + =Fields!Vendor_County.Value + + + + + + 20 + + + + + + + + true + + + + + + + + + + + + + 0.425cm + + + + + true + + + + + =Fields!PostedDoc__Due_Date_.Value + + + + + + 18 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_Type_.Value + + + + + + 17 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_No__.Value + + + + + + + 16 + + + + + + + + true + true + + + + + =Fields!EmptyStringCaption.Value + + + + + + + textbox6 + 15 + + + + + + + + true + + + + + = Fields!PostedDoc__No__.Value + + + + + + 14 + + + + + + + + true + + + + + =Fields!PostedDoc_Status.Value + + + + + + 13 + + + + + + + + true + + + + + =Fields!PostedDoc__Honored_Rejtd__at_Date_.Value + + + + + + 12 + + + + + + + + true + + + + + =Fields!PostedDoc__Account_No__.Value + + + + + + + 11 + + + + + + + + true + + + + + =Fields!Vendor_Name.Value + + + + + + 10 + + + + + + + + true + + + + + =Fields!Vendor__Post_Code_.Value + + + + + + + 9 + + + + + + + + true + + + + + =Fields!Vendor_City.Value + + + + + + 8 + + + + + + + + true + true + + + + + =Fields!AmtForCollection.Value + + + + + + 7 + + + + + + + + 0.425cm + + + + + true + true + + + + + + + + 10 + + + + + + + + + + + + + + + true + + + + + =Fields!Vendor_County.Value + + + + + + 1 + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!TotalCaption.Value) + + + + + + 6 + + + 5 + + + + + + + + + + true + true + + + + + + + + + + + textbox62 + 5 + + + 6 + + + + + + + + + + + true + true + + + + + =Sum(Fields!AmtForCollection.Value) + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =IIF(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) + + After + true + true + + + After + true + true + + + + + =1 + + + + + + + Fields!PostedPmtOrd__No__.Value + =Fields!OutputNo.Value + + + + + After + true + true + + + + Detail + + + + + =IIF(Fields!PostedDoc__Document_Type_.Value="Bill",TRUE,FALSE) + + + + + =IIF(Fields!PostedDoc__Document_Type_.Value="Bill",TRUE,FALSE) + + + + + =IIF(Fields!PostedDoc__Document_Type_.Value="Bill",FALSE,TRUE) + + + + + =IIF(Fields!PostedDoc__Document_Type_.Value="Bill",FALSE,TRUE) + + + + Detail_Collection + Output + true + + + + + Before + true + + + Before + true + + + + + + DataSet_Result + 8.25397cm + 27 + + + true + + + + + =Fields!BankAccAddr_7_.Value + + + + + + 3.80952cm + 0.423cm + 7.61905cm + 26 + + + + true + + + + + =Fields!PostedPmtOrd__No__.Value + + + + + + + 5.50152cm + 15.2381cm + 0.423cm + 2.99048cm + 25 + + + + true + + + + + =Fields!STRSUBSTNO_Text1100001_CopyText_.Value + + + + + + 0.00252cm + 12.0881cm + 0.423cm + 24 + + + + true + + + + + =Fields!CompanyAddr_1_.Value + + + + + + 1.27152cm + 12.0881cm + 0.423cm + 23 + + + + true + + + + + =Fields!CompanyAddr_2_.Value + + + + + + 1.69452cm + 12.0881cm + 0.423cm + 22 + + + + true + + + + + =Fields!CompanyAddr_3_.Value + + + + + + 2.11752cm + 12.0881cm + 0.423cm + 21 + + + + true + + + + + =Fields!CompanyAddr_4_.Value + + + + + + 2.54052cm + 12.0881cm + 0.423cm + 20 + + + + true + + + + + =Fields!CompanyAddr_5_.Value + + + + + + 2.96352cm + 12.0881cm + 0.423cm + 19 + + + + true + + + + + =Fields!CompanyAddr_6_.Value + + + + + + 3.38652cm + 12.0881cm + 0.423cm + 18 + + + + true + + + + + =Fields!CompanyInfo__Phone_No__.Value + + + + + + 3.80952cm + 14.1881cm + 0.423cm + 17 + + + + true + + + + + =Fields!CompanyInfo__Fax_No__.Value + + + + + + 4.23252cm + 14.1881cm + 0.423cm + 16 + + + + true + + + + + =Fields!CompanyInfo__VAT_Registration_No__.Value + + + + + + 4.65552cm + 14.1881cm + 0.423cm + 15 + + + + true + + + + + =Fields!PostedPmtOrd__Posting_Date_.Value + + + + + + + 7.19352cm + 15.2381cm + 0.423cm + 2.99048cm + 14 + + + + true + + + + + =Fields!BankAccAddr_4_.Value + + + + + + 2.54052cm + 0.423cm + 7.61905cm + 13 + + + + true + + + + + =Fields!BankAccAddr_5_.Value + + + + + + 2.96352cm + 0.423cm + 7.61905cm + 12 + + + + true + + + + + =Fields!BankAccAddr_6_.Value + + + + + + 3.38652cm + 0.423cm + 7.61905cm + 11 + + + + true + + + + + =Fields!BankAccAddr_3_.Value + + + + + + 2.11752cm + 0.423cm + 7.61905cm + 9 + + + + true + + + + + =Fields!BankAccAddr_2_.Value + + + + + + 1.69452cm + 0.423cm + 7.61905cm + 8 + + + + true + + + + + =Fields!BankAccAddr_1_.Value + + + + + + 1.27152cm + 0.423cm + 7.61905cm + 7 + + + + true + + + + + =Fields!PostedPmtOrd__Currency_Code_.Value + + + + + + + 5.92452cm + 15.2381cm + 0.423cm + 2.99048cm + 6 + + + + true + + + + + =Fields!PostedPmtOrd__No__Caption.Value + + + + + + 5.50152cm + 12.0881cm + 0.423cm + 3cm + 5 + + + + true + + + + + =Fields!CompanyInfo__Phone_No__Caption.Value + + + + + + 3.80952cm + 12.0881cm + 0.423cm + 1.89cm + 4 + + + + true + + + + + =Fields!CompanyInfo__Fax_No__Caption.Value + + + + + + 4.23252cm + 12.0881cm + 0.423cm + 1.89cm + 3 + + + + true + + + + + =Fields!CompanyInfo__VAT_Registration_No__Caption.Value + + + + + + 4.65552cm + 12.0881cm + 0.423cm + 1.89cm + 2 + + + + true + + + + + =Fields!PostedPmtOrd__Posting_Date_Caption.Value + + + + + + 7.19352cm + 12.0881cm + 0.423cm + 3cm + 1 + + + + true + + + + + =Fields!PostedPmtOrd__Currency_Code_Caption.Value + + + + + + 5.92452cm + 12.0881cm + 0.423cm + 3cm + + + + true + + + + + + + + + + + + + + + + + + =Fields!PostedPmtOrd__No__.Value + =Fields!OutputNo.Value + + + Between + + + Output + true + + + + DataSet_Result + + End + + + + 12.49197cm + + 18.50001cm + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + + +Shared offset as Integer +Shared newPage as Object +Shared currentgroup1 as Object +Shared currentgroup2 as Object +Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object + If NewPage + offset = pagenumber - 1 + End If + Return pagenumber - offset +End Function + +Public Function IsNewPage(group1 as Object, group2 as Object) As Boolean +newPage = FALSE +If Not (group1 = currentgroup1) + newPage = TRUE + currentgroup1 = group1 + currentgroup2 = group2 + ELSE + If Not (group2 = currentgroup2) + newPage = TRUE + currentgroup2 = group2 + End If + End If + Return newPage +End Function + =User!Language + true + Invalid + 33d566bc-8b9e-434c-a911-4a72eee9beca + + + + + PostedPmtOrd_No_ + + + PostedPmtOrd__No__ + + + STRSUBSTNO_Text1100001_CopyText_ + + + CompanyAddr_1_ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyInfo__Phone_No__ + + + CompanyInfo__Fax_No__ + + + CompanyInfo__VAT_Registration_No__ + + + PostedPmtOrd__Posting_Date_ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + BankAccAddr_3_ + + + BankAccAddr_2_ + + + BankAccAddr_1_ + + + PostedPmtOrd__Currency_Code_ + + + PrintAmountsInLCY + + + OutputNo + + + PageLoop_Number + + + PostedPmtOrd__No__Caption + + + CompanyInfo__Phone_No__Caption + + + CompanyInfo__Fax_No__Caption + + + CompanyInfo__VAT_Registration_No__Caption + + + PostedPmtOrd__Posting_Date_Caption + + + PostedPmtOrd__Currency_Code_Caption + + + PageCaption + + + AmtForCollection + + + AmtForCollectionFormat + + + AmtForCollection_Control32 + + + AmtForCollection_Control32Format + + + Vendor_City + + + Vendor_County + + + Vendor__Post_Code_ + + + Vendor_Name + + + PostedDoc__Account_No__ + + + PostedDoc__Honored_Rejtd__at_Date_ + + + PostedDoc_Status + + + PostedDoc__Document_No__ + + + PostedDoc__Document_Type_ + + + PostedDoc__Due_Date_ + + + Vendor_Name_Control28 + + + Vendor_City_Control30 + + + AmtForCollection_Control31 + + + AmtForCollection_Control31Format + + + Vendor_County_Control35 + + + PostedDoc__Document_No___Control3 + + + PostedDoc__No__ + + + Vendor__Post_Code__Control9 + + + PostedDoc_Status_Control78 + + + PostedDoc__Honored_Rejtd__at_Date__Control80 + + + PostedDoc__Due_Date__Control8 + + + PostedDoc__Account_No___Control1 + + + PostedDoc__Document_Type__Control23 + + + AmtForCollection_Control36 + + + AmtForCollection_Control36Format + + + AmtForCollection_Control39 + + + AmtForCollection_Control39Format + + + PostedDoc_Type + + + PostedDoc_Entry_No_ + + + PostedDoc_Bill_Gr__Pmt__Order_No_ + + + All_amounts_are_in_LCYCaption + + + Document_No_Caption + + + Bill_No_Caption + + + Vendor_Name_Control28Caption + + + Vendor__Post_Code__Control9Caption + + + Vendor_City_Control30Caption + + + AmtForCollection_Control31Caption + + + Vendor_County_Control35Caption + + + PostedDoc_Status_Control78Caption + + + PostedDoc__Honored_Rejtd__at_Date__Control80Caption + + + PostedDoc__Due_Date__Control8Caption + + + PostedDoc__Account_No___Control1Caption + + + PostedDoc__Document_Type__Control23Caption + + + ContinuedCaption + + + EmptyStringCaption + + + ContinuedCaption_Control15 + + + TotalCaption + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrders.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrders.Page.al new file mode 100644 index 00000000000..21cfb641705 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrders.Page.al @@ -0,0 +1,252 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Navigate; +using Microsoft.Purchases.Payables; + +page 7000054 "Posted Payment Orders" +{ + Caption = 'Posted Payment Orders'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + PageType = Document; + RefreshOnActivate = true; + SourceTable = "Posted Payment Order"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("No."; Rec."No.") + { + ApplicationArea = All; + Editable = false; + ToolTip = 'Specifies the number of this posted payment order.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number or code of the bank where the posted payment order was delivered.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the name associated with the bank code or bank number where the posted payment order was delivered.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + Importance = Promoted; + ToolTip = 'Specifies the payment order posting date.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code associated with this posted payment order.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this posted payment order.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; + } + field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the grouped amount for this posted payment order.'; + } + field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the pending amounts yet to be paid for the documents associated with this posted payment order.'; + } + } + part(Docs; "Docs. in Posted PO Subform") + { + ApplicationArea = Basic, Suite; + SubPageLink = "Bill Gr./Pmt. Order No." = field("No."); + SubPageView = sorting("Bill Gr./Pmt. Order No.") + where(Type = const(Payable)); + } + group(Expenses) + { + Caption = 'Expenses'; + field("Payment Order Expenses Amt."; Rec."Payment Order Expenses Amt.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the amount to be paid for payable document expenses.'; + } + } + group(Auditing) + { + Caption = 'Auditing'; + field("Reason Code"; Rec."Reason Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; + } + field("No. Printed"; Rec."No. Printed") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of printed copies of this posted payment order.'; + } + } + } + area(factboxes) + { + part(Control1901420407; "Post. PO Analysis LCY Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433407; "Post. PO Analysis Non LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Pmt. O&rd.") + { + Caption = 'Pmt. O&rd.'; + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."), + Type = const(Payable); + ToolTip = 'View or create a comment.'; + } + separator(Action20) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Enabled = true; + Image = "Report"; + RunObject = Page "Post. Payment Orders Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action58) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Enabled = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + PostedPmtOrd.Copy(Rec); + PostedPmtOrd.SetRecFilter(); + REPORT.Run(REPORT::"Posted Payment Order Listing", true, false, PostedPmtOrd); + end; + end; + } + } + } + area(processing) + { + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Enabled = true; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + var + begin + Navigate.SetDoc(Rec."Posting Date", Rec."No."); + Navigate.Run(); + end; + } + action("Page Posted Payment Orders Maturity Process") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Posted Payment Orders Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Navigate_Promoted"; "&Navigate") + { + } + actionref("Page Posted Payment Orders Maturity Process_Promoted"; "Page Posted Payment Orders Maturity Process") + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + PostedPmtOrd: Record "Posted Payment Order"; + Navigate: Page Navigate; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersList.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersList.Page.al new file mode 100644 index 00000000000..118d7e1150f --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersList.Page.al @@ -0,0 +1,185 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000055 "Posted Payment Orders List" +{ + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders'; + CardPageID = "Posted Payment Orders"; + Editable = false; + PageType = List; + RefreshOnActivate = true; + SourceTable = "Posted Payment Order"; + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of this posted payment order.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank where the posted payment order was delivered.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name associated with the bank code or bank number where the posted payment order was delivered.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code associated with this posted payment order.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the sum total of the documents included in this posted payment order.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount of all of the documents included in this posted payment order.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; + } + field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amounts yet to be paid for the documents associated with this posted payment order.'; + } + } + } + area(factboxes) + { + part(Control1901420407; "Post. PO Analysis LCY Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433407; "Post. PO Analysis Non LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Pmt. O&rd.") + { + Caption = 'Pmt. O&rd.'; + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."), + Type = filter(Payable); + ToolTip = 'View or create a comment.'; + } + separator(Action21) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + RunObject = Page "Post. Payment Orders Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action24) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + PostedPmtOrd.Copy(Rec); + PostedPmtOrd.SetRecFilter(); + REPORT.Run(REPORT::"Posted Payment Order Listing", true, false, PostedPmtOrd); + end; + end; + } + } + } + area(processing) + { + action("Page Posted Payment Orders Maturity Process") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Posted Payment Orders Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("Page Posted Payment Orders Maturity Process_Promoted"; "Page Posted Payment Orders Maturity Process") + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + PostedPmtOrd: Record "Posted Payment Order"; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersMaturity.Page.al new file mode 100644 index 00000000000..ccd65ff352d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersMaturity.Page.al @@ -0,0 +1,188 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +page 7000057 "Posted Payment Orders Maturity" +{ + Caption = 'Posted Payment Orders Maturity'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + PageType = List; + SaveValues = true; + SourceTable = "Posted Payment Order"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Category Filter"; Rec."Category Filter") + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + } + group(Options) + { + Caption = 'Options'; + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View by'; + OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + if PeriodType = PeriodType::Period then + PeriodPeriodTypeOnValidate(); + if PeriodType = PeriodType::Year then + YearPeriodTypeOnValidate(); + if PeriodType = PeriodType::Quarter then + QuarterPeriodTypeOnValidate(); + if PeriodType = PeriodType::Month then + MonthPeriodTypeOnValidate(); + if PeriodType = PeriodType::Week then + WeekPeriodTypeOnValidate(); + if PeriodType = PeriodType::Day then + DayPeriodTypeOnValidate(); + end; + } + field(AmountType; AmountType) + { + ApplicationArea = Basic, Suite; + Caption = 'View as'; + OptionCaption = 'Net Change,Balance at Date'; + ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; + + trigger OnValidate() + begin + if AmountType = AmountType::"Balance at Date" then + BalanceatDateAmountTypeOnValid(); + if AmountType = AmountType::"Net Change" then + NetChangeAmountTypeOnValidate(); + end; + } + } + part(MaturityLines; "Post. Pmt. Ord. Maturity Lin.") + { + ApplicationArea = Basic, Suite; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateSubForm(); + end; + + trigger OnOpenPage() + begin + UpdateSubForm(); + end; + + var + PeriodType: Option Day,Week,Month,Quarter,Year,Period; + AmountType: Option "Net Change","Balance at Date"; + + local procedure UpdateSubForm() + begin + CurrPage.MaturityLines.PAGE.Set(Rec, PeriodType, AmountType); + end; + + local procedure DayPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure WeekPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure MonthPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure QuarterPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure YearPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure PeriodPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure BalanceatDateAmountTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure NetChangeAmountTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure DayPeriodTypeOnValidate() + begin + DayPeriodTypeOnPush(); + end; + + local procedure WeekPeriodTypeOnValidate() + begin + WeekPeriodTypeOnPush(); + end; + + local procedure MonthPeriodTypeOnValidate() + begin + MonthPeriodTypeOnPush(); + end; + + local procedure QuarterPeriodTypeOnValidate() + begin + QuarterPeriodTypeOnPush(); + end; + + local procedure YearPeriodTypeOnValidate() + begin + YearPeriodTypeOnPush(); + end; + + local procedure PeriodPeriodTypeOnValidate() + begin + PeriodPeriodTypeOnPush(); + end; + + local procedure NetChangeAmountTypeOnValidate() + begin + NetChangeAmountTypeOnPush(); + end; + + local procedure BalanceatDateAmountTypeOnValid() + begin + BalanceatDateAmountTypeOnPush(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersSelect.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersSelect.Page.al new file mode 100644 index 00000000000..97257758b45 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPaymentOrdersSelect.Page.al @@ -0,0 +1,385 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Navigate; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; +using System.Text; + +page 7000065 "Posted Payment Orders Select." +{ + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders'; + DeleteAllowed = false; + Editable = true; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Worksheet; + Permissions = TableData "Posted Bill Group" = rm; + SaveValues = true; + SourceTable = "Posted Payment Order"; + UsageCategory = Tasks; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(DueDateFilter; DueDateFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Due Date Filter'; + ToolTip = 'Specifies a due date or a range of due dates that documents must contain to be included in the selection.'; + + trigger OnValidate() + begin + DueDateFilterOnAfterValidate(); + end; + } + field(BankAccFilter; BankAccFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Bank Account Filter'; + TableRelation = "Bank Account"."No."; + ToolTip = 'Specifies which bank accounts the values are shown for.'; + + trigger OnValidate() + begin + BankAccFilterOnAfterValidate(); + end; + } + field(CurrCodeFilter; CurrCodeFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Currency Code Filter'; + TableRelation = Currency; + ToolTip = 'Specifies the currencies that the data is included for.'; + + trigger OnValidate() + begin + CurrCodeFilterOnAfterValidate(); + end; + } + } + repeater(Control1) + { + Editable = false; + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of this posted payment order.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank where the posted payment order was delivered.'; + } + field("Posting Description"; Rec."Posting Description") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the posting description related to this posted payment order.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment order posting date.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this posted payment order.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code associated with this posted payment order.'; + } + field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this posted payment order.'; + } + field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the pending amounts yet to be paid for the documents associated with this posted payment order.'; + } + } + group(Control49) + { + ShowCaption = false; + field(CurrTotalAmount; CurrTotalAmountLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Total Rmg. Amt. (LCY)'; + Editable = false; + ToolTip = 'Specifies the sum of amounts that remain to be paid.'; + Visible = CurrTotalAmountVisible; + + trigger OnValidate() + begin + CurrTotalAmountLCYOnAfterValid(); + end; + } + } + } + area(factboxes) + { + part(Control1901420407; "Post. PO Analysis LCY Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433407; "Post. PO Analysis Non LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Pmt. O&rd.") + { + Caption = 'Pmt. O&rd.'; + action(Card) + { + ApplicationArea = Basic, Suite; + Caption = 'Card'; + Image = EditLines; + RunObject = Page "Posted Payment Orders"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Status Filter" = field("Status Filter"); + ShortCutKey = 'Shift+F7'; + ToolTip = 'View or change detailed information about the record that is being processed on the document or journal line.'; + } + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."); + ToolTip = 'View or create a comment.'; + } + separator(Action39) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + RunObject = Page "Post. Payment Orders Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action44) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + PostedPmtOrd.Copy(Rec); + PostedPmtOrd.SetRecFilter(); + REPORT.Run(REPORT::"Posted Payment Order Listing", true, false, PostedPmtOrd); + end; + end; + } + } + } + area(processing) + { + group("F&unctions") + { + Caption = 'F&unctions'; + Image = "Action"; + action(BatchSettlement) + { + ApplicationArea = Basic, Suite; + Caption = 'Batch &Settlement'; + Ellipsis = true; + Image = ApplyEntries; + ToolTip = 'Fully settle the documents that are included in the selected posted bill groups.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(PostedPmtOrd2); + if not PostedPmtOrd2.Find('=><') then + exit; + REPORT.RunModal(Report::"Batch Settl. Posted POs", true, false, PostedPmtOrd2); + UpdateStatistics(); + CurrPage.Update(false); + end; + } + } + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + Navigate.SetDoc(Rec."Posting Date", Rec."No."); + Navigate.Run(); + end; + } + action("Posted Payment Orders Maturity") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Payment Orders Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Posted Payment Orders Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(BatchSettlement_Promoted; BatchSettlement) + { + } + actionref("&Navigate_Promoted"; "&Navigate") + { + } + actionref("Posted Payment Orders Maturity_Promoted"; "Posted Payment Orders Maturity") + { + } + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + trigger OnInit() + begin + CurrTotalAmountVisible := true; + end; + + trigger OnOpenPage() + begin + Rec.SetCurrentKey("Bank Account No.", "Posting Date", "Currency Code"); + CurrCodeFilter := Rec.GetFilter("Currency Code"); + BankAccFilter := Rec.GetFilter("Bank Account No."); + UpdateStatistics(); + end; + + var + PostedPmtOrd: Record "Posted Payment Order"; + PostedPmtOrd2: Record "Posted Payment Order"; + Navigate: Page Navigate; + CurrTotalAmountLCY: Decimal; + ShowCurrent: Boolean; + CurrCodeFilter: Code[250]; + BankAccFilter: Code[250]; + CurrTotalAmountVisible: Boolean; + DueDateFilter: Text[30]; + + procedure UpdateStatistics() + begin + PostedPmtOrd.Copy(Rec); + CurrTotalAmountLCY := 0; + UpdateStatistics2(PostedPmtOrd, CurrTotalAmountLCY, ShowCurrent); + CurrTotalAmountVisible := true; + end; + + procedure GetSelected(var NewPostedPmtOrd: Record "Posted Payment Order") + begin + CurrPage.SetSelectionFilter(NewPostedPmtOrd); + end; + + procedure UpdateStatistics2(var PostedPmtOrd2: Record "Posted Payment Order"; var CurrTotalAmount: Decimal; var ShowCurrent: Boolean) + begin + PostedPmtOrd2.SetCurrentKey("Bank Account No.", "Posting Date", "Currency Code"); + if PostedPmtOrd2.Find('-') then; + repeat + PostedPmtOrd2.CalcFields("Remaining Amount (LCY)"); + CurrTotalAmount := CurrTotalAmount + PostedPmtOrd2."Remaining Amount (LCY)"; + until PostedPmtOrd2.Next() = 0; + ShowCurrent := (CurrTotalAmount <> 0); + end; + + local procedure CurrTotalAmountLCYOnAfterValid() + begin + UpdateStatistics(); + end; + + local procedure CurrCodeFilterOnAfterValidate() + begin + Rec.SetFilter("Currency Code", CurrCodeFilter); + CurrPage.Update(false); + UpdateStatistics(); + end; + + local procedure BankAccFilterOnAfterValidate() + begin + Rec.SetFilter("Bank Account No.", BankAccFilter); + CurrPage.Update(false); + UpdateStatistics(); + end; + + local procedure DueDateFilterOnAfterValidate() + var + FilterTokens: Codeunit "Filter Tokens"; + begin + FilterTokens.MakeDateFilter(DueDateFilter); + Rec.SetFilter("Due Date Filter", DueDateFilter); + DueDateFilter := Rec.GetFilter("Due Date Filter"); + CurrPage.Update(false); + UpdateStatistics(); + Rec.SetFilter(Amount, '<>0'); + CurrPage.Update(false); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPurchCrMemoUpdate.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPurchCrMemoUpdate.Page.al new file mode 100644 index 00000000000..5a6061c67a6 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPurchCrMemoUpdate.Page.al @@ -0,0 +1,96 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.History; + +page 10767 "Posted Purch. Cr.Memo - Update" +{ + Caption = 'Posted Purch. Cr.Memo - Update'; + DeleteAllowed = false; + Editable = true; + InsertAllowed = false; + ModifyAllowed = true; + PageType = Card; + ShowFilter = false; + SourceTable = "Purch. Cr. Memo Hdr."; + SourceTableTemporary = true; + + layout + { + area(content) + { + group(General) + { + field("No."; Rec."No.") + { + ApplicationArea = All; + Editable = false; + ToolTip = 'Specifies the posted credit memo number.'; + } + field("Buy-from Vendor Name"; Rec."Buy-from Vendor Name") + { + ApplicationArea = All; + Caption = 'Vendor'; + Editable = false; + ToolTip = 'Specifies the name of the vendor who shipped the items.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the date the credit memo was posted.'; + } + } + group("Cr. Memo Details") + { + Caption = 'Cr. Memo Details'; + field("Posting Description"; Rec."Posting Description") + { + ApplicationArea = Basic, Suite; + Editable = true; + ToolTip = 'Specifies any text that is entered to accompany the posting, for example for information to auditors.'; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + xPurchCrMemoHdr := Rec; + end; + + trigger OnQueryClosePage(CloseAction: Action): Boolean + begin + if CloseAction = ACTION::LookupOK then + if RecordChanged() then + CODEUNIT.Run(CODEUNIT::"Purch. Cr. Memo Hdr. - Edit", Rec); + end; + + var + xPurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; + + local procedure RecordChanged() IsChanged: Boolean + begin + IsChanged := Rec."Posting Description" <> xPurchCrMemoHdr."Posting Description"; + + OnAfterRecordChanged(Rec, xPurchCrMemoHdr, IsChanged); + end; + + [Scope('OnPrem')] + procedure SetRec(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") + begin + Rec := PurchCrMemoHdr; + Rec.Insert(); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterRecordChanged(var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; xPurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var IsChanged: Boolean) + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BankCatPostPayBillsMatrix.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BankCatPostPayBillsMatrix.Page.al new file mode 100644 index 00000000000..b91cbf2df34 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BankCatPostPayBillsMatrix.Page.al @@ -0,0 +1,515 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using System.Utilities; + +page 36850 "Bank Cat.Post.Pay.Bills Matrix" +{ + Caption = 'Bank Cat.Post.Pay.Bills Matrix'; + Editable = false; + PageType = List; + SourceTable = "Bank Account"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the posted payables bill. '; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies if the name of the bill.'; + } + field(Field1; MATRIX_CellData[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[1]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(1); + end; + } + field(Field2; MATRIX_CellData[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[2]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(2); + end; + } + field(Field3; MATRIX_CellData[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[3]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(3); + end; + } + field(Field4; MATRIX_CellData[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[4]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(4); + end; + } + field(Field5; MATRIX_CellData[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[5]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(5); + end; + } + field(Field6; MATRIX_CellData[6]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[6]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(6); + end; + } + field(Field7; MATRIX_CellData[7]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[7]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(7); + end; + } + field(Field8; MATRIX_CellData[8]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[8]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(8); + end; + } + field(Field9; MATRIX_CellData[9]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[9]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(9); + end; + } + field(Field10; MATRIX_CellData[10]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[10]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(10); + end; + } + field(Field11; MATRIX_CellData[11]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[11]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(11); + end; + } + field(Field12; MATRIX_CellData[12]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[12]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(12); + end; + } + field(Field13; MATRIX_CellData[13]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[13]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(13); + end; + } + field(Field14; MATRIX_CellData[14]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[14]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(14); + end; + } + field(Field15; MATRIX_CellData[15]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[15]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(15); + end; + } + field(Field16; MATRIX_CellData[16]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[16]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(16); + end; + } + field(Field17; MATRIX_CellData[17]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[17]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(17); + end; + } + field(Field18; MATRIX_CellData[18]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[18]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(18); + end; + } + field(Field19; MATRIX_CellData[19]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[19]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(19); + end; + } + field(Field20; MATRIX_CellData[20]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[20]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(20); + end; + } + field(Field21; MATRIX_CellData[21]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[21]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(21); + end; + } + field(Field22; MATRIX_CellData[22]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[22]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(22); + end; + } + field(Field23; MATRIX_CellData[23]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[23]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(23); + end; + } + field(Field24; MATRIX_CellData[24]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[24]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(24); + end; + } + field(Field25; MATRIX_CellData[25]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[25]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(25); + end; + } + field(Field26; MATRIX_CellData[26]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[26]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(26); + end; + } + field(Field27; MATRIX_CellData[27]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[27]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(27); + end; + } + field(Field28; MATRIX_CellData[28]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[28]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(28); + end; + } + field(Field29; MATRIX_CellData[29]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[29]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(29); + end; + } + field(Field30; MATRIX_CellData[30]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[30]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(30); + end; + } + field(Field31; MATRIX_CellData[31]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[31]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(31); + end; + } + field(Field32; MATRIX_CellData[32]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[32]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(32); + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + var + MATRIX_CurrentColumnOrdinal: Integer; + MATRIX_NoOfColumns: Integer; + begin + MATRIX_CurrentColumnOrdinal := 1; + MATRIX_NoOfColumns := ArrayLen(MATRIX_CellData); + + while MATRIX_CurrentColumnOrdinal <= MATRIX_NoOfColumns do begin + MATRIX_OnAfterGetRecord(MATRIX_CurrentColumnOrdinal); + MATRIX_CurrentColumnOrdinal := MATRIX_CurrentColumnOrdinal + 1; + end; + end; + + var + CalcAmt: Decimal; + CategoryFilter: Code[250]; + StatusFilterOption: Option Open,Honored,Rejected,All; + MatrixRecords: array[32] of Record Date; + MATRIX_ColumnCaption: array[32] of Text[1024]; + MATRIX_CellData: array[32] of Decimal; + + local procedure SetDateFilter(ColumnID: Integer) + begin + if CategoryFilter = '' then + Rec.SetRange("Category Filter") + else + Rec.SetFilter("Category Filter", CategoryFilter); + if StatusFilterOption = StatusFilterOption::All then + Rec.SetFilter("Status Filter", '%1|%2|%3', + StatusFilterOption::Open, + StatusFilterOption::Honored, + StatusFilterOption::Rejected) + else + Rec.SetRange("Status Filter", StatusFilterOption); + + if MatrixRecords[ColumnID]."Period Start" = MatrixRecords[ColumnID]."Period End" then + Rec.SetRange("Due Date Filter", MatrixRecords[ColumnID]."Period Start") + else + Rec.SetRange("Due Date Filter", MatrixRecords[ColumnID]."Period Start", MatrixRecords[ColumnID]."Period End") + end; + + [Scope('OnPrem')] + procedure Load(MatrixColumns1: array[32] of Text[1024]; var MatrixRecords1: array[32] of Record Date; CategoryFilter1: Code[20]; StatusFilter: Text[30]) + begin + CopyArray(MATRIX_ColumnCaption, MatrixColumns1, 1); + CopyArray(MatrixRecords, MatrixRecords1, 1); + CategoryFilter := CategoryFilter1; + if Evaluate(StatusFilterOption, StatusFilter) then; + end; + + local procedure MATRIX_OnDrillDown(ColumnID: Integer) + var + PostedCarteraDoc: Record "Posted Cartera Doc."; + PostedBills: Page "Posted Bills"; + begin + SetDateFilter(ColumnID); + PostedCarteraDoc.SetRange("Document Type", PostedCarteraDoc."Document Type"::Bill); + PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Payable); + + if MatrixRecords[ColumnID]."Period Start" = MatrixRecords[ColumnID]."Period End" then + PostedCarteraDoc.SetRange("Due Date", MatrixRecords[ColumnID]."Period Start") + else + PostedCarteraDoc.SetRange("Due Date", MatrixRecords[ColumnID]."Period Start", MatrixRecords[ColumnID]."Period End"); + + PostedCarteraDoc.SetFilter("Category Code", CategoryFilter); + PostedCarteraDoc.SetRange(Status, StatusFilterOption); + PostedCarteraDoc.SetRange("Bank Account No.", Rec."No."); + PostedBills.SetTableView(PostedCarteraDoc); + PostedBills.RunModal(); + end; + + local procedure MATRIX_OnAfterGetRecord(ColumnID: Integer) + begin + SetDateFilter(ColumnID); + Rec.SetFilter("Category Filter", CategoryFilter); + if StatusFilterOption = StatusFilterOption::All then + Rec.SetFilter("Status Filter", '%1|%2|%3', + StatusFilterOption::Open, + StatusFilterOption::Honored, + StatusFilterOption::Rejected) + else + Rec.SetRange("Status Filter", StatusFilterOption); + Rec.CalcFields("Posted Pay. Bills Amt. (LCY)"); + CalcAmt := Rec."Posted Pay. Bills Amt. (LCY)"; + MATRIX_CellData[ColumnID] := Rec."Posted Pay. Bills Amt. (LCY)"; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BankCatPostedPayableBills.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BankCatPostedPayableBills.Page.al new file mode 100644 index 00000000000..2d54d423fab --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BankCatPostedPayableBills.Page.al @@ -0,0 +1,165 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Analysis; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.Enums; +using System.Utilities; + +page 7000071 "Bank Cat. Posted Payable Bills" +{ + Caption = 'Bank Cat. Posted Payable Bills'; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SaveValues = true; + SourceTable = "Bank Account"; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + } + field(StatusFilterOption; StatusFilterOption) + { + ApplicationArea = Basic, Suite; + Caption = 'Status Filter'; + OptionCaption = 'Open,Honored,Rejected,All'; + ToolTip = 'Specifies a filter for the status of bills that will be included.'; + } + } + group("Matrix Options") + { + Caption = 'Matrix Options'; + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View By'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + SetColumns(SetWanted::Initial); + end; + } + field(ColumnSet; ColumnSet) + { + ApplicationArea = Basic, Suite; + Caption = 'Column Set'; + Editable = false; + ToolTip = 'Specifies the column setting based on how you have selected to view the matrix.'; + } + } + } + } + + actions + { + area(processing) + { + action("&Show Matrix") + { + ApplicationArea = Basic, Suite; + Caption = '&Show Matrix'; + Image = ShowMatrix; + ToolTip = 'View the data overview according to the selected filters and options.'; + + trigger OnAction() + var + MatrixForm: Page "Bank Cat.Post.Pay.Bills Matrix"; + begin + StatusFilter := Format(StatusFilterOption, 0, ''); + MatrixForm.Load(MatrixColumnCaptions, MatrixRecords, CategoryFilter, StatusFilter); + MatrixForm.RunModal(); + end; + } + action("Next Set") + { + ApplicationArea = Basic, Suite; + Caption = 'Next Set'; + Image = NextSet; + ToolTip = 'Go to the next set of data.'; + + trigger OnAction() + begin + SetColumns(SetWanted::Next); + end; + } + action("Previous Set") + { + ApplicationArea = Basic, Suite; + Caption = 'Previous Set'; + Image = PreviousSet; + ToolTip = 'Go to the previous data set.'; + + trigger OnAction() + begin + SetColumns(SetWanted::Previous); + end; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Show Matrix_Promoted"; "&Show Matrix") + { + } + actionref("Next Set_Promoted"; "Next Set") + { + } + actionref("Previous Set_Promoted"; "Previous Set") + { + } + } + } + } + + trigger OnOpenPage() + begin + SetColumns(SetWanted::Initial); + if Rec.HasFilter then begin + CategoryFilter := Rec.GetFilter("Category Filter"); + StatusFilter := Rec.GetFilter("Status Filter"); + if Evaluate(StatusFilterOption, StatusFilter) then; + end; + end; + + var + MatrixRecords: array[32] of Record Date; + CategoryFilter: Code[20]; + StatusFilterOption: Option Open,Honored,Rejected,All; + PeriodType: Enum "Analysis Period Type"; + SetWanted: Option Initial,Previous,Same,Next; + MatrixColumnCaptions: array[32] of Text[1024]; + ColumnSet: Text[1024]; + PKFirstRecInCurrSet: Text[100]; + StatusFilter: Text[30]; + CurrSetLength: Integer; + + [Scope('OnPrem')] + procedure SetColumns(SetWanted: Option Initial,Previous,Same,Next) + var + MatrixMgt: Codeunit "Matrix Management"; + begin + MatrixMgt.GeneratePeriodMatrixData(SetWanted, 32, false, PeriodType, '', + PKFirstRecInCurrSet, MatrixColumnCaptions, ColumnSet, CurrSetLength, MatrixRecords); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BatchSettlPostedPOs.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BatchSettlPostedPOs.Report.al new file mode 100644 index 00000000000..25d6deb207e --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/BatchSettlPostedPOs.Report.al @@ -0,0 +1,517 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Finance.VAT.Ledger; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Sales.Receivables; + +report 7000087 "Batch Settl. Posted POs" +{ + Caption = 'Batch Settl. Posted POs'; + Permissions = TableData "Cust. Ledger Entry" = imd, + TableData "Vendor Ledger Entry" = imd, + TableData "G/L Register" = m, + TableData "Posted Cartera Doc." = imd, + TableData "Closed Cartera Doc." = imd, + TableData "Posted Payment Order" = imd, + TableData "Closed Payment Order" = imd; + ProcessingOnly = true; + + dataset + { + dataitem(PostedPmtOrd; "Posted Payment Order") + { + DataItemTableView = sorting("No.") order(ascending); + dataitem(PostedDoc; "Posted Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where(Status = const(Open), Type = const(Payable)); + + trigger OnAfterGetRecord() + var + FromJnl: Boolean; + begin + IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("No."); + if "Document Type" = "Document Type"::Invoice then + ExistInvoice := true; + BankAcc.Get(PostedPmtOrd."Bank Account No."); + Delay := BankAcc."Delay for Notices"; + + if DueOnly and (PostingDate < "Due Date" + Delay) then + CurrReport.Skip(); + + TotalDocCount := TotalDocCount + 1; + DocCount := DocCount + 1; + + if not SupressWindows then begin + Window.Update(3, Round(DocCount / TotalDoc * 10000, 1)); + Window.Update(4, StrSubstNo('%1 %2', "Document Type", "Document No.")); + end; + + case "Document Type" of + "Document Type"::Invoice, "Document Type"::"Credit Memo": + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine."Document Date" := GenJnlLine."Document Date"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); + VendLedgEntry.Get(PostedDoc."Entry No."); + OnBeforeValidateInvoiceAccountNo(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, FromJnl, ExistsNoRealVAT); + GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine.Description := CopyStr( + StrSubstNo(Text1100004, PostedDoc."Document No."), + 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount"); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry, PostedPmtOrd); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + OnAfterInvoiceGenJnlLineInsert( + GenJnlLine, VendLedgEntry, PostedDoc, PostedPmtOrd, + FromJnl, ExistsNoRealVAT, ExistVATEntry, FirstVATEntryNo, LastVATEntryNo, NoRealVATBuffer); + GroupAmount := GroupAmount + "Remaining Amount"; + GroupAmountLCY := GroupAmountLCY + "Remaining Amt. (LCY)"; + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + VendLedgEntry.Modify(); + end; + "Document Type"::Bill: + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); + VendLedgEntry.Get(PostedDoc."Entry No."); + + if GLSetup."Unrealized VAT" then begin + FromJnl := false; + if PostedDoc."From Journal" then + FromJnl := true; + ExistsNoRealVAT := GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry, FromJnl); + end; + + GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); + GenJnlLine.Description := CopyStr( + StrSubstNo(Text1100005, PostedDoc."Document No.", PostedDoc."No."), + 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount"); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; + GenJnlLine."Posting Group" := VendLedgEntry."Vendor Posting Group"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry, PostedPmtOrd); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + if GLSetup."Unrealized VAT" and + ExistsNoRealVAT and + (not IsRedrawn) + then begin + VendLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + OnBeforeVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); + CarteraManagement.VendUnrealizedVAT2( + VendLedgEntry, + VendLedgEntry."Remaining Amt. (LCY)", + GenJnlLine, + ExistVATEntry, + FirstVATEntryNo, + LastVATEntryNo, + NoRealVATBuffer, + FromJnl, + "Document No."); + OnAfterVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); + + if NoRealVATBuffer.Find('-') then begin + repeat + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer.Account, + NoRealVATBuffer.Amount); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer."Balance Account", + -NoRealVATBuffer.Amount); + until NoRealVATBuffer.Next() = 0; + NoRealVATBuffer.DeleteAll(); + end; + end; + + GroupAmount := GroupAmount + "Remaining Amount"; + GroupAmountLCY := GroupAmountLCY + "Remaining Amt. (LCY)"; + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + VendLedgEntry.Modify(); + end; + end; + if BGPOPostBuffer.Get('', '', VendLedgEntry."Entry No.") then begin + BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; + BGPOPostBuffer.Modify(); + end else begin + BGPOPostBuffer.Init(); + BGPOPostBuffer."Entry No." := VendLedgEntry."Entry No."; + BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; + BGPOPostBuffer.Insert(); + end; + end; + + trigger OnPostDataItem() + var + VendLedgEntry2: Record "Vendor Ledger Entry"; + DimensionManagement: Codeunit DimensionManagement; + DimesionSetIds: array[10] of Integer; + begin + if (DocCount = 0) or (GroupAmount = 0) then + CurrReport.Skip(); + + VendLedgEntry2.Get(BGPOPostBuffer."Entry No."); + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); + GenJnlLine.Validate("Account No.", BankAcc."No."); + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedPmtOrd."No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedPmtOrd."Currency Code"); + GenJnlLine.Validate(Amount, -GroupAmount); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + DimesionSetIds[1] := GenJnlLine."Dimension Set ID"; + DimesionSetIds[2] := VendLedgEntry."Dimension Set ID"; + GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; + GenJnlLine.Validate("Dimension Set ID", DimensionManagement.GetCombinedDimensionSetID(DimesionSetIds, VendLedgEntry."Global Dimension 1 Code", VendLedgEntry."Global Dimension 2 Code")); + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry2, PostedPmtOrd); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + + if PostedPmtOrd."Currency Code" <> '' then + if SumLCYAmt <> 0 then begin + Currency.SetFilter(Code, PostedPmtOrd."Currency Code"); + Currency.FindFirst(); + if SumLCYAmt > 0 then begin + Currency.TestField("Residual Gains Account"); + Acct := Currency."Residual Gains Account"; + end else begin + Currency.TestField("Residual Losses Account"); + Acct := Currency."Residual Losses Account"; + end; + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); + GenJnlLine.Validate("Account No.", Acct); + GenJnlLine.Description := Text1100010; + GenJnlLine.Validate("Currency Code", ''); + GenJnlLine.Validate(Amount, -SumLCYAmt); + DimesionSetIds[1] := GenJnlLine."Dimension Set ID"; + DimesionSetIds[2] := VendLedgEntry."Dimension Set ID"; + GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; + GenJnlLine.Validate("Dimension Set ID", DimensionManagement.GetCombinedDimensionSetID(DimesionSetIds, VendLedgEntry."Global Dimension 1 Code", VendLedgEntry."Global Dimension 2 Code")); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry2, PostedPmtOrd); + GenJnlLine.Insert(); + end; + + DocPost.PostSettlement(GenJnlLine); + GenJnlLine.DeleteAll(); + + DocPost.ClosePmtOrdIfEmpty(PostedPmtOrd, PostingDate); + + if (Counter > 1) and GLSetup."Unrealized VAT" and + ExistVATEntry and ExistInvoice + then begin + if VATEntry.FindLast() then + ToVATEntryNo := VATEntry."Entry No."; + GLReg.FindLast(); + GLReg."From VAT Entry No." := FromVATEntryNo; + GLReg."To VAT Entry No." := ToVATEntryNo; + GLReg.Modify(); + end else + if ExistVATEntry then begin + GLReg.FindLast(); + GLReg."From VAT Entry No." := FirstVATEntryNo; + GLReg."To VAT Entry No." := LastVATEntryNo; + GLReg.Modify(); + end; + end; + + trigger OnPreDataItem() + begin + SumLCYAmt := 0; + GenJnlLineNextNo := 0; + TotalDoc := Count; + DocCount := 0; + ExistInvoice := false; + Counter := Count; + if (Counter > 1) and GLSetup."Unrealized VAT" then begin + VATEntry.LockTable(); + if VATEntry.FindLast() then + FromVATEntryNo := VATEntry."Entry No." + 1; + end; + + FirstVATEntryNo := 0; + LastVATEntryNo := 0; + end; + } + + trigger OnAfterGetRecord() + begin + PmtOrdCount := PmtOrdCount + 1; + + if not SupressWindows then begin + Window.Update(1, Round(PmtOrdCount / TotalPmtOrd * 10000, 1)); + Window.Update(2, StrSubstNo('%1', "No.")); + Window.Update(3, 0); + end; + + GroupAmount := 0; + end; + + trigger OnPostDataItem() + begin + Window.Close(); + + Commit(); + + if not SupressWindows then + Message( + Text1100003, + TotalDocCount, PmtOrdCount, GroupAmountLCY); + end; + + trigger OnPreDataItem() + begin + DocPost.CheckPostingDate(PostingDate); + + SourceCodeSetup.Get(); + SourceCode := SourceCodeSetup."Cartera Journal"; + + GroupAmountLCY := 0; + PmtOrdCount := 0; + DocCount := 0; + TotalDocCount := 0; + TotalPmtOrd := Count; + ExistVATEntry := false; + + if not SupressWindows then + Window.Open( + Text1100000 + + Text1100001 + + Text1100002); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PostingDate; PostingDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Posting Date'; + NotBlank = true; + ToolTip = 'Specifies the posting date.'; + } + field(DueOnly; DueOnly) + { + ApplicationArea = Basic, Suite; + Caption = 'Due bills only'; + ToolTip = 'Specifies if you want to only include documents that have become overdue. If it does not matter if a document is overdue at the time of settlement, leave this field blank.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnInitReport() + begin + PostingDate := WorkDate(); + end; + + trigger OnPreReport() + begin + GLSetup.Get(); + end; + + var + Text1100000: Label 'Settling @1@@@@@@@@@@@@@@@@@@@@@@@\\'; + Text1100001: Label 'Payment Order No. #2###### @3@@@@@@@@@@@@@\'; + Text1100002: Label 'Payable document #4######'; + Text1100003: Label '%1 Documents in %2 Payment Orders totaling %3 (LCY) have been settled.'; + Text1100004: Label 'Payable document settlement %1'; + Text1100005: Label 'Payable bill settlement %1/%2'; + Text1100009: Label 'Payment order settlement %1'; + Text1100010: Label 'Residual adjust generated by rounding Amount'; + Text1100011: Label 'Payable document settlement %1/%2'; + SourceCodeSetup: Record "Source Code Setup"; + GenJnlLine: Record "Gen. Journal Line" temporary; + VendLedgEntry: Record "Vendor Ledger Entry"; + BankAcc: Record "Bank Account"; + Currency: Record Currency; + GLReg: Record "G/L Register"; + GLSetup: Record "General Ledger Setup"; + VATPostingSetup: Record "VAT Posting Setup"; + VATEntry: Record "VAT Entry"; + DocPost: Codeunit "Document-Post"; + CarteraManagement: Codeunit CarteraManagement; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + Window: Dialog; + PostingDate: Date; + DueOnly: Boolean; + SupressWindows: Boolean; + Delay: Decimal; + SourceCode: Code[10]; + Acct: Code[20]; + DocCount: Integer; + TotalDocCount: Integer; + GroupAmount: Decimal; + GroupAmountLCY: Decimal; + GenJnlLineNextNo: Integer; + SumLCYAmt: Decimal; + PmtOrdCount: Integer; + TotalPmtOrd: Integer; + TotalDoc: Integer; + ExistVATEntry: Boolean; + FirstVATEntryNo: Integer; + LastVATEntryNo: Integer; + IsRedrawn: Boolean; + ExistInvoice: Boolean; + FromVATEntryNo: Integer; + ToVATEntryNo: Integer; + Counter: Integer; + BGPOPostBuffer: Record "BG/PO Post. Buffer" temporary; + NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; + ExistsNoRealVAT: Boolean; + + local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal) + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Account Type" := AccType; + GenJnlLine."Account No." := AccNo; + if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then + GenJnlLine.Description := CopyStr( + StrSubstNo(Text1100011, PostedDoc."Document No.", PostedDoc."No."), + 1, MaxStrLen(GenJnlLine.Description)) + else + GenJnlLine.Description := CopyStr( + StrSubstNo(Text1100011, PostedDoc."Document No.", PostedDoc."No."), + 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, -Amount2); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := ''; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry, PostedPmtOrd); + GenJnlLine.Insert(); + end; + + procedure SetPostingDate(NewPostingDate: Date) + begin + PostingDate := NewPostingDate; + end; + + procedure SetSupressWindows(NewSupressWindows: Boolean) + begin + SupressWindows := NewSupressWindows; + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterInvoiceGenJnlLineInsert(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeGenJournalLineInsert(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var VendorLedgerEntry2: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeValidateInvoiceAccountNo(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTDetailedVendorLedgEntry.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTDetailedVendorLedgEntry.TableExt.al new file mode 100644 index 00000000000..888808c24f8 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTDetailedVendorLedgEntry.TableExt.al @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft; +using Microsoft.Sales.Receivables; + +tableextension 7000087 "CRT DetailedVendorLedgEntry" extends "Detailed Vendor Ledg. Entry" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = CustomerContent; + } + field(7000001; "Document Situation"; Enum "ES Document Situation") + { + Caption = 'Document Situation'; + DataClassification = CustomerContent; + } + field(7000002; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + field(7000003; "Document Status"; Enum "ES Document Status") + { + Caption = 'Document Status'; + DataClassification = CustomerContent; + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTVendorLedgerEntry.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTVendorLedgerEntry.Codeunit.al new file mode 100644 index 00000000000..e532f6a4a98 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTVendorLedgerEntry.Codeunit.al @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.PaymentTerms; + +codeunit 7000086 "CRT Vendor Ledger Entry" +{ + [EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", OnAfterValidateEvent, 'Due Date', false, false)] + local procedure DueDateOnAfterValidate(var Rec: Record "Vendor Ledger Entry"; var xRec: Record "Vendor Ledger Entry"; CurrFieldNo: Integer) + var + PaymentTerms: Record "Payment Terms"; + DocMisc: Codeunit "Document-Misc"; + begin + Rec.CheckBillSituation(); + if PaymentTerms.Get(Rec."Payment Terms Code") then + PaymentTerms.VerifyMaxNoDaysTillDueDate(Rec."Due Date", Rec."Document Date", Rec.FieldCaption("Due Date")); + if Rec."Document Situation" <> Rec."Document Situation"::" " then + DocMisc.UpdatePayableDueDate(Rec); + end; + + [EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", OnAfterValidateEvent, 'Amount to Apply', false, false)] + local procedure AmountToApplyOnAfterValidate(var Rec: Record "Vendor Ledger Entry"; var xRec: Record "Vendor Ledger Entry"; CurrFieldNo: Integer) + begin + Rec.CheckBillSituation(); + end; + + [EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", OnAfterValidateEvent, 'Payment Method Code', false, false)] + local procedure PaymentMethodCodeOnAfterValidate(var Rec: Record "Vendor Ledger Entry"; var xRec: Record "Vendor Ledger Entry"; CurrFieldNo: Integer) + var + CarteraDoc: Record "Cartera Doc."; + begin + if Rec."Payment Method Code" <> xRec."Payment Method Code" then begin + Rec.ValidatePaymentMethod(); + CarteraDoc.UpdatePaymentMethodCode( + Rec."Document No.", Rec."Vendor No.", Rec."Bill No.", Rec."Payment Method Code") + end; + end; + + [EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", OnAfterCopyVendLedgerEntryFromGenJnlLine, '', false, false)] + local procedure OnAfterCopyVendLedgerEntryFromGenJnlLine(var VendorLedgerEntry: Record "Vendor Ledger Entry"; GenJournalLine: Record "Gen. Journal Line") + begin + VendorLedgerEntry."Bill No." := GenJournalLine."Bill No."; + VendorLedgerEntry."Applies-to Bill No." := GenJournalLine."Applies-to Bill No."; + end; + + [EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", OnAfterCopyVendLedgerEntryFromCVLedgEntryBuffer, '', false, false)] + local procedure OnAfterCopyVendLedgerEntryFromCVLedgEntryBuffer(var VendorLedgerEntry: Record "Vendor Ledger Entry"; CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") + begin + VendorLedgerEntry."Bill No." := CVLedgerEntryBuffer."Bill No."; + VendorLedgerEntry."Document Situation" := CVLedgerEntryBuffer."Document Situation"; + VendorLedgerEntry."Applies-to Bill No." := CVLedgerEntryBuffer."Applies-to Bill No."; + VendorLedgerEntry."Document Status" := CVLedgerEntryBuffer."Document Status"; + end; + + [EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", OnAfterSetAppliesToDocFilters, '', false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Vendor Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + Rec.SetRange("Bill No.", GenJnlLine."Applies-to Bill No."); + end; + + [EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", OnAfterClearDocumentFilters, '', false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Vendor Ledger Entry") + begin + Rec.SetRange("Bill No."); + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTVendorLedgerEntry.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTVendorLedgerEntry.TableExt.al new file mode 100644 index 00000000000..dcffb2c2678 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CRTVendorLedgerEntry.TableExt.al @@ -0,0 +1,78 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft; +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +tableextension 7000006 "CRT Vendor Ledger Entry" extends "Vendor Ledger Entry" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = CustomerContent; + } + field(7000001; "Document Situation"; Enum "ES Document Situation") + { + Caption = 'Document Situation'; + DataClassification = CustomerContent; + } + field(7000002; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + field(7000003; "Document Status"; Enum "ES Document Status") + { + Caption = 'Document Status'; + DataClassification = CustomerContent; + } + } + + var + CannotChangePmtMethodErr: Label 'For Cartera-based bills and invoices, you cannot change the Payment Method Code to this value.'; + CheckBillSituationOrderErr: Label '%1 cannot be applied because it is included in a payment order. To apply the document, remove it from the payment order and try again.', Comment = '%1 - document type and number'; + CheckBillSituationPostedErr: Label '%1 cannot be applied because it is included in a posted payment order.', Comment = '%1 - document type and number'; + + [Scope('OnPrem')] + procedure CheckBillSituation() + var + CarteraDoc: Record "Cartera Doc."; + PostedCarteraDoc: Record "Posted Cartera Doc."; + begin + OnBeforeCheckBillSituation(Rec); + + case true of + CarteraDoc.Get(CarteraDoc.Type::Payable, "Entry No."): + if CarteraDoc."Bill Gr./Pmt. Order No." <> '' then + Error(CheckBillSituationOrderErr, Description); + PostedCarteraDoc.Get(PostedCarteraDoc.Type::Payable, "Entry No."): + if PostedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then + Error(CheckBillSituationPostedErr, Description); + end; + end; + + procedure ValidatePaymentMethod() + var + PaymentMethod: Record "Payment Method"; + begin + PaymentMethod.Get("Payment Method Code"); + if (("Document Type" = "Document Type"::Bill) and not PaymentMethod."Create Bills") or + (("Document Type" = "Document Type"::Invoice) and + ("Document Situation" <> "Document Situation"::" ") and + not PaymentMethod."Invoices to Cartera") + then + Error(CannotChangePmtMethodErr); + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCheckBillSituation(var VendorLedgerEntry: Record "Vendor Ledger Entry") + begin + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CarteraPayablesStatisticsFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CarteraPayablesStatisticsFB.Page.al new file mode 100644 index 00000000000..9649ec98ded --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/CarteraPayablesStatisticsFB.Page.al @@ -0,0 +1,214 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Purchases.Vendor; + +page 35305 "Cartera Payables Statistics FB" +{ + Caption = 'Cartera Payables Statistics FB'; + Editable = false; + PageType = CardPart; + SourceTable = Vendor; + + layout + { + area(content) + { + group("No. of Documents") + { + Caption = 'No. of Documents'; + field("NoOpen[1]"; NoOpen[1]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Documents'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoOpen[2]"; NoOpen[2]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Docs. in Payment Order'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoOpen[3]"; NoOpen[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Docs. in Posted Payment Order'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoHonored[3]"; NoHonored[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored Docs. in Posted Payment Order'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + } + } + group("Remaining Amt. (LCY)") + { + Caption = 'Remaining Amt. (LCY)'; + field("OpenRemainingAmtLCY[1]"; OpenRemainingAmtLCY[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open Documents'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + + trigger OnDrillDown() + begin + DrillDownOpen(4); // Cartera + end; + } + field("OpenRemainingAmtLCY[2]"; OpenRemainingAmtLCY[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open Docs. in Payment Order'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + + trigger OnDrillDown() + begin + DrillDownOpen(3); // Payment Order + end; + } + field("OpenRemainingAmtLCY[3]"; OpenRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open Docs. in Posted Payment Order'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + + trigger OnDrillDown() + begin + DrillDownOpen(1); // Posted Payment Order + end; + } + field("HonoredRemainingAmtLCY[3]"; HonoredRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored Docs. in Posted Payment Order'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + + trigger OnDrillDown() + begin + DrillDownHonored(1); // Posted Payment Order + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateBillStatistics(); + end; + + var + j: Integer; + NoOpen: array[3] of Integer; + NoHonored: array[3] of Integer; + OpenAmtLCY: array[3] of Decimal; + OpenRemainingAmtLCY: array[3] of Decimal; + HonoredAmtLCY: array[3] of Decimal; + HonoredRemainingAmtLCY: array[3] of Decimal; + DocumentSituationFilter: array[3] of Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; + + [Scope('OnPrem')] + procedure UpdateBillStatistics() + var + VendLedgEntry: Record "Vendor Ledger Entry"; + begin + DocumentSituationFilter[1] := DocumentSituationFilter::Cartera; + DocumentSituationFilter[2] := DocumentSituationFilter::"BG/PO"; + DocumentSituationFilter[3] := DocumentSituationFilter::"Posted BG/PO"; + + VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); + VendLedgEntry.SetRange("Vendor No.", Rec."No."); + for j := 1 to 3 do begin + VendLedgEntry.SetRange("Document Situation", DocumentSituationFilter[j]); + VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Open); + VendLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + OpenAmtLCY[j] := VendLedgEntry."Amount (LCY) stats."; + OpenRemainingAmtLCY[j] := VendLedgEntry."Remaining Amount (LCY) stats."; + NoOpen[j] := VendLedgEntry.Count; + VendLedgEntry.SetRange("Document Status"); + + VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Honored); + VendLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + HonoredAmtLCY[j] := VendLedgEntry."Amount (LCY) stats."; + HonoredRemainingAmtLCY[j] := VendLedgEntry."Remaining Amount (LCY) stats."; + NoHonored[j] := VendLedgEntry.Count; + VendLedgEntry.SetRange("Document Status"); + + VendLedgEntry.SetRange("Document Situation"); + end; + end; + + [Scope('OnPrem')] + procedure DrillDownOpen(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents") + var + VendLedgEntry: Record "Vendor Ledger Entry"; + VendLedgEntriesForm: Page "Vendor Ledger Entries"; + begin + VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); + VendLedgEntry.SetRange("Vendor No.", Rec."No."); + case Situation of + Situation::Cartera: + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"Posted BG/PO"); + end; + VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Open); + VendLedgEntriesForm.SetTableView(VendLedgEntry); + VendLedgEntriesForm.SetRecord(VendLedgEntry); + VendLedgEntriesForm.RunModal(); + VendLedgEntry.SetRange("Document Status"); + VendLedgEntry.SetRange("Document Situation"); + end; + + [Scope('OnPrem')] + procedure DrillDownHonored(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents") + var + VendLedgEntry: Record "Vendor Ledger Entry"; + VendLedgEntriesForm: Page "Vendor Ledger Entries"; + begin + VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); + VendLedgEntry.SetRange("Vendor No.", Rec."No."); + case Situation of + Situation::Cartera: + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"Posted BG/PO"); + end; + + VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Honored); + VendLedgEntriesForm.SetTableView(VendLedgEntry); + VendLedgEntriesForm.SetRecord(VendLedgEntry); + VendLedgEntriesForm.RunModal(); + VendLedgEntry.SetRange("Document Status"); + VendLedgEntry.SetRange("Document Situation"); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPOAnalysisLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPOAnalysisLCYFB.Page.al new file mode 100644 index 00000000000..e00d533870d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPOAnalysisLCYFB.Page.al @@ -0,0 +1,126 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 35301 "Closed PO Analysis LCY FB" +{ + Caption = 'Closed PO Analysis LCY FB'; + DataCaptionExpression = Rec.Caption(); + Editable = false; + PageType = CardPart; + SourceTable = "Closed Payment Order"; + + layout + { + area(content) + { + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code in which the payment order was generated.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this closed payment order.'; + } + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + group("Amount (LCY)") + { + Caption = 'Amount (LCY)'; + field(Honored; HonoredAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(Rejected; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + ClosedDoc: Record "Closed Cartera Doc."; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); + ClosedDoc.SetRange(Type, ClosedDoc.Type::Payable); + ClosedDoc.SetRange("Collection Agent", ClosedDoc."Collection Agent"::Bank); + ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Global Dimension 1 Filter", ClosedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", ClosedDoc."Global Dimension 2 Code"); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); + ClosedDoc.SetRange(Redrawn, true); + ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := ClosedDoc."Amount for Collection"; + RedrawnAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; + NoRedrawn := ClosedDoc.Count; + + ClosedDoc.SetRange(Redrawn, false); + ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := ClosedDoc."Amount for Collection"; + HonoredAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; + NoHonored := ClosedDoc.Count; + ClosedDoc.SetRange(Redrawn); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); + ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RejectedAmt := ClosedDoc."Amount for Collection"; + RejectedAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; + NoRejected := ClosedDoc.Count; + ClosedDoc.SetRange(Status); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPOAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPOAnalysisNonLCYFB.Page.al new file mode 100644 index 00000000000..d67f89caa96 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPOAnalysisNonLCYFB.Page.al @@ -0,0 +1,126 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 35302 "Closed PO Analysis Non LCY FB" +{ + Caption = 'Closed PO Analysis Non LCY FB'; + DataCaptionExpression = Rec.Caption(); + Editable = false; + PageType = CardPart; + SourceTable = "Closed Payment Order"; + + layout + { + area(content) + { + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code in which the payment order was generated.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this closed payment order.'; + } + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + group(Amount) + { + Caption = 'Amount'; + field(Honored; HonoredAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(Rejected; RedrawnAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + ClosedDoc: Record "Closed Cartera Doc."; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); + ClosedDoc.SetRange(Type, ClosedDoc.Type::Payable); + ClosedDoc.SetRange("Collection Agent", ClosedDoc."Collection Agent"::Bank); + ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Global Dimension 1 Filter", ClosedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", ClosedDoc."Global Dimension 2 Code"); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); + ClosedDoc.SetRange(Redrawn, true); + ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := ClosedDoc."Amount for Collection"; + RedrawnAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; + NoRedrawn := ClosedDoc.Count; + + ClosedDoc.SetRange(Redrawn, false); + ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := ClosedDoc."Amount for Collection"; + HonoredAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; + NoHonored := ClosedDoc.Count; + ClosedDoc.SetRange(Redrawn); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); + ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RejectedAmt := ClosedDoc."Amount for Collection"; + RejectedAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; + NoRejected := ClosedDoc.Count; + ClosedDoc.SetRange(Status); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrder.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrder.Table.al new file mode 100644 index 00000000000..d57fe71ec0a --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrder.Table.al @@ -0,0 +1,180 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +table 7000022 "Closed Payment Order" +{ + Caption = 'Closed Payment Order'; + DrillDownPageID = "Closed Payment Orders List"; + LookupPageID = "Closed Payment Orders List"; + DataClassification = CustomerContent; + + fields + { + field(2; "No."; Code[20]) + { + Caption = 'No.'; + } + field(3; "Bank Account No."; Code[20]) + { + Caption = 'Bank Account No.'; + TableRelation = "Bank Account"; + } + field(4; "Bank Account Name"; Text[100]) + { + CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); + Caption = 'Bank Account Name'; + Editable = false; + FieldClass = FlowField; + } + field(5; "Posting Description"; Text[100]) + { + Caption = 'Posting Description'; + } + field(8; "Reason Code"; Code[10]) + { + Caption = 'Reason Code'; + TableRelation = "Reason Code"; + } + field(9; "No. Printed"; Integer) + { + Caption = 'No. Printed'; + } + field(10; "Posting Date"; Date) + { + Caption = 'Posting Date'; + } + field(11; Comment; Boolean) + { + CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), + Type = filter(Payable))); + Caption = 'Comment'; + Editable = false; + FieldClass = FlowField; + } + field(14; "Global Dimension 1 Filter"; Code[20]) + { + CaptionClass = '1,3,1'; + Caption = 'Global Dimension 1 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(15; "Global Dimension 2 Filter"; Code[20]) + { + CaptionClass = '1,3,2'; + Caption = 'Global Dimension 2 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(16; "Amount Grouped"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + Type = const(Payable))); + Caption = 'Amount Grouped'; + Editable = false; + FieldClass = FlowField; + } + field(18; "Status Filter"; Enum "Cartera Document Status") + { + Caption = 'Status Filter'; + Editable = false; + FieldClass = FlowFilter; + } + field(20; "Closing Date"; Date) + { + Caption = 'Closing Date'; + } + field(29; "Payment Order Expenses Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Payment Order Expenses Amt.'; + } + field(33; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + Editable = false; + TableRelation = Currency; + } + field(35; "Amount Grouped (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Closed Cartera Doc."."Amt. for Collection (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + Type = const(Payable))); + Caption = 'Amount Grouped (LCY)'; + Editable = false; + FieldClass = FlowField; + } + } + + keys + { + key(Key1; "No.") + { + Clustered = true; + } + key(Key2; "Bank Account No.", "Posting Date") + { + SumIndexFields = "Payment Order Expenses Amt."; + } + } + + fieldgroups + { + } + + trigger OnDelete() + begin + ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", "No."); + ClosedDoc.DeleteAll(); + + BGPOCommentLine.SetRange("BG/PO No.", "No."); + BGPOCommentLine.DeleteAll(); + end; + + var + Text1100000: Label 'untitled'; + ClosedPmtOrd: Record "Closed Payment Order"; + ClosedDoc: Record "Closed Cartera Doc."; + BGPOCommentLine: Record "BG/PO Comment Line"; + + [Scope('OnPrem')] + procedure PrintRecords(ShowRequestForm: Boolean) + var + CarteraReportSelection: Record "Cartera Report Selections"; + begin + ClosedPmtOrd.Copy(Rec); + CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Closed Payment Order"); + CarteraReportSelection.SetFilter("Report ID", '<>0'); + CarteraReportSelection.Find('-'); + repeat + REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, ClosedPmtOrd); + until CarteraReportSelection.Next() = 0; + end; + + procedure Caption(): Text + begin + if "No." = '' then + exit(Text1100000); + CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.Report.al new file mode 100644 index 00000000000..ad3613e030c --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.Report.al @@ -0,0 +1,415 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Vendor; +using System.Utilities; + +report 7000012 "Closed Payment Order Listing" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'Closed Payment Order Listing'; + Permissions = TableData "Closed Payment Order" = r; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(ClosedPmtOrd; "Closed Payment Order") + { + DataItemTableView = sorting("No."); + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + column(ClosedPmtOrd_No_; "No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(ClosedPmtOrd__No__; ClosedPmtOrd."No.") + { + } + column(STRSUBSTNO_Text1100001_CopyText_; StrSubstNo(Text1100001, CopyText)) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") + { + } + column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") + { + } + column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") + { + } + column(ClosedPmtOrd__Posting_Date_; Format(ClosedPmtOrd."Posting Date")) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(ClosedPmtOrd__Currency_Code_; ClosedPmtOrd."Currency Code") + { + } + column(PrintAmountsInLCY; PrintAmountsInLCY) + { + } + column(OutputNo; OutputNo) + { + } + column(PageLoop_Number; Number) + { + } + column(ClosedPmtOrd__No__Caption; ClosedPmtOrd__No__CaptionLbl) + { + } + column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) + { + } + column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) + { + } + column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) + { + } + column(ClosedPmtOrd__Posting_Date_Caption; ClosedPmtOrd__Posting_Date_CaptionLbl) + { + } + column(ClosedPmtOrd__Currency_Code_Caption; ClosedPmtOrd__Currency_Code_CaptionLbl) + { + } + column(PageCaption; PageCaptionLbl) + { + } + dataitem(ClosedDoc; "Closed Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = ClosedPmtOrd; + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Payable)); + column(AmtForCollection; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmtForCollection_Control32; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Vendor_City; Vendor.City) + { + } + column(Vendor_County; Vendor.County) + { + } + column(Vendor__Post_Code_; Vendor."Post Code") + { + } + column(Vendor_Name; Vendor.Name) + { + } + column(ClosedDoc__Account_No__; "Account No.") + { + } + column(ClosedDoc__Honored_Rejtd__at_Date_; Format("Honored/Rejtd. at Date")) + { + } + column(ClosedDoc_Status; Status) + { + } + column(ClosedDoc__Document_No__; "Document No.") + { + } + column(ClosedDoc__Document_Type_; "Document Type") + { + } + column(ClosedDoc__Due_Date_; Format("Due Date")) + { + } + column(Vendor_Name_Control28; Vendor.Name) + { + } + column(Vendor_City_Control30; Vendor.City) + { + } + column(AmtForCollection_Control31; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Vendor_County_Control35; Vendor.County) + { + } + column(ClosedDoc__Document_No___Control3; "Document No.") + { + } + column(ClosedDoc__No__; "No.") + { + } + column(Vendor__Post_Code__Control9; Vendor."Post Code") + { + } + column(ClosedDoc_Status_Control78; Status) + { + } + column(ClosedDoc__Honored_Rejtd__at_Date__Control80; Format("Honored/Rejtd. at Date")) + { + } + column(ClosedDoc__Due_Date__Control8; Format("Due Date")) + { + } + column(ClosedDoc__Account_No___Control1; "Account No.") + { + } + column(ClosedDoc__Document_Type__Control23; "Document Type") + { + } + column(AmtForCollection_Control36; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmtForCollection_Control39; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(ClosedDoc_Type; Type) + { + } + column(ClosedDoc_Entry_No_; "Entry No.") + { + } + column(ClosedDoc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") + { + } + column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) + { + } + column(Document_No_Caption; Document_No_CaptionLbl) + { + } + column(Bill_No_Caption; Bill_No_CaptionLbl) + { + } + column(Vendor_Name_Control28Caption; Vendor_Name_Control28CaptionLbl) + { + } + column(Vendor__Post_Code__Control9Caption; Vendor__Post_Code__Control9CaptionLbl) + { + } + column(Vendor_City_Control30Caption; Vendor_City_Control30CaptionLbl) + { + } + column(AmtForCollection_Control31Caption; AmtForCollection_Control31CaptionLbl) + { + } + column(Vendor_County_Control35Caption; Vendor_County_Control35CaptionLbl) + { + } + column(ClosedDoc_Status_Control78Caption; FieldCaption(Status)) + { + } + column(ClosedDoc__Honored_Rejtd__at_Date__Control80Caption; ClosedDoc__Honored_Rejtd__at_Date__Control80CaptionLbl) + { + } + column(ClosedDoc__Due_Date__Control8Caption; ClosedDoc__Due_Date__Control8CaptionLbl) + { + } + column(ClosedDoc__Account_No___Control1Caption; ClosedDoc__Account_No___Control1CaptionLbl) + { + } + column(ClosedDoc__Document_Type__Control23Caption; FieldCaption("Document Type")) + { + } + column(ContinuedCaption; ContinuedCaptionLbl) + { + } + column(EmptyStringCaption; EmptyStringCaptionLbl) + { + } + column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + Vendor.Get("Account No."); + if PrintAmountsInLCY then + AmtForCollection := "Amt. for Collection (LCY)" + else + AmtForCollection := "Amount for Collection"; + end; + + trigger OnPreDataItem() + begin + Clear(AmtForCollection); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then + CopyText := Text1100000; + OutputNo := OutputNo + 1; + end; + + trigger OnPreDataItem() + begin + NoOfLoops := Abs(NoOfCopies) + 1; + CopyText := ''; + SetRange(Number, 1, NoOfLoops); + + OutputNo := 1; + end; + } + + trigger OnAfterGetRecord() + begin + BankAcc.Get(ClosedPmtOrd."Bank Account No."); + FormatAddress.FormatAddr( + BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", + BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + FormatAddress.Company(CompanyAddr, CompanyInfo); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Copies'; + ToolTip = 'Specifies how many copies of the document to print.'; + } + field(PrintAmountsInLCY; PrintAmountsInLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show amounts in LCY'; + ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + Text1100000: Label 'COPY'; + Text1100001: Label 'Payment Order %1'; + CompanyInfo: Record "Company Information"; + BankAcc: Record "Bank Account"; + Vendor: Record Vendor; + FormatAddress: Codeunit "Format Address"; + BankAccAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + NoOfLoops: Integer; + NoOfCopies: Integer; + CopyText: Text[30]; + PrintAmountsInLCY: Boolean; + AmtForCollection: Decimal; + OutputNo: Integer; + ClosedPmtOrd__No__CaptionLbl: Label 'Payment Order No.'; + CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; + CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; + CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; + ClosedPmtOrd__Posting_Date_CaptionLbl: Label 'Date'; + ClosedPmtOrd__Currency_Code_CaptionLbl: Label 'Currency Code'; + PageCaptionLbl: Label 'Page'; + All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; + Document_No_CaptionLbl: Label 'Document No.'; + Bill_No_CaptionLbl: Label 'Bill No.'; + Vendor_Name_Control28CaptionLbl: Label 'Name'; + Vendor__Post_Code__Control9CaptionLbl: Label 'Post Code'; + Vendor_City_Control30CaptionLbl: Label 'City /'; + AmtForCollection_Control31CaptionLbl: Label 'Amount for Collection'; + Vendor_County_Control35CaptionLbl: Label 'County'; + ClosedDoc__Honored_Rejtd__at_Date__Control80CaptionLbl: Label 'Honored/Rejtd. at Date'; + ClosedDoc__Due_Date__Control8CaptionLbl: Label 'Due Date'; + ClosedDoc__Account_No___Control1CaptionLbl: Label 'Vendor No.'; + ContinuedCaptionLbl: Label 'Continued'; + EmptyStringCaptionLbl: Label '/', Locked = true; + ContinuedCaption_Control15Lbl: Label 'Continued'; + TotalCaptionLbl: Label 'Total'; + + [Scope('OnPrem')] + procedure GetCurrencyCode(): Code[10] + begin + if PrintAmountsInLCY then + exit(''); + + exit(ClosedDoc."Currency Code"); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.rdlc new file mode 100644 index 00000000000..e8dda64ec0e --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrderListing.rdlc @@ -0,0 +1,2550 @@ + + + 0 + + + + SQL + + + None + a1b4307e-92c2-4bcb-9fb5-b68fdfb6ddbc + + + + + + + + + + + 18.48333cm + + + + + 12.4126cm + + + + + + + + + + 1.4cm + + + 1.3cm + + + 1.25cm + + + 0.3cm + + + 0.7cm + + + 0.4cm + + + 1.92646cm + + + 1.5cm + + + 3.3cm + + + 1.5cm + + + 2.7cm + + + 2cm + + + + + 0.423cm + + + + + true + true + + + + + =First(Fields!All_amounts_are_in_LCYCaption.Value) + + + + + + All_amounts_are_in_LCYCaption + 48 + + + 8 + + + + + + + + + + + + + true + true + + + + + + + + + + + textbox11 + 47 + + + 4 + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!ClosedDoc__Due_Date__Control8Caption.Value) + + + + + + + 46 + + + + + + + + true + + + + + =First(Fields!ClosedDoc__Document_Type__Control23Caption.Value) + + + + + + 45 + + + + + + + + true + + + + + =First(Fields!Document_No_Caption.Value) + + + + + + + 44 + + + + + + + + true + true + + + + + + + + + + + + textbox2 + 43 + + + + + + + + true + + + + + =First(Fields!Bill_No_Caption.Value) + + + + + + + 42 + + + + + + + + true + + + + + =First(Fields!ClosedDoc_Status_Control78Caption.Value) + + + + + + 41 + + + + + + + + true + + + + + =First(Fields!ClosedDoc__Honored_Rejtd__at_Date__Control80Caption.Value) + + + + + + + 40 + + + + + + + + true + + + + + =First(Fields!ClosedDoc__Account_No___Control1Caption.Value) + + + + + + + 39 + + + + + + + + true + + + + + =First(Fields!Vendor_Name_Control28Caption.Value) + + + + + + 38 + + + + + + + + true + + + + + =First(Fields!Vendor__Post_Code__Control9Caption.Value) + + + + + + 37 + + + + + + + + true + + + + + =First(Fields!Vendor_City_Control30Caption.Value) + Chr(10) + First(Fields!Vendor_County_Control35Caption.Value) + + + + + + 36 + + + + + + + + true + + + + + =First(Fields!AmtForCollection_Control31Caption.Value) + + + + + + + 35 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + 0.425cm + + + + + true + + + + + =Fields!ClosedDoc__Due_Date_.Value + + + + + + 33 + + + + + + + + true + + + + + =Fields!ClosedDoc__Document_Type_.Value + + + + + + 32 + + + + + + + + true + + + + + =Fields!ClosedDoc__Document_No__.Value + + + + + + + 31 + + + + + + + + true + true + + + + + + + + + textbox3 + 30 + + + + + + + + true + true + + + + + + + + + + + + + true + + + + + =Fields!ClosedDoc_Status.Value + + + + + + 28 + + + + + + + + true + + + + + =Fields!ClosedDoc__Honored_Rejtd__at_Date_.Value + + + + + + 27 + + + + + + + + true + + + + + =Fields!ClosedDoc__Account_No__.Value + + + + + + + 26 + + + + + + + + true + + + + + =Fields!Vendor_Name.Value + + + + + + 25 + + + + + + + + true + + + + + =Fields!Vendor__Post_Code_.Value + + + + + + + 24 + + + + + + + + true + + + + + =Fields!Vendor_City.Value + + + + + + 23 + + + + + + + + true + true + + + + + =Fields!AmtForCollection.Value + + + + + + 22 + + + + + + + + 0.425cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + true + + + + + =Fields!Vendor_County.Value + + + + + + 20 + + + + + + + + true + + + + + + + + + + + + + 0.425cm + + + + + true + + + + + =Fields!ClosedDoc__Due_Date_.Value + + + + + + 18 + + + + + + + + true + + + + + =Fields!ClosedDoc__Document_Type_.Value + + + + + + 17 + + + + + + + + true + + + + + =Fields!ClosedDoc__Document_No__.Value + + + + + + + 16 + + + + + + + + true + true + + + + + =Fields!EmptyStringCaption.Value + + + + + + + textbox5 + 15 + + + + + + + + true + + + + + =Fields!ClosedDoc__No__.Value + + + + + + 14 + + + + + + + + true + + + + + =Fields!ClosedDoc_Status.Value + + + + + + 13 + + + + + + + + true + + + + + =Fields!ClosedDoc__Honored_Rejtd__at_Date_.Value + + + + + + 12 + + + + + + + + true + + + + + =Fields!ClosedDoc__Account_No__.Value + + + + + + + 11 + + + + + + + + true + + + + + =Fields!Vendor_Name.Value + + + + + + 10 + + + + + + + + true + + + + + =Fields!Vendor__Post_Code_.Value + + + + + + + 9 + + + + + + + + true + + + + + =Fields!Vendor_City.Value + + + + + + 8 + + + + + + + + true + true + + + + + =Fields!AmtForCollection.Value + + + + + + 7 + + + + + + + + 0.425cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + true + + + + + =Fields!Vendor_County.Value + + + + + + 1 + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + 12 + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!TotalCaption.Value) + + + + + + 6 + + + 5 + + + + + + + + + + true + true + + + + + + + + + + + textbox62 + 5 + + + 6 + + + + + + + + + + + true + true + + + + + =Sum(Fields!AmtForCollection.Value) + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =IIF(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) + + After + true + true + + + After + true + true + + + + + =1 + + + + + + + =Fields!ClosedPmtOrd__No__.Value + =Fields!OutputNo.Value + + + + + After + true + + + + Detail + + + + + =IIF(Fields!ClosedDoc__Document_Type_.Value="Bill",TRUE,FALSE) + + + + + =IIF(Fields!ClosedDoc__Document_Type_.Value="Bill",TRUE,FALSE) + + + + + =IIF(Fields!ClosedDoc__Document_Type_.Value="Bill",FALSE,TRUE) + + + + + =IIF(Fields!ClosedDoc__Document_Type_.Value="Bill",FALSE,TRUE) + + + + Detail_Collection + Output + true + + + + + Before + true + + + Before + true + + + + + + DataSet_Result + 8.1746cm + 7.19635in + 27 + + + true + + + + + =Fields!BankAccAddr_1_.Value + + + + + + 1.27152cm + 0.423cm + 5cm + 26 + + + + true + + + + + =Fields!ClosedPmtOrd__No__.Value + + + + + + + 5.50152cm + 15.23333cm + 0.423cm + 2.99048cm + 25 + + + + true + + + + + =Fields!STRSUBSTNO_Text1100001_CopyText_.Value + + + + + + 0.00252cm + 12.08333cm + 0.423cm + 6.3cm + 24 + + + + true + + + + + =Fields!CompanyAddr_1_.Value + + + + + + 1.27152cm + 12.08333cm + 0.423cm + 6.3cm + 23 + + + + true + + + + + =Fields!CompanyAddr_2_.Value + + + + + + 1.69452cm + 12.08333cm + 0.423cm + 6.3cm + 22 + + + + true + + + + + =Fields!CompanyAddr_3_.Value + + + + + + 2.11752cm + 12.08333cm + 0.423cm + 6.3cm + 21 + + + + true + + + + + =Fields!CompanyAddr_4_.Value + + + + + + 2.54052cm + 12.08333cm + 0.423cm + 6.3cm + 20 + + + + true + + + + + =Fields!CompanyAddr_5_.Value + + + + + + 2.96352cm + 12.08333cm + 0.423cm + 6.3cm + 19 + + + + true + + + + + =Fields!CompanyAddr_6_.Value + + + + + + 3.38652cm + 12.08333cm + 0.423cm + 6.3cm + 18 + + + + true + + + + + =Fields!CompanyInfo__Phone_No__.Value + + + + + + 3.80952cm + 14.18333cm + 0.423cm + 17 + + + + true + + + + + =Fields!CompanyInfo__Fax_No__.Value + + + + + + 4.23252cm + 14.18333cm + 0.423cm + 16 + + + + true + + + + + =Fields!CompanyInfo__VAT_Registration_No__.Value + + + + + + 4.65552cm + 14.18333cm + 0.423cm + 15 + + + + true + + + + + =Fields!ClosedPmtOrd__Posting_Date_.Value + + + + + + + 7.19352cm + 15.2381cm + 0.423cm + 3.1746cm + 14 + + + + true + + + + + =Fields!BankAccAddr_4_.Value + + + + + + 2.54052cm + 0.423cm + 5cm + 13 + + + + true + + + + + =Fields!BankAccAddr_5_.Value + + + + + + 2.96352cm + 0.423cm + 5cm + 12 + + + + true + + + + + =Fields!BankAccAddr_6_.Value + + + + + + 3.38652cm + 0.423cm + 5cm + 11 + + + + true + + + + + =Fields!BankAccAddr_7_.Value + + + + + + 3.80952cm + 0.423cm + 5cm + 10 + + + + true + + + + + =Fields!BankAccAddr_3_.Value + + + + + + 2.11752cm + 0.423cm + 5cm + 9 + + + + true + + + + + =Fields!BankAccAddr_2_.Value + + + + + + 1.69452cm + 0.423cm + 5cm + 8 + + + + true + + + + + =Fields!ClosedPmtOrd__Currency_Code_.Value + + + + + + + 5.92452cm + 15.23333cm + 0.423cm + 2.99048cm + 6 + + + + true + + + + + =Fields!ClosedPmtOrd__No__Caption.Value + + + + + + 5.50152cm + 12.08333cm + 0.423cm + 3cm + 5 + + + + true + + + + + =Fields!CompanyInfo__Phone_No__Caption.Value + + + + + + 3.80952cm + 12.08333cm + 0.423cm + 1.89cm + 4 + + + + true + + + + + =Fields!CompanyInfo__Fax_No__Caption.Value + + + + + + 4.23252cm + 12.08333cm + 0.423cm + 1.89cm + 3 + + + + true + + + + + =Fields!CompanyInfo__VAT_Registration_No__Caption.Value + + + + + + 4.65552cm + 12.08333cm + 0.423cm + 1.89cm + 2 + + + + true + + + + + =Fields!ClosedPmtOrd__Posting_Date_Caption.Value + + + + + + 7.19352cm + 12.0881cm + 0.423cm + 3cm + 1 + + + + true + + + + + =Fields!ClosedPmtOrd__Currency_Code_Caption.Value + + + + + + 5.92452cm + 12.08333cm + 0.423cm + 3cm + + + + true + + + + + + + + + + + + + + + + + + =Fields!ClosedPmtOrd__No__.Value + =Fields!OutputNo.Value + + + Between + + + Output + true + + + + DataSet_Result + + End + + + + 12.4126cm + + 18.48333cm + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + =User!Language + true + Invalid + e2b18bbb-fc6a-4bc8-bfba-cae4d91c5aec + + + + + ClosedPmtOrd_No_ + + + ClosedPmtOrd__No__ + + + STRSUBSTNO_Text1100001_CopyText_ + + + CompanyAddr_1_ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyInfo__Phone_No__ + + + CompanyInfo__Fax_No__ + + + CompanyInfo__VAT_Registration_No__ + + + ClosedPmtOrd__Posting_Date_ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + BankAccAddr_3_ + + + BankAccAddr_2_ + + + BankAccAddr_1_ + + + ClosedPmtOrd__Currency_Code_ + + + PrintAmountsInLCY + + + OutputNo + + + PageLoop_Number + + + ClosedPmtOrd__No__Caption + + + CompanyInfo__Phone_No__Caption + + + CompanyInfo__Fax_No__Caption + + + CompanyInfo__VAT_Registration_No__Caption + + + ClosedPmtOrd__Posting_Date_Caption + + + ClosedPmtOrd__Currency_Code_Caption + + + PageCaption + + + AmtForCollection + + + AmtForCollectionFormat + + + AmtForCollection_Control32 + + + AmtForCollection_Control32Format + + + Vendor_City + + + Vendor_County + + + Vendor__Post_Code_ + + + Vendor_Name + + + ClosedDoc__Account_No__ + + + ClosedDoc__Honored_Rejtd__at_Date_ + + + ClosedDoc_Status + + + ClosedDoc__Document_No__ + + + ClosedDoc__Document_Type_ + + + ClosedDoc__Due_Date_ + + + Vendor_Name_Control28 + + + Vendor_City_Control30 + + + AmtForCollection_Control31 + + + AmtForCollection_Control31Format + + + Vendor_County_Control35 + + + ClosedDoc__Document_No___Control3 + + + ClosedDoc__No__ + + + Vendor__Post_Code__Control9 + + + ClosedDoc_Status_Control78 + + + ClosedDoc__Honored_Rejtd__at_Date__Control80 + + + ClosedDoc__Due_Date__Control8 + + + ClosedDoc__Account_No___Control1 + + + ClosedDoc__Document_Type__Control23 + + + AmtForCollection_Control36 + + + AmtForCollection_Control36Format + + + AmtForCollection_Control39 + + + AmtForCollection_Control39Format + + + ClosedDoc_Type + + + ClosedDoc_Entry_No_ + + + ClosedDoc_Bill_Gr__Pmt__Order_No_ + + + All_amounts_are_in_LCYCaption + + + Document_No_Caption + + + Bill_No_Caption + + + Vendor_Name_Control28Caption + + + Vendor__Post_Code__Control9Caption + + + Vendor_City_Control30Caption + + + AmtForCollection_Control31Caption + + + Vendor_County_Control35Caption + + + ClosedDoc_Status_Control78Caption + + + ClosedDoc__Honored_Rejtd__at_Date__Control80Caption + + + ClosedDoc__Due_Date__Control8Caption + + + ClosedDoc__Account_No___Control1Caption + + + ClosedDoc__Document_Type__Control23Caption + + + ContinuedCaption + + + EmptyStringCaption + + + ContinuedCaption_Control15 + + + TotalCaption + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrders.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrders.Page.al new file mode 100644 index 00000000000..d5abdcb7c45 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrders.Page.al @@ -0,0 +1,234 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Navigate; + +page 7000060 "Closed Payment Orders" +{ + Caption = 'Closed Payment Orders'; + DataCaptionExpression = Rec.Caption(); + InsertAllowed = false; + PageType = Document; + RefreshOnActivate = true; + SourceTable = "Closed Payment Order"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("No."; Rec."No.") + { + ApplicationArea = All; + Editable = false; + ToolTip = 'Specifies the number related to this closed payment order.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number or code of the bank where this closed payment order was delivered.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the name associated with the bank code or bank number where the closed payment order was delivered.'; + } + field("Closing Date"; Rec."Closing Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the closing date for this closed payment order.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code in which the payment order was generated.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this closed payment order.'; + } + field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Importance = Promoted; + ToolTip = 'Specifies the grouped amount for this closed payment order.'; + } + } + part(Docs; "Docs. in Closed PO Subform") + { + ApplicationArea = Basic, Suite; + SubPageLink = Type = const(Payable), + "Collection Agent" = const(Bank), + "Bill Gr./Pmt. Order No." = field("No."); + SubPageView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); + } + group(Expenses) + { + Caption = 'Expenses'; + field("Payment Order Expenses Amt."; Rec."Payment Order Expenses Amt.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the amount of payable document expenses for this closed payment order.'; + } + } + group(Auditing) + { + Caption = 'Auditing'; + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + Importance = Promoted; + ToolTip = 'Specifies when this closed payment order was posted.'; + } + field("Reason Code"; Rec."Reason Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; + } + field("No. Printed"; Rec."No. Printed") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of printed copies of this closed payment order.'; + } + } + } + area(factboxes) + { + part(Control1903433507; "Closed PO Analysis LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433207; "Closed PO Analysis Non LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Pmt. O&rd.") + { + Caption = 'Pmt. O&rd.'; + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."), + Type = const(Payable); + ToolTip = 'View or create a comment.'; + } + separator(Action25) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Enabled = true; + Image = "Report"; + RunObject = Page "Closed Pmt. Ord. Analysis"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action45) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Enabled = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + ClosedPmtOrd.Copy(Rec); + ClosedPmtOrd.SetRecFilter(); + REPORT.Run(REPORT::"Closed Payment Order Listing", true, false, ClosedPmtOrd); + end; + end; + } + } + } + area(processing) + { + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Enabled = true; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + var + begin + Navigate.SetDoc(Rec."Posting Date", Rec."No."); + Navigate.Run(); + end; + } + } + area(reporting) + { + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Navigate_Promoted"; "&Navigate") + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + ClosedPmtOrd: Record "Closed Payment Order"; + Navigate: Page Navigate; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrdersList.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrdersList.Page.al new file mode 100644 index 00000000000..c67af25b3d0 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPaymentOrdersList.Page.al @@ -0,0 +1,154 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000061 "Closed Payment Orders List" +{ + ApplicationArea = Basic, Suite; + Caption = 'Closed Payment Orders'; + CardPageID = "Closed Payment Orders"; + Editable = false; + PageType = List; + SourceTable = "Closed Payment Order"; + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number related to this closed payment order.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank where this closed payment order was delivered.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name associated with the bank code or bank number where the closed payment order was delivered.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code in which the payment order was generated.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this closed payment order.'; + } + field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + ToolTip = 'Specifies the grouped amount for this closed payment order.'; + } + } + } + area(factboxes) + { + part(Control1903433507; "Closed PO Analysis LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433207; "Closed PO Analysis Non LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Pmt. O&rd.") + { + Caption = 'Pmt. O&rd.'; + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."), + Type = filter(Payable); + ToolTip = 'View or create a comment.'; + } + separator(Action17) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + RunObject = Page "Closed Pmt. Ord. Analysis"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action19) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + ClosedPmtOrd.Copy(Rec); + ClosedPmtOrd.SetRecFilter(); + REPORT.Run(REPORT::"Closed Payment Order Listing", true, false, ClosedPmtOrd); + end; + end; + } + } + } + area(reporting) + { + } + area(Promoted) + { + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + ClosedPmtOrd: Record "Closed Payment Order"; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPmtOrdAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPmtOrdAnalysis.Page.al new file mode 100644 index 00000000000..3419d2df429 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/ClosedPmtOrdAnalysis.Page.al @@ -0,0 +1,148 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000062 "Closed Pmt. Ord. Analysis" +{ + Caption = 'Closed Pmt. Ord. Analysis'; + DataCaptionExpression = Rec.Caption(); + Editable = false; + PageType = Card; + SourceTable = "Closed Payment Order"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code in which the payment order was generated.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount for this closed payment order.'; + } + } + group(Control1100000) + { + ShowCaption = false; + fixed(Control1905470101) + { + ShowCaption = false; + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + group(Amount) + { + Caption = 'Amount'; + field(Honored; HonoredAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Editable = false; + } + field(Rejected; RedrawnAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Editable = false; + } + } + group("Amount (LCY)") + { + Caption = 'Amount (LCY)'; + field(Honored2; HonoredAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(Rejected2; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + ClosedDoc: Record "Closed Cartera Doc."; + HonoredAmt: Decimal; + RedrawnAmt: Decimal; + HonoredAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoHonored: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); + ClosedDoc.SetRange(Type, ClosedDoc.Type::Payable); + ClosedDoc.SetRange("Collection Agent", ClosedDoc."Collection Agent"::Bank); + ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Global Dimension 1 Filter", ClosedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", ClosedDoc."Global Dimension 2 Code"); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); + ClosedDoc.SetRange(Redrawn, true); + ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := ClosedDoc."Amount for Collection"; + RedrawnAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; + NoRedrawn := ClosedDoc.Count; + + ClosedDoc.SetRange(Redrawn, false); + ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := ClosedDoc."Amount for Collection"; + HonoredAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; + NoHonored := ClosedDoc.Count; + ClosedDoc.SetRange(Redrawn); + + ClosedDoc.SetRange(Status); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinClosedPOSubform.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinClosedPOSubform.Page.al new file mode 100644 index 00000000000..9ed3f13261b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinClosedPOSubform.Page.al @@ -0,0 +1,212 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000077 "Docs. in Closed PO Subform" +{ + Caption = 'Lines'; + Editable = false; + PageType = ListPart; + SourceTable = "Closed Cartera Doc."; + SourceTableView = where("Bill Gr./Pmt. Order No." = filter(<> ''), + Type = const(Payable)); + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date this closed document was created and posted.'; + Visible = false; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this closed document.'; + } + field(Status; Rec.Status) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status of the closed document.'; + } + field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date of payment or rejection of this closed document.'; + Visible = false; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment method code defined for the document number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the document that is the source of this closed document.'; + } + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the closed bill.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the description associated with this closed document.'; + } + field("Original Amount"; Rec."Original Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the initial amount of this closed document.'; + } + field("Original Amount (LCY)"; Rec."Original Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the initial amount of this document, in LCY.'; + Visible = false; + } + field("Amount for Collection"; Rec."Amount for Collection") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount for which this closed document was originally drawn.'; + } + field("Amt. for Collection (LCY)"; Rec."Amt. for Collection (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount for which this closed document was originally sent.'; + Visible = false; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for this closed document to be fully applied.'; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding, in order for this closed document to be fully settled.'; + Visible = false; + } + field(Redrawn; Rec.Redrawn) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if this document, which has come due and is now rejected, has been recirculated.'; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + Visible = false; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account number of the customer/vendor associated with this closed document.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the ledger entry number associated with the posting of this closed document.'; + } + } + } + } + + actions + { + area(processing) + { + group("&Docs.") + { + Caption = '&Docs.'; + action(Redraw) + { + ApplicationArea = Basic, Suite; + Caption = 'Redraw'; + Ellipsis = true; + Image = RefreshVoucher; + ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; + + trigger OnAction() + begin + RedrawDoc(); + end; + } + action("Dime&nsions") + { + ApplicationArea = Basic, Suite; + Caption = 'Dime&nsions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + action(Navigate) + { + ApplicationArea = Basic, Suite; + Image = Navigate; + + trigger OnAction() + begin + NavigateDoc(); + end; + } + } + } + } + + var + Text1100000: Label 'Only bills can be redrawn.'; + ClosedDoc: Record "Closed Cartera Doc."; + VendLedgEntry: Record "Vendor Ledger Entry"; + CarteraManagement: Codeunit CarteraManagement; + + [Scope('OnPrem')] + procedure NavigateDoc() + begin + CarteraManagement.NavigateClosedDoc(Rec); + end; + + local procedure RedrawDoc() + begin + CurrPage.SetSelectionFilter(ClosedDoc); + if not ClosedDoc.Find('=><') then + exit; + + ClosedDoc.SetFilter("Document Type", '<>%1', ClosedDoc."Document Type"::Bill); + if ClosedDoc.Find('-') then + Error(Text1100000); + ClosedDoc.SetRange("Document Type"); + + VendLedgEntry.Reset(); + repeat + VendLedgEntry.Get(ClosedDoc."Entry No."); + VendLedgEntry.Mark(true); + until ClosedDoc.Next() = 0; + + VendLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Redraw Payable Bills", true, false, VendLedgEntry); + CurrPage.Update(false); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinPOSubform.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinPOSubform.Page.al new file mode 100644 index 00000000000..4a9ec2a880a --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinPOSubform.Page.al @@ -0,0 +1,273 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000075 "Docs. in PO Subform" +{ + Caption = 'Lines'; + DeleteAllowed = false; + InsertAllowed = false; + PageType = ListPart; + Permissions = TableData "Cartera Doc." = m; + SourceTable = "Cartera Doc."; + SourceTableView = where(Type = const(Payable), + "Bill Gr./Pmt. Order No." = filter(<> '')); + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the when the creation of this document was posted.'; + Visible = false; + } + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this document.'; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the payment method code defined for the document number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of the document used to generate this document.'; + } + field("No."; Rec."No.") + { + ApplicationArea = All; + Editable = false; + ToolTip = 'Specifies the number associated with a specific bill.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the description associated with this document.'; + } + field("Original Amount"; Rec."Original Amount") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the initial amount of this document.'; + Visible = false; + } + field("Original Amount (LCY)"; Rec."Original Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the initial amount of this document, in LCY.'; + Visible = false; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending payment amount for the document to be settled in full.'; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending amount, in order for the document to be settled in full.'; + Visible = false; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + Visible = false; + } + field("Category Code"; Rec."Category Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a category code for this document.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the account number of the customer/vendor associated with this document.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the ledger entry number associated with the posting of this document.'; + } + } + } + } + + actions + { + area(processing) + { + group("&Docs.") + { + Caption = '&Docs.'; + action(Insert) + { + ApplicationArea = Basic, Suite; + Caption = 'Insert'; + Ellipsis = true; + ToolTip = 'Insert a bill group or payment order.'; + + trigger OnAction() + begin + AddPayableDocs(Rec."Bill Gr./Pmt. Order No."); + end; + } + action(Remove) + { + ApplicationArea = Basic, Suite; + Caption = 'Remove'; + Image = Cancel; + ToolTip = 'Remove the selected documents.'; + + trigger OnAction() + begin + RemoveDocs(Rec."Bill Gr./Pmt. Order No."); + end; + } + action("Dime&nsions") + { + ApplicationArea = Basic, Suite; + Caption = 'Dime&nsions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + action(Categorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Categorize'; + Ellipsis = true; + Enabled = true; + Image = Category; + ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; + + trigger OnAction() + begin + CategorizeDocs(); + end; + } + action(Decategorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Decategorize'; + Enabled = true; + Image = UndoCategory; + ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; + + trigger OnAction() + begin + DecategorizeDocs(); + end; + } + action(Navigate) + { + ApplicationArea = Basic, Suite; + Image = Navigate; + + trigger OnAction() + begin + NavigateDoc(); + end; + } + } + } + } + + trigger OnModifyRecord(): Boolean + begin + CODEUNIT.Run(CODEUNIT::"Document-Edit", Rec); + exit(false); + end; + + var + Doc: Record "Cartera Doc."; + CarteraManagement: Codeunit CarteraManagement; + + [Scope('OnPrem')] + procedure CategorizeDocs() + begin + CurrPage.SetSelectionFilter(Doc); + CarteraManagement.CategorizeDocs(Doc); + end; + + [Scope('OnPrem')] + procedure DecategorizeDocs() + begin + CurrPage.SetSelectionFilter(Doc); + CarteraManagement.DecategorizeDocs(Doc); + end; + + [Scope('OnPrem')] + procedure AddPayableDocs(BGPONo: Code[20]) + var + PaymentOrder: Record "Payment Order"; + begin + Doc.Copy(Rec); + if PaymentOrder.Get(BGPONo) then + PaymentOrder.TestField("Elect. Pmts Exported", false); + CarteraManagement.InsertPayableDocs(Doc); + end; + + [Scope('OnPrem')] + procedure RemoveDocs(BGPONo: Code[20]) + var + PaymentOrder: Record "Payment Order"; + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeRemoveDocs(Rec, BGPONo, Doc, CarteraManagement, IsHandled); + if IsHandled then + exit; + + Doc.Copy(Rec); + CurrPage.SetSelectionFilter(Doc); + if PaymentOrder.Get(BGPONo) then + PaymentOrder.TestField("Elect. Pmts Exported", false); + CarteraManagement.RemovePayableDocs(Doc); + end; + + [Scope('OnPrem')] + procedure NavigateDoc() + begin + CarteraManagement.NavigateDoc(Rec); + end; + + [IntegrationEvent(true, false)] + local procedure OnBeforeRemoveDocs(var Rec: Record "Cartera Doc."; var BGPONo: Code[20]; var Doc: Record "Cartera Doc."; var CarteraManagement: Codeunit CarteraManagement; var IsHandled: Boolean) + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinPostedPOSubform.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinPostedPOSubform.Page.al new file mode 100644 index 00000000000..6e53216cb31 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/DocsinPostedPOSubform.Page.al @@ -0,0 +1,369 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000076 "Docs. in Posted PO Subform" +{ + Caption = 'Lines'; + DeleteAllowed = false; + InsertAllowed = false; + PageType = ListPart; + SourceTable = "Posted Cartera Doc."; + SourceTableView = where(Type = const(Payable)); + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the date when the creation of this document was posted.'; + Visible = false; + } + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the due date of this document in a posted bill group/payment order.'; + } + field(Status; Rec.Status) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the status of this document in a posted bill group/payment order.'; + } + field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the date when this document in a posted bill group/payment order is settled or rejected.'; + Visible = false; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the payment method code for the document number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of the document in a posted bill group/payment order, from which this document was generated.'; + } + field("No."; Rec."No.") + { + ApplicationArea = All; + Editable = false; + ToolTip = 'Specifies the number of a bill in a posted bill group/payment order.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the description associated with this posted document.'; + } + field("Original Amount"; Rec."Original Amount") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the initial amount of this document in a posted bill group/payment order.'; + Visible = false; + } + field("Original Amt. (LCY)"; Rec."Original Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the initial amount of this document in a posted bill group/payment order.'; + Visible = false; + } + field("Amount for Collection"; Rec."Amount for Collection") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the amount for which this document in a posted bill group/payment order was created.'; + } + field("Amt. for Collection (LCY)"; Rec."Amt. for Collection (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the amount due for this document in a posted bill group/payment order.'; + Visible = false; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending amount for this document, in a posted bill group/payment order, to be settled in full.'; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending amount in order for this document, in a posted bill group/payment order, to be settled in full.'; + Visible = false; + } + field(Redrawn; Rec.Redrawn) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies a check mark to indicate that the bill has been redrawn since it was rejected when its due date arrived.'; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + Visible = false; + } + field("Category Code"; Rec."Category Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a filter for the categories for which documents are shown.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the account type associated with this document in a posted bill group/payment order.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the ledger entry number associated with this posted document.'; + } + } + } + } + + actions + { + area(processing) + { + group("&Docs.") + { + Caption = '&Docs.'; + action(Dimensions) + { + ApplicationArea = Basic, Suite; + Caption = 'Dime&nsions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + action(Categorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Categorize'; + Ellipsis = true; + Image = Category; + ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; + + trigger OnAction() + begin + CategorizeDocs(); + end; + } + action(Decategorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Decategorize'; + Image = UndoCategory; + ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; + + trigger OnAction() + begin + DecategorizeDocs(); + end; + } + group(Settle) + { + Caption = 'Settle'; + Enabled = true; + Image = SettleOpenTransactions; + action(TotalSettlement) + { + ApplicationArea = Basic, Suite; + Caption = 'Total Settlement'; + Ellipsis = true; + ToolTip = 'View posted documents that were settled fully.'; + + trigger OnAction() + begin + SettleDocs(); + end; + } + action(PartialSettlement) + { + ApplicationArea = Basic, Suite; + Caption = 'P&artial Settlement'; + Ellipsis = true; + ToolTip = 'View posted documents that were settled partially.'; + + trigger OnAction() + begin + PartialSettle(); + end; + } + } + action(Redraw) + { + ApplicationArea = Basic, Suite; + Caption = 'Redraw'; + Ellipsis = true; + Enabled = true; + Image = RefreshVoucher; + ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; + + trigger OnAction() + begin + RedrawDocs(); + end; + } + action(Navigate) + { + ApplicationArea = Basic, Suite; + Image = Navigate; + + trigger OnAction() + begin + NavigateDoc(); + end; + } + } + } + } + + trigger OnModifyRecord(): Boolean + begin + CODEUNIT.Run(CODEUNIT::"Posted Cartera Doc.- Edit", Rec); + exit(false); + end; + + var + Text1100000: Label 'No documents have been found that can be settled. \'; + Text1100001: Label 'Please check that at least one open document was selected.'; + Text1100004: Label 'No documents have been found that can be redrawn. \'; + Text1100005: Label 'Please check that at least one rejected or honored document was selected.'; + Text1100006: Label 'Only bills can be redrawn.'; + Text1100007: Label 'Please check that one open document was selected.'; + Text1100008: Label 'Only one open document can be selected'; + PostedDoc: Record "Posted Cartera Doc."; + VendLedgEntry: Record "Vendor Ledger Entry"; + CarteraManagement: Codeunit CarteraManagement; + + local procedure CategorizeDocs() + begin + CurrPage.SetSelectionFilter(PostedDoc); + CarteraManagement.CategorizePostedDocs(PostedDoc); + end; + + local procedure DecategorizeDocs() + begin + CurrPage.SetSelectionFilter(PostedDoc); + CarteraManagement.DecategorizePostedDocs(PostedDoc); + end; + + local procedure SettleDocs() + begin + CurrPage.SetSelectionFilter(PostedDoc); + if not PostedDoc.Find('=><') then + exit; + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + if not PostedDoc.Find('-') then + Error( + Text1100000 + + Text1100001); + + REPORT.RunModal(REPORT::"Settle Docs. in Posted PO", true, false, PostedDoc); + CurrPage.Update(false); + end; + + local procedure RedrawDocs() + begin + CurrPage.SetSelectionFilter(PostedDoc); + if not PostedDoc.Find('=><') then + exit; + + PostedDoc.SetFilter(Status, '<>%1', PostedDoc.Status::Open); + if not PostedDoc.Find('-') then + Error( + Text1100004 + + Text1100005); + + PostedDoc.SetFilter("Document Type", '<>%1', PostedDoc."Document Type"::Bill); + if PostedDoc.Find('-') then + Error(Text1100006); + PostedDoc.SetRange("Document Type"); + + VendLedgEntry.Reset(); + repeat + VendLedgEntry.Get(PostedDoc."Entry No."); + VendLedgEntry.Mark(true); + until PostedDoc.Next() = 0; + + VendLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Redraw Payable Bills", true, false, VendLedgEntry); + CurrPage.Update(false); + end; + + local procedure NavigateDoc() + begin + CarteraManagement.NavigatePostedDoc(Rec); + end; + + local procedure PartialSettle() + var + VendLedgEntry2: Record "Vendor Ledger Entry"; + PartialSettlePayable: Report "Partial Settl. - Payable"; + begin + CurrPage.SetSelectionFilter(PostedDoc); + if not PostedDoc.Find('=><') then + exit; + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + if not PostedDoc.Find('-') then + Error( + Text1100000 + + Text1100007); + if PostedDoc.Count > 1 then + Error(Text1100008); + + Clear(PartialSettlePayable); + VendLedgEntry2.Get(PostedDoc."Entry No."); + if (WorkDate() <= VendLedgEntry2."Pmt. Discount Date") and + (PostedDoc."Document Type" = PostedDoc."Document Type"::Invoice) + then + PartialSettlePayable.SetInitValue(PostedDoc."Remaining Amount" + VendLedgEntry2."Remaining Pmt. Disc. Possible", + PostedDoc."Currency Code", PostedDoc."Entry No.") + else + PartialSettlePayable.SetInitValue(PostedDoc."Remaining Amount", + PostedDoc."Currency Code", PostedDoc."Entry No."); + PartialSettlePayable.SetTableView(PostedDoc); + PartialSettlePayable.RunModal(); + CurrPage.Update(false); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.Codeunit.al new file mode 100644 index 00000000000..9ea5fa8eaf0 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.Codeunit.al @@ -0,0 +1,27 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.GeneralLedger.Journal; + +codeunit 7000060 "PO - Export N34.1" +{ + TableNo = "Gen. Journal Line"; + + trigger OnRun() + var + PaymentOrder: Record "Payment Order"; + begin + PaymentOrder.SetRange("No.", Rec.GetFilter("Document No.")); + if PaymentOrder.IsEmpty() then + Error(ExportPaymentErr); + Commit(); + REPORT.Run(REPORT::"PO - Export N34.1", true, false, PaymentOrder); + end; + + var + ExportPaymentErr: Label 'You cannot export payments from Payment Journal with the selected Payment Export Format in Bal. Account No.'; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.Report.al new file mode 100644 index 00000000000..166859ebf8f --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.Report.al @@ -0,0 +1,566 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.EServices.EDocument; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Vendor; +using System.Utilities; + +report 7000060 "PO - Export N34.1" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Purchases/Payables/POExportN341.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'PO - Export N34.1'; + Permissions = TableData "Cartera Doc." = rm, + TableData "Payment Order" = m; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem("Payment Order"; "Payment Order") + { + DataItemTableView = sorting("No.") where("Elect. Pmts Exported" = const(false)); + RequestFilterFields = "No."; + column(Payment_Order_No_; "No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem("Cartera Doc."; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = "Payment Order"; + DataItemTableView = sorting(Type, "Bill Gr./Pmt. Order No.", "Transfer Type", "Account No.") order(ascending) where(Type = const(Payable)); + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyAddr_7_; CompanyAddr[7]) + { + } + column(CompanyAddr_8_; CompanyAddr[8]) + { + } + column(CopyTxt; CopyTxt) + { + } + column(PayeeAddress_1_; PayeeAddress[1]) + { + } + column(PayeeAddress_2_; PayeeAddress[2]) + { + } + column(PayeeAddress_3_; PayeeAddress[3]) + { + } + column(PayeeAddress_4_; PayeeAddress[4]) + { + } + column(PayeeAddress_5_; PayeeAddress[5]) + { + } + column(PayeeAddress_6_; PayeeAddress[6]) + { + } + column(PayeeAddress_7_; PayeeAddress[7]) + { + } + column(PayeeAddress_8_; PayeeAddress[8]) + { + } + column(STRSUBSTNO_Text1100003_PayeeCCC_VendBankAccCode__ExportAmount_; StrSubstNo(Text1100003, PayeeCCC, VendBankAccCode, ExportAmount)) + { + } + column(ExportAmount; ExportAmount) + { + } + column(VendorCCCBankNo; VendorCCCBankNo) + { + } + column(VendCCCBankBranchNo; VendCCCBankBranchNo) + { + } + column(VendCCCControlDigits; VendCCCControlDigits) + { + } + column(VendCCCAccNo; VendCCCAccNo) + { + } + column(LastRemittanceAdvNo; LastRemittanceAdvNo) + { + } + column(DeliveryDate; Format(DeliveryDate)) + { + } + column(OutputNo; OutputNo) + { + } + column(TempUserText; TempUserText) + { + } + column(TempVendCCCAccNo; TempVendCCCAccNo) + { + } + column(TempVendCCCControlDigits; TempVendCCCControlDigits) + { + } + column(Cartera_Doc___Cartera_Doc___Description; Description) + { + } + column(Cartera_Doc___Cartera_Doc____Document_No__; "Document No.") + { + } + column(Cartera_Doc___Cartera_Doc____Posting_Date_; Format("Posting Date")) + { + } + column(Cartera_Doc___Remaining_Amount_; "Remaining Amount") + { + } + column(ExportAmount_Control1100049; ExportAmount) + { + AutoFormatType = 1; + } + column(Cartera_Doc__Type; Type) + { + } + column(Cartera_Doc__Entry_No_; "Entry No.") + { + } + column(Cartera_Doc__Account_No_; "Account No.") + { + } + column(Cartera_Doc__Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") + { + } + column(To_Caption; To_CaptionLbl) + { + } + column(DescriptionCaption; DescriptionCaptionLbl) + { + } + column(Document_NumberCaption; Document_NumberCaptionLbl) + { + } + column(REMITTANCE_ADVICECaption; REMITTANCE_ADVICECaptionLbl) + { + } + column(Deposited_In_Caption; Deposited_In_CaptionLbl) + { + } + column(DateCaption; DateCaptionLbl) + { + } + column(Remittance_Advice_Number_Caption; Remittance_Advice_Number_CaptionLbl) + { + } + column(Settlement_Date_Caption; Settlement_Date_CaptionLbl) + { + } + column(AmountCaption; AmountCaptionLbl) + { + } + column(ExportAmountCaption; ExportAmountCaptionLbl) + { + } + column(Vendor_CCC_Bank_No_Caption; Vendor_CCC_Bank_No_CaptionLbl) + { + } + column(Vendor_CCC_Bank_Branch_No_Caption; Vendor_CCC_Bank_Branch_No_CaptionLbl) + { + } + column(Vendor_CCC_Control_DigitsCaption; Vendor_CCC_Control_DigitsCaptionLbl) + { + } + column(Vendor_CCC_Account_No_Caption; Vendor_CCC_Account_No_CaptionLbl) + { + } + column(Total_AmountCaption; Total_AmountCaptionLbl) + { + } + + trigger OnAfterGetRecord() + var + VendorBankAccount1: Record "Vendor Bank Account"; + begin + if PreviousAccountNo <> "Account No." then begin + TestField("Account No."); + TestField("Payment Method Code"); + DocType := DocMisc.DocType2("Payment Method Code"); + + ElectPmtMgmt.GetPayeeInfo("Account No.", VendorCCCBankNo, VendCCCBankBranchNo, VendCCCControlDigits, VendCCCAccNo, + PayeeAddress, PayeeCCC, IBAN, SwiftCode, "Transfer Type"); + + GetExportedAmount("Payment Order"."No.", "Account No."); + + if (CopyTxt = '') and not CurrReport.Preview then begin + Vendor.Get("Account No."); + VATRegVend := Vendor."VAT Registration No."; + VATRegVend := VATRegVend + PadStr('', MaxStrLen(VATRegVend) - StrLen(VATRegVend), ' '); + + if (ActualTransferType <> "Transfer Type") and + ((TotalDoc10Vend <> 0) or (TotalDoc33Vend <> 0)) + then + case ActualTransferType of + ActualTransferType::National: + ElectPmtMgmt.InsertDomesticTrailer(TotalDoc10Vend, ElectPmtMgmt.EuroAmount(TotalAmountNAC)); + ActualTransferType::International: + ElectPmtMgmt.InsertInterTransferTrailer(TotalDoc33Vend, ElectPmtMgmt.EuroAmount(TotalAmountInter)); + end; + + case "Transfer Type" of + "Transfer Type"::National: + begin + ActualTransferType := "Transfer Type"::National; + ElectPmtMgmt.InsertDomesticTransferBlock( + DocType, PmtOrderConcept, ExpensesCode, VATRegVend, + ElectPmtMgmt.EuroAmount(ExportAmount), PayeeCCC, Vendor.Name); + TotalDoc10Vend := TotalDoc10Vend + 1; + TotalAmountNAC := TotalAmountNAC + ExportAmount; + end; + "Transfer Type"::International: + begin + ActualTransferType := "Transfer Type"::International; + ElectPmtMgmt.InsertInterTransferBlock( + PmtOrderConcept, ExpensesCode, ExpensesCodeValueInter, VATRegVend, IBAN, + ElectPmtMgmt.EuroAmount(ExportAmount), + Format(VendorBankAccount."Country/Region Code"), SwiftCode, Vendor.Name); + TotalDoc33Vend := TotalDoc33Vend + 1; + TotalAmountInter := TotalAmountInter + ExportAmount; + end; + else + Error(Text1100002, "Entry No.", "Account No.", "Document No.", "Bill Gr./Pmt. Order No."); + end; + if "Document Type" = "Document Type"::Bill then + DocumentType := DocumentType::Bill + else + DocumentType := DocumentType::Invoice; + if DocType = '4' then + ElectPmtMgmt.InsertIntoCheckLedger(BankAccount."No.", DeliveryDate, DocumentType, "Document No.", + Description, "Payment Order"."Bank Account No.", ExportAmount, RecordId); + end; + end; + "Elect. Pmts Exported" := true; + "Export File Name" := EPayExportFilePath; + "Document No." := BankAccount."Last Remittance Advice No."; + Modify(); + PreviousAccountNo := "Account No."; + + VendorBankAccount1.Reset(); + VendorBankAccount1.SetRange("Vendor No.", "Account No."); + VendorBankAccount1.SetRange("Use For Electronic Payments", true); + if VendorBankAccount1.FindFirst() then begin + TempVendCCCControlDigits := VendorBankAccount1."CCC Control Digits"; + TempVendCCCAccNo := VendorBankAccount1."CCC Bank Account No."; + TempUserText := + StrSubstNo( + Text1100003, + ConvertStr(PadStr(VendorBankAccount1."CCC Bank No.", 4, ' '), ' ', '0') + + ConvertStr(PadStr(VendorBankAccount1."CCC Bank Branch No.", 4, ' '), ' ', '0') + + PadStr(VendorBankAccount1."CCC Control Digits", 2, ' ') + + ConvertStr(PadStr(VendorBankAccount1."CCC Bank Account No.", 10, ' '), ' ', '0'), + VendBankAccCode, + Format(-ExportAmount)); + end; + end; + + trigger OnPostDataItem() + begin + if (CopyTxt = '') and not CurrReport.Preview then begin + case ActualTransferType of + ActualTransferType::National: + ElectPmtMgmt.InsertDomesticTrailer(TotalDoc10Vend, ElectPmtMgmt.EuroAmount(TotalAmountNAC)); + ActualTransferType::International: + ElectPmtMgmt.InsertInterTransferTrailer(TotalDoc33Vend, ElectPmtMgmt.EuroAmount(TotalAmountInter)); + end; + + ElectPmtMgmt.InsertGeneralTrailer( + TotalDoc10Vend + TotalDoc33Vend, TotalAmountNAC + TotalAmountInter, SilentMode, SilentModeFileName); + end; + end; + + trigger OnPreDataItem() + begin + PreviousAccountNo := ''; + end; + } + + trigger OnAfterGetRecord() + begin + if Number = 1 then // Original + Clear(CopyTxt) + else begin + CopyTxt := Text1100000; + OutputNo += 1; + end; + end; + + trigger OnPreDataItem() + begin + SetRange(Number, 1, NoOfCopies + 1); + + OutputNo := 1; + end; + } + + trigger OnAfterGetRecord() + begin + TotalAmount := 0; + Amount := 0; + TotalDoc10Vend := 0; + TotalDoc33Vend := 0; + TotalAmountInter := 0; + AmountPaid := 0; + TotalAmountPaid := 0; + + TestField("Currency Code", ''); + TestField("Export Electronic Payment"); + TestField("Bank Account No."); + BankAccount.Get("Bank Account No."); + BankAccount.CalcFields(Balance); + if BankAccount.Balance < 0 then + if not Confirm(Text1100004, false, BankAccount."No.", BankAccount.Name, BankAccount.Balance) then + CurrReport.Quit(); + + ElectPmtMgmt.GetCCCBankInfo("Bank Account No.", + CCCBankNo, CCCBankBranchNo, CCCControlDigits, CCCAccNo); + + if (CopyTxt = '') and not CurrReport.Preview then begin + if CheckErrors then + Relat := '1' + else + Relat := '0'; + + ElectPmtMgmt.GetLastEPayFileCreation(EPayExportFilePath, BankAccount); + + if BankAccount."Last Remittance Advice No." <> '' then + BankAccount."Last Remittance Advice No." := IncStr(BankAccount."Last Remittance Advice No.") + else + BankAccount."Last Remittance Advice No." := Text1100001; + LastRemittanceAdvNo := BankAccount."Last Remittance Advice No."; + BankAccount.Modify(); + end else + if BankAccount."Last Remittance Advice No." <> '' then + LastRemittanceAdvNo := IncStr(BankAccount."Last Remittance Advice No.") + else + LastRemittanceAdvNo := Text1100001; + + if not CurrReport.Preview then begin + ElectPmtMgmt.InsertHeaderRecType1(DeliveryDate, "Posting Date", + CCCBankNo + CCCBankBranchNo + CCCControlDigits + CCCAccNo, Relat); + ElectPmtMgmt.InsertHeaderRecType2(); + ElectPmtMgmt.InsertHeaderRecType3(); + ElectPmtMgmt.InsertHeaderRecType4(); + "Elect. Pmts Exported" := true; + Modify(); + end; + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(DeliveryDate; DeliveryDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Delivery Date'; + ToolTip = 'Specifies a number to identify the operations declaration.'; + } + field(ExpensesCode; ExpensesCode) + { + ApplicationArea = Basic, Suite; + Caption = 'Expenses Code'; + OptionCaption = 'Payer,Payee'; + ToolTip = 'Specifies who is responsible for the payment expenses, the payer or the payee.'; + } + field(PmtOrderConcept; PmtOrderConcept) + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order Concept'; + OptionCaption = 'Payroll,Retirement Payroll,Others'; + ToolTip = 'Specifies the payment order concept.'; + } + field(CheckErrors; CheckErrors) + { + ApplicationArea = Basic, Suite; + Caption = 'Relation'; + ToolTip = 'Specifies if you want the bank to send you a detailed list of all transfer charges. Deselect the check box if you want a simple total of charges for all the transfers made.'; + } + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'Number Of Copies'; + ToolTip = 'Specifies the number of additional copies of the remittance advice that will be printed by this process. One document is always printed so that it can be mailed to the payee.'; + } + field(ExpensesCodeValueInter; ExpensesCodeValueInter) + { + ApplicationArea = Basic, Suite; + Caption = 'Shared (Only International Transf.)'; + ToolTip = 'Specifies if you want to share the expenses between the payer and the payee. This is only applicable for international transfers.'; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + if DeliveryDate = 0D then + DeliveryDate := Today; + end; + } + + labels + { + } + + trigger OnInitReport() + begin + SilentMode := false; + end; + + trigger OnPreReport() + begin + CompanyInfo.Get(); + FormatAddr.Company(CompanyAddr, CompanyInfo); + + TotalDoc10Vend := 0; + TotalDoc33Vend := 0; + end; + + trigger OnPostReport() + begin + if not (CurrReport.Preview() or SilentMode) then + ElectPmtMgmt.DownloadFile(); + end; + + var + CompanyInfo: Record "Company Information"; + Vendor: Record Vendor; + BankAccount: Record "Bank Account"; + VendorBankAccount: Record "Vendor Bank Account"; + DocMisc: Codeunit "Document-Misc"; + FormatAddr: Codeunit "Format Address"; + ElectPmtMgmt: Codeunit "Elect. Pmts Management"; + CheckErrors: Boolean; + ExpensesCodeValueInter: Boolean; + VendBankAccCode: Code[20]; + DocType: Code[10]; + CopyTxt: Code[10]; + DeliveryDate: Date; + TotalAmount: Decimal; + TotalDoc10Vend: Decimal; + TotalDoc33Vend: Decimal; + TotalAmountInter: Decimal; + AmountPaid: Decimal; + TotalAmountPaid: Decimal; + ExportAmount: Decimal; + NoOfCopies: Integer; + ExpensesCode: Option Payer,Payee; + PmtOrderConcept: Option Payroll,RetPayroll,Others; + ActualTransferType: Option National,International,Special; + DocumentType: Enum "Gen. Journal Document Type"; + VATRegVend: Text[12]; + CCCBankBranchNo: Text[4]; + CCCControlDigits: Text[2]; + CCCAccNo: Text[10]; + CCCBankNo: Text[4]; + VendCCCBankBranchNo: Text[4]; + VendCCCControlDigits: Text[2]; + VendCCCAccNo: Text[10]; + VendorCCCBankNo: Text[4]; + PayeeCCC: Text[20]; + Relat: Text[1]; + IBAN: Text[34]; + SwiftCode: Text[11]; + Text1100000: Label 'COPY'; + Text1100001: Label 'REM001'; + Text1100002: Label 'Special Transfers are not allowed from Cartera. Please remove Entry No. %1, Account No. %2, Document No. %3 from Payment Order No. %4 and try again.'; + CompanyAddr: array[8] of Text[100]; + PayeeAddress: array[8] of Text[100]; + Text1100003: Label 'We would like to inform you that your Account Number %1, in %2 Bank was credited for the Amount of %3 to settle these transactions:'; + LastRemittanceAdvNo: Text[20]; + EPayExportFilePath: Text[250]; + Text1100004: Label 'Bank %1 - %2, has an overdue balance of %3. Do you still want to record the amount?'; + OutputNo: Integer; + TempVendCCCAccNo: Text[30]; + TempVendCCCControlDigits: Text[30]; + TempUserText: Text[1024]; + PreviousAccountNo: Code[20]; + TotalAmountNAC: Decimal; + To_CaptionLbl: Label 'To:'; + DescriptionCaptionLbl: Label 'Description'; + Document_NumberCaptionLbl: Label 'Document Number'; + REMITTANCE_ADVICECaptionLbl: Label 'REMITTANCE ADVICE'; + Deposited_In_CaptionLbl: Label 'Deposited In:'; + DateCaptionLbl: Label 'Date'; + Remittance_Advice_Number_CaptionLbl: Label 'Remittance Advice Number:'; + Settlement_Date_CaptionLbl: Label 'Settlement Date:'; + AmountCaptionLbl: Label 'Amount'; + ExportAmountCaptionLbl: Label 'Deposit Amount:'; + Vendor_CCC_Bank_No_CaptionLbl: Label 'Vendor CCC Bank No.'; + Vendor_CCC_Bank_Branch_No_CaptionLbl: Label 'Vendor CCC Bank Branch No.'; + Vendor_CCC_Control_DigitsCaptionLbl: Label 'Vendor CCC Control Digits'; + Vendor_CCC_Account_No_CaptionLbl: Label 'Vendor CCC Account No.'; + Total_AmountCaptionLbl: Label 'Total Amount'; + SilentMode: Boolean; + SilentModeFileName: Text; + + [Scope('OnPrem')] + procedure GetExportedAmount(PmtOrderNo: Code[20]; CustVendAccNo: Code[20]) + var + CarteraDoc: Record "Cartera Doc."; + begin + CarteraDoc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date"); + CarteraDoc.SetRange(Type, CarteraDoc.Type::Payable); + CarteraDoc.SetRange("Bill Gr./Pmt. Order No.", PmtOrderNo); + CarteraDoc.SetRange("Account No.", CustVendAccNo); + ExportAmount := 0; + if CarteraDoc.Find('-') then + repeat + ExportAmount := ExportAmount + CarteraDoc."Remaining Amount"; + until CarteraDoc.Next() = 0; + end; + + [Scope('OnPrem')] + procedure EnableSilentMode(FileName: Text) + begin + SilentMode := true; + SilentModeFileName := FileName; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.rdlc new file mode 100644 index 00000000000..458a03c4ff7 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/POExportN341.rdlc @@ -0,0 +1,1868 @@ + + + 0 + + + + SQL + + + None + 192ea47c-a0b3-4754-aebb-dc4fc65f4294 + + + + + + + + + + + 19.32cm + + + + + 14.38203cm + + + + + + + + + + 6.4cm + + + 3.85cm + + + 3.75cm + + + 3.6cm + + + + + 0.423cm + + + + + true + + + + + =Fields!Cartera_Doc___Cartera_Doc___Description.Value + + + + + + + + + + + + + true + + + + + =Fields!Cartera_Doc___Cartera_Doc____Document_No__.Value + + + + + + + + + + + + + + true + + + + + =Fields!Cartera_Doc___Cartera_Doc____Posting_Date_.Value + + + + + + + + + + + + + true + + + + + =Fields!Cartera_Doc___Remaining_Amount_.Value + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox44 + + + + + + + + true + true + + + + + + + + + + + + textbox45 + + + + + + + + true + true + + + + + + + + + + + textbox46 + + + + + + + + true + true + + + + + + + + + + + textbox47 + + + + + + + + 0.16656in + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + 0.16656in + + + + + true + + + + + =First(Fields!Total_AmountCaption.Value) + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + + + + + =Fields!ExportAmount.Value + + + + + + + + + + + + + + + + + + + + + + + + + + Detail + + + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + + DataSet_Result + 4.99669in + 0.16656in + 6.93in + 39 + + + true + + + + + =Fields!DescriptionCaption.Value + + + + + + + textbox38 + 11.421cm + 0.45cm + 1.0575cm + 6cm + 38 + + + Bottom + 2pt + 2pt + 2pt + 0.2115cm + + + + true + + + + + =Fields!AmountCaption.Value + + + + + + + 4.49702in + 5.66291in + 1.0575cm + 3.6cm + 37 + + + Bottom + 2pt + 2pt + 2pt + 0.2115cm + + + + true + + + + + =Fields!DateCaption.Value + + + + + + + 4.49702in + 4.16391in + 1.0575cm + 3.15cm + 36 + + + Bottom + 2pt + 2pt + 2pt + 0.2115cm + + + + true + + + + + =Fields!Document_NumberCaption.Value + + + + + + + 4.49702in + 2.6649in + 1.0575cm + 3.45cm + 35 + + + Bottom + 2pt + 2pt + 2pt + 0.2115cm + + + + true + true + + + + + =Fields!STRSUBSTNO_Text1100003_PayeeCCC_VendBankAccCode__ExportAmount_.Value + + + + + + + textbox37 + 9.306cm + 0.45cm + 1.269cm + 17.55cm + 34 + + + + true + true + + + + + =Fields!To_Caption.Value + + + + true + + + + + =Fields!PayeeAddress_3_.Value + + + + true + + + + + =Fields!PayeeAddress_2_.Value + + + + true + + + + + =Fields!PayeeAddress_8_.Value + + + + true + + + + + =Fields!PayeeAddress_4_.Value + + + + true + + + + + =Fields!PayeeAddress_5_.Value + + + + true + + + + + =Fields!PayeeAddress_6_.Value + + + + true + + + + + =Fields!PayeeAddress_7_.Value + + + + true + + + + + =Fields!PayeeAddress_1_.Value + + + + true + + + + + =Fields!Vendor_CCC_Bank_Branch_No_Caption.Value + + + + 2.6649in + 4.08063in + 0.16667in + 5.3cm + 24 + + + + true + + + + + =Fields!Vendor_CCC_Bank_No_Caption.Value + + + + textbox29 + 2.49834in + 4.08063in + 0.16667in + 5.3cm + 23 + + + + true + + + + + =Fields!VendCCCAccNo.Value + + + + 2.99801in + 6.237in + 0.16667in + 2.52cm + 22 + + + + true + + + + + =Fields!Vendor_CCC_Control_DigitsCaption.Value + + + + 2.83146in + 4.08063in + 0.16667in + 5.3cm + 21 + + + + true + + + + + =Fields!Vendor_CCC_Account_No_Caption.Value + + + + 2.99801in + 4.08063in + 0.16667in + 5.3cm + 20 + + + + true + + + + + =Fields!VendorCCCBankNo.Value + + + + textbox33 + 6.345cm + 15.84cm + 0.16667in + 2.52cm + 19 + + + + true + + + + + =Fields!VendCCCBankBranchNo.Value + + + + 2.6649in + 6.237in + 0.16667in + 2.52cm + 18 + + + + true + + + + + =Fields!Deposited_In_Caption.Value + + + + true + + + + + =Fields!VendCCCControlDigits.Value + + + + 2.83146in + 6.237in + 0.16667in + 2.52cm + 16 + + + + true + + + + + =Fields!LastRemittanceAdvNo.Value + + + + textbox13 + 2.538cm + 16.8cm + 0.16667in + 15 + + + + true + + + + + =Fields!Remittance_Advice_Number_Caption.Value + + + + textbox12 + 2.538cm + 10.998cm + 0.16667in + 5.592cm + 14 + + + + true + + + + + =Fields!DeliveryDate.Value + + + + textbox15 + 3.384cm + 16.8cm + 0.16667in + 13 + + + + true + + + + + =Fields!Settlement_Date_Caption.Value + + + + textbox14 + 3.384cm + 10.998cm + 0.16667in + 5.592cm + 12 + + + + true + + + + + =Fields!REMITTANCE_ADVICECaption.Value + + + + true + + + + + =Fields!CopyTxt.Value + + + + true + + + + + =Fields!CompanyAddr_3_.Value + + + + 0.33311in + 0.33075in + 0.423cm + 7.35cm + 9 + + + + true + + + + + =Fields!CompanyAddr_2_.Value + + + + 0.16656in + 0.33075in + 0.423cm + 7.35cm + 8 + + + + true + + + + + =Fields!CompanyAddr_5_.Value + + + + 0.66622in + 0.33075in + 0.423cm + 7.35cm + 7 + + + + true + + + + + =Fields!CompanyAddr_4_.Value + + + + 0.49967in + 0.33075in + 0.423cm + 7.35cm + 6 + + + + true + + + + + =Fields!CompanyAddr_6_.Value + + + + 0.83278in + 0.33075in + 0.423cm + 7.35cm + 5 + + + + true + + + + + =Fields!CompanyAddr_7_.Value + + + + 0.99934in + 0.33075in + 0.423cm + 7.35cm + 4 + + + + true + + + + + =Fields!CompanyAddr_1_.Value + + + + textbox2 + 0.84cm + 0.423cm + 7.35cm + 3 + + + + true + + + + + =Fields!CompanyAddr_8_.Value + + + + 1.16589in + 0.33075in + 0.423cm + 7.35cm + 2 + + + + true + + + + + =Fields!ExportAmountCaption.Value + + + + textbox26 + 4.653cm + 10.95cm + 0.16667in + 3.78cm + 1 + + + + true + + + + + =Fields!ExportAmount.Value + + + + + + + textbox27 + 4.653cm + 15cm + 0.16667in + 3.57cm + + + + true + + + + + + + + + + + + + + + + + + =Fields!Payment_Order_No_.Value + =Fields!OutputNo.Value + =Fields!Cartera_Doc__Account_No_.Value + + + Between + + + Output + true + + + + DataSet_Result + + End + + + + =Fields!Payment_Order_No_.Value + NotEqual + + =nothing + + + + + + + 14.38203cm + + 19.32cm + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 0cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + + =User!Language + true + Invalid + e3f93763-ace4-45a2-8476-a2f54d0dd6d1 + + + + + Payment_Order_No_ + + + CompanyAddr_1_ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyAddr_7_ + + + CompanyAddr_8_ + + + CopyTxt + + + PayeeAddress_1_ + + + PayeeAddress_2_ + + + PayeeAddress_3_ + + + PayeeAddress_4_ + + + PayeeAddress_5_ + + + PayeeAddress_6_ + + + PayeeAddress_7_ + + + PayeeAddress_8_ + + + STRSUBSTNO_Text1100003_PayeeCCC_VendBankAccCode__ExportAmount_ + + + ExportAmount + + + ExportAmountFormat + + + VendorCCCBankNo + + + VendCCCBankBranchNo + + + VendCCCControlDigits + + + VendCCCAccNo + + + LastRemittanceAdvNo + + + DeliveryDate + + + OutputNo + + + TempUserText + + + TempVendCCCAccNo + + + TempVendCCCControlDigits + + + Cartera_Doc___Cartera_Doc___Description + + + Cartera_Doc___Cartera_Doc____Document_No__ + + + Cartera_Doc___Cartera_Doc____Posting_Date_ + + + Cartera_Doc___Remaining_Amount_ + + + Cartera_Doc___Remaining_Amount_Format + + + ExportAmount_Control1100049 + + + ExportAmount_Control1100049Format + + + Cartera_Doc__Type + + + Cartera_Doc__Entry_No_ + + + Cartera_Doc__Account_No_ + + + Cartera_Doc__Bill_Gr__Pmt__Order_No_ + + + To_Caption + + + DescriptionCaption + + + Document_NumberCaption + + + REMITTANCE_ADVICECaption + + + Deposited_In_Caption + + + DateCaption + + + Remittance_Advice_Number_Caption + + + Settlement_Date_Caption + + + AmountCaption + + + ExportAmountCaption + + + Vendor_CCC_Bank_No_Caption + + + Vendor_CCC_Bank_Branch_No_Caption + + + Vendor_CCC_Control_DigitsCaption + + + Vendor_CCC_Account_No_Caption + + + Total_AmountCaption + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PartialSettlPayable.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PartialSettlPayable.Report.al new file mode 100644 index 00000000000..d1396a3b1a4 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PartialSettlPayable.Report.al @@ -0,0 +1,513 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Sales.Receivables; + +report 7000085 "Partial Settl. - Payable" +{ + Caption = 'Partial Settl. - Payable'; + Permissions = TableData "Cust. Ledger Entry" = imd, + TableData "Vendor Ledger Entry" = imd, + TableData "G/L Register" = m, + TableData "Posted Cartera Doc." = imd, + TableData "Closed Cartera Doc." = imd, + TableData "Posted Payment Order" = imd, + TableData "Closed Payment Order" = imd; + ProcessingOnly = true; + + dataset + { + dataitem(PostedDoc; "Posted Cartera Doc.") + { + DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where(Status = const(Open)); + + trigger OnAfterGetRecord() + var + FromJnl: Boolean; + begin + IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("No."); + if PostedPmtOrd."No." = '' then begin + PostedPmtOrd.Get("Bill Gr./Pmt. Order No."); + BankAcc.Get(PostedPmtOrd."Bank Account No."); + Delay := BankAcc."Delay for Notices"; + end; + + RemainingAmt2 := "Remaining Amount" - AppliedAmt; + + DocCount := DocCount + 1; + Window.Update(1, DocCount); + + case "Document Type" of + "Document Type"::Invoice, "Document Type"::"Credit Memo": + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine."Document Date" := GenJnlLine."Document Date"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); + VendLedgEntry.Get(PostedDoc."Entry No."); + OnBeforeValidateInvoiceAccountNo(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, FromJnl, ExistsNoRealVAT); + GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100001, PostedDoc."Document No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, AppliedAmt); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + "Global Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; + GenJnlLine.Validate("Recipient Bank Account", VendLedgEntry."Recipient Bank Account"); + GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + + OnAfterInvoiceGenJnlLineInsert( + GenJnlLine, VendLedgEntry, PostedDoc, PostedPmtOrd, FromJnl, ExistsNoRealVAT, + AppliedAmt, ExistVATEntry, FirstVATEntryNo, LastVATEntryNo, NoRealVATBuffer); + if AppliedAmt = RemainingAmt then begin + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + VendLedgEntry.Modify(); + RemainingAmt2 := 0; + end; + end; + "Document Type"::Bill: + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); + VendLedgEntry.Get(PostedDoc."Entry No."); + + if GLSetup."Unrealized VAT" then begin + FromJnl := false; + if PostedDoc."From Journal" then + FromJnl := true; + ExistsNoRealVAT := GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry, FromJnl); + end; + + GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, AppliedAmt); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; + GenJnlLine.Validate("Recipient Bank Account", VendLedgEntry."Recipient Bank Account"); + GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + if GLSetup."Unrealized VAT" and + ExistsNoRealVAT and + (not IsRedrawn) + then begin + OnBeforeVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); + CarteraManagement.VendUnrealizedVAT2( + VendLedgEntry, + -AppliedAmt, + GenJnlLine, + ExistVATEntry, + FirstVATEntryNo, + LastVATEntryNo, + NoRealVATBuffer, + FromJnl, + "Document No."); + OnAfterVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); + + if NoRealVATBuffer.Find('-') then + repeat + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer.Account, + NoRealVATBuffer.Amount); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer."Balance Account", + -NoRealVATBuffer.Amount); + until NoRealVATBuffer.Next() = 0; + end; + + if AppliedAmt = "Remaining Amount" then begin + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + VendLedgEntry.Modify(); + end; + end; + end; + + DimSetID := "Dimension Set ID"; + OnAfterPostedDocOnAfterGetRecord(PostedDoc); + end; + + trigger OnPostDataItem() + begin + if DocCount = 0 then + Error( + Text1100003 + + Text1100004); + + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); + GenJnlLine.Validate("Account No.", BankAcc."No."); + if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)) + else + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100001, PostedDoc."Document No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedPmtOrd."Currency Code"); + GenJnlLine.Validate(Amount, -AppliedAmt); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Dimension Set ID" := + CarteraManagement.GetCombinedDimSetID(GenJnlLine, DimSetID); + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + + if PostedPmtOrd."Currency Code" <> '' then + if SumLCYAmt <> 0 then begin + Currency.SetFilter(Code, PostedPmtOrd."Currency Code"); + Currency.FindFirst(); + if SumLCYAmt > 0 then begin + Currency.TestField("Residual Gains Account"); + Acct := Currency."Residual Gains Account"; + end else begin + Currency.TestField("Residual Losses Account"); + Acct := Currency."Residual Losses Account"; + end; + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); + GenJnlLine.Validate("Account No.", Acct); + GenJnlLine.Description := Text1100005; + GenJnlLine.Validate("Currency Code", ''); + GenJnlLine.Validate(Amount, -SumLCYAmt); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Dimension Set ID" := + CarteraManagement.GetCombinedDimSetID(GenJnlLine, VendLedgEntry."Dimension Set ID"); + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); + GenJnlLine.Insert(); + end; + + DocPost.PostSettlement(GenJnlLine); + + VendLedgEntry.Get("Entry No."); + Get(Type, "Entry No."); + "Honored/Rejtd. at Date" := PostingDate; + "Remaining Amount" := RemainingAmt2; + "Remaining Amt. (LCY)" := Round(CurrExchRate.ExchangeAmtFCYToLCY( + VendLedgEntry."Posting Date", + VendLedgEntry."Currency Code", + RemainingAmt2, + CurrExchRate.ExchangeRate(VendLedgEntry."Posting Date", VendLedgEntry."Currency Code")), + GLSetup."Amount Rounding Precision"); + if RemainingAmt2 = 0 then begin + "Remaining Amt. (LCY)" := 0; + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + Status := Status::Honored; + VendLedgEntry.Open := false; + end else begin + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Open; + Status := Status::Open; + VendLedgEntry.Open := true; + end; + + OnBeforePostedDocModify(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd); + VendLedgEntry.Modify(); + Modify(); + PostedPmtOrd.Modify(); + + DocPost.ClosePmtOrdIfEmpty(PostedPmtOrd, PostingDate); + + Window.Close(); + + if ExistVATEntry then begin + GLReg.FindLast(); + GLReg."From VAT Entry No." := FirstVATEntryNo; + GLReg."To VAT Entry No." := LastVATEntryNo; + GLReg.Modify(); + end; + + OnAfterPostedDocOnPostDataItem(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd); + Commit(); + + Message( + Text1100006, + DocCount, RemainingAmt, PostedPmtOrd."No.", AppliedAmt); + end; + + trigger OnPreDataItem() + begin + DocPost.CheckPostingDate(PostingDate); + + SourceCodeSetup.Get(); + SourceCode := SourceCodeSetup."Cartera Journal"; + DocCount := 0; + SumLCYAmt := 0; + GenJnlLineNextNo := 0; + ExistVATEntry := false; + Window.Open( + Text1100000); + end; + } + } + + requestpage + { + SaveValues = false; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PostingDate; PostingDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Posting Date'; + NotBlank = true; + ToolTip = 'Specifies the posting date.'; + + trigger OnValidate() + var + VendLedgEntry2: Record "Vendor Ledger Entry"; + begin + VendLedgEntry2.Get(VendLedgEntryNo); + if VendLedgEntry2."Document Type" = VendLedgEntry2."Document Type"::Invoice then begin + VendLedgEntry2.CalcFields("Remaining Amount"); + if PostingDate > VendLedgEntry2."Pmt. Discount Date" then + RemainingAmt := -VendLedgEntry2."Remaining Amount" + else + RemainingAmt := -VendLedgEntry2."Remaining Amount" + VendLedgEntry2."Remaining Pmt. Disc. Possible"; + AppliedAmt := RemainingAmt; + end; + end; + } + field(RemainingAmt; RemainingAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = CurrencyCode; + AutoFormatType = 1; + Caption = 'Remaining Amount'; + Editable = false; + ToolTip = 'Specifies the pending, unpaid amount.'; + } + field(CurrencyCode; CurrencyCode) + { + ApplicationArea = Basic, Suite; + Caption = 'Currency Code'; + Editable = false; + TableRelation = Currency; + ToolTip = 'Specifies the currency of the amounts.'; + } + field(AppliedAmt; AppliedAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = CurrencyCode; + AutoFormatType = 1; + Caption = 'Settled Amount'; + Editable = true; + MinValue = 0; + NotBlank = true; + ToolTip = 'Specifies the amount that you wish to apply to the total amount due.'; + + trigger OnValidate() + begin + if AppliedAmt > RemainingAmt then + Error(Text1100007, RemainingAmt); + end; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnInitReport() + begin + PostingDate := WorkDate(); + RemainingAmt := 0; + AppliedAmt := 0; + CurrencyCode := ''; + end; + + trigger OnPreReport() + begin + GLSetup.Get(); + end; + + var + Text1100000: Label 'Settling payable documents #1######'; + Text1100001: Label 'Partial Document settlement %1'; + Text1100002: Label 'Partial Bill settlement %1/%2'; + Text1100003: Label 'No payable documents have been found that can be settled. \'; + Text1100004: Label 'Please check that the selection is not empty and at least one payable document is open.'; + Text1100005: Label 'Residual adjust generated by rounding Amount'; + Text1100006: Label '%1 payable documents totaling %2 have been partially settled in Payment Order %3 by an amount of %4.'; + Text1100007: Label 'The maximum permitted value is %1'; + Text1100008: Label 'Partial payable document settlement %1/%2'; + Text1100009: Label 'Partial payable document settlement %1'; + SourceCodeSetup: Record "Source Code Setup"; + PostedPmtOrd: Record "Posted Payment Order"; + GenJnlLine: Record "Gen. Journal Line" temporary; + VendLedgEntry: Record "Vendor Ledger Entry"; + BankAcc: Record "Bank Account"; + CurrExchRate: Record "Currency Exchange Rate"; + Currency: Record Currency; + GLReg: Record "G/L Register"; + GLSetup: Record "General Ledger Setup"; + VATPostingSetup: Record "VAT Posting Setup"; + NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; + DocPost: Codeunit "Document-Post"; + CarteraManagement: Codeunit CarteraManagement; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + Window: Dialog; + PostingDate: Date; + Delay: Decimal; + SourceCode: Code[10]; + Acct: Code[20]; + DocCount: Integer; + GenJnlLineNextNo: Integer; + SumLCYAmt: Decimal; + CurrencyCode: Code[10]; + RemainingAmt: Decimal; + RemainingAmt2: Decimal; + AppliedAmt: Decimal; + ExistVATEntry: Boolean; + FirstVATEntryNo: Integer; + LastVATEntryNo: Integer; + IsRedrawn: Boolean; + DimSetID: Integer; + ExistsNoRealVAT: Boolean; + VendLedgEntryNo: Integer; + + procedure SetInitValue(Amount: Decimal; CurrCode: Code[10]; EntryNo: Integer) + begin + CurrencyCode := CurrCode; + RemainingAmt := Amount; + AppliedAmt := RemainingAmt; + VendLedgEntryNo := EntryNo; + end; + + local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal) + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine."Account Type" := AccType; + GenJnlLine.Validate("Account No.", AccNo); + if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100008, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)) + else + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedDoc."Document No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, -Amount2); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := ''; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Dimension Set ID" := + CarteraManagement.GetCombinedDimSetID(GenJnlLine, VendLedgEntry."Dimension Set ID"); + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); + GenJnlLine.Insert(); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterInvoiceGenJnlLineInsert(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var AppliedAmt: Decimal; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterPostedDocOnAfterGetRecord(var PostedCarteraDoc: Record "Posted Cartera Doc.") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterPostedDocOnPostDataItem(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeGenJournalLineInsert(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforePostedDocModify(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeValidateInvoiceAccountNo(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PayableClosedCarteraDocs.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PayableClosedCarteraDocs.Page.al new file mode 100644 index 00000000000..4e387094869 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PayableClosedCarteraDocs.Page.al @@ -0,0 +1,272 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +page 7000013 "Payable Closed Cartera Docs" +{ + ApplicationArea = Basic, Suite; + Caption = 'Closed Payables Docs'; + Editable = false; + PageType = List; + SourceTable = "Closed Cartera Doc."; + SourceTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn) + where(Type = const(Payable)); + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date this closed document was created and posted.'; + Visible = false; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this closed document.'; + } + field(Status; Rec.Status) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the status of the closed document.'; + } + field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the date of payment or rejection of this closed document.'; + Visible = false; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the payment method code defined for the document number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the document that is the source of this closed document.'; + } + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the closed bill.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the description associated with this closed document.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code in which this closed document was generated.'; + Visible = false; + } + field("Original Amount"; Rec."Original Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the initial amount of this closed document.'; + } + field("Original Amount (LCY)"; Rec."Original Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the initial amount of this document, in LCY.'; + Visible = false; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for this closed document to be fully applied.'; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding, in order for this closed document to be fully settled.'; + Visible = false; + } + field(Redrawn; Rec.Redrawn) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if this document, which has come due and is now rejected, has been recirculated.'; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + Visible = false; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the account number of the customer/vendor associated with this closed document.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the ledger entry number associated with the posting of this closed document.'; + } + } + } + area(factboxes) + { + part(Control1901421307; "Closed Docs Analysis LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = Type = const(Payable), + "Entry No." = field("Entry No."); + Visible = true; + } + part(Control1901421407; "Closed Docs Analysis NonLCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = Type = const(Payable), + "Entry No." = field("Entry No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("&Docs.") + { + Caption = '&Docs.'; + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + + trigger OnAction() + begin + ClosedDoc.Copy(Rec); + PAGE.Run(PAGE::"Closed Documents Analysis", ClosedDoc); + end; + } + action(Redraw) + { + ApplicationArea = Basic, Suite; + Caption = 'Redraw'; + Ellipsis = true; + Image = RefreshVoucher; + ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; + + trigger OnAction() + begin + RedrawDocs(); + end; + } + separator(Action1100000) + { + } + action("Dime&nsions") + { + ApplicationArea = Basic, Suite; + Caption = 'Dime&nsions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + } + } + area(processing) + { + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + CarteraManagement.NavigateClosedDoc(Rec); + end; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Navigate_Promoted"; "&Navigate") + { + } + } + } + } + + var + Text1100000: Label 'Only bills can be redrawn.'; + Text1100001: Label 'Only receivable bills can be redrawn.'; + Text1100002: Label 'No bills have been found that can be redrawn. \'; + Text1100003: Label 'Please check that at least one rejected bill was selected.'; + ClosedDoc: Record "Closed Cartera Doc."; + CustLedgEntry: Record "Cust. Ledger Entry"; + CarteraManagement: Codeunit CarteraManagement; + + [Scope('OnPrem')] + procedure RedrawDocs() + begin + CurrPage.SetSelectionFilter(ClosedDoc); + if not ClosedDoc.Find('=><') then + exit; + + ClosedDoc.SetRange("Document Type", ClosedDoc."Document Type"::Bill); + if not ClosedDoc.Find('-') then + Error( + Text1100000); + + ClosedDoc.SetRange(Type, ClosedDoc.Type::Receivable); + if not ClosedDoc.Find('-') then + Error( + Text1100001); + + ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); + if not ClosedDoc.Find('-') then + Error( + Text1100002 + + Text1100003); + + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(ClosedDoc."Entry No."); + CustLedgEntry.Mark(true); + until ClosedDoc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Redraw Receivable Bills", true, false, CustLedgEntry); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PayablesCarteraDocs.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PayablesCarteraDocs.Page.al new file mode 100644 index 00000000000..e9a8a9ad927 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PayablesCarteraDocs.Page.al @@ -0,0 +1,480 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Sales.Customer; +using Microsoft.Sales.History; +using Microsoft.Sales.Receivables; + +page 7000002 "Payables Cartera Docs" +{ + ApplicationArea = Basic, Suite; + Caption = 'Payables Docs'; + DeleteAllowed = false; + InsertAllowed = false; + PageType = List; + Permissions = TableData "Cartera Doc." = m; + SaveValues = true; + SourceTable = "Cartera Doc."; + SourceTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place) + where(Type = const(Payable), + "Bill Gr./Pmt. Order No." = filter(= '')); + UsageCategory = Lists; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + } + repeater(Control1) + { + ShowCaption = false; + field("Document Type"; Rec."Document Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of document in question.'; + } + field("Collection Agent"; Rec."Collection Agent") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the agent in which this document is settled.'; + } + field(Accepted; Rec.Accepted) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the Acceptance status required for a bill.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the when the creation of this document was posted.'; + Visible = false; + } + field("Due Date"; Rec."Due Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the due date of this document.'; + } + field("Payment Method Code"; Rec."Payment Method Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the payment method code defined for the document number.'; + } + field("Document No."; Rec."Document No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of the document used to generate this document.'; + } + field("No."; Rec."No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number associated with a specific bill.'; + } + field(Description; Rec.Description) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the description associated with this document.'; + } + field("Original Amount (LCY)"; Rec."Original Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the initial amount of this document, in LCY.'; + Visible = false; + } + field("Original Amount"; Rec."Original Amount") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the initial amount of this document.'; + Visible = false; + } + field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending amount, in order for the document to be settled in full.'; + Visible = false; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the pending payment amount for the document to be settled in full.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the currency code in which this document was generated.'; + Visible = false; + } + field(Place; Rec.Place) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; + Visible = false; + } + field("Category Code"; Rec."Category Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a category code for this document.'; + } + field("Transfer Type"; Rec."Transfer Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the Transfer Type on the payment journal line.'; + } + field("Account No."; Rec."Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the account number of the customer/vendor associated with this document.'; + Visible = false; + } + field("Entry No."; Rec."Entry No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the ledger entry number associated with the posting of this document.'; + } + field("Cust./Vendor Bank Acc. Code"; Rec."Cust./Vendor Bank Acc. Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the bank account code of the customer/vendor associated with this document.'; + } + } + group(Control49) + { + ShowCaption = false; + field(CurrTotalAmount; CurrTotalAmountLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Total Rmg. Amt. (LCY)'; + Editable = false; + ToolTip = 'Specifies the sum of amounts that remain to be paid.'; + Visible = CurrTotalAmountVisible; + } + } + } + area(factboxes) + { + part(Control1901421107; "Rec. Docs Analysis Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = Type = const(Payable), + "Entry No." = field("Entry No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("&Docs.") + { + Caption = '&Docs.'; + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + + trigger OnAction() + begin + Doc.Copy(Rec); + PAGE.Run(PAGE::"Documents Analysis", Doc); + end; + } + separator(Action55) + { + } + action("Dime&nsions") + { + ApplicationArea = Basic, Suite; + Caption = 'Dime&nsions'; + Image = Dimensions; + ShortCutKey = 'Shift+Ctrl+D'; + ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; + + trigger OnAction() + begin + Rec.ShowDimensions(); + end; + } + separator(Action58) + { + } + action(Categorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Categorize'; + Ellipsis = true; + Image = Category; + ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(Doc); + CarteraManagement.CategorizeDocs(Doc); + end; + } + action(Decategorize) + { + ApplicationArea = Basic, Suite; + Caption = 'Decategorize'; + Image = UndoCategory; + ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(Doc); + CarteraManagement.DecategorizeDocs(Doc); + end; + } + separator(Action37) + { + } + action(Reject) + { + ApplicationArea = Basic, Suite; + Caption = 'Reject'; + Ellipsis = true; + Image = Reject; + ToolTip = 'Post document rejections.'; + + trigger OnAction() + var + Cust: Record Customer; + begin + if Doc.Type = Doc.Type::Receivable then + if Cust.Get(Rec."Account No.") then + Cust.CheckBlockedCustOnJnls(Cust, "Gen. Journal Document Type".FromInteger(Rec."Document Type".AsInteger()), false); + RejectDocs(); + end; + } + separator(Action39) + { + } + action(Print) + { + ApplicationArea = Basic, Suite; + Caption = 'Print'; + Ellipsis = true; + Image = Print; + ToolTip = 'Print the document.'; + + trigger OnAction() + begin + PrintDoc(); + end; + } + } + } + area(processing) + { + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + CarteraManagement.NavigateDoc(Rec); + end; + } + action("Documents Maturity") + { + ApplicationArea = Basic, Suite; + Caption = 'Documents Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Documents Maturity"; + RunPageLink = Type = filter(Payable), + "Bill Gr./Pmt. Order No." = filter(''); + ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Navigate_Promoted"; "&Navigate") + { + } + actionref("Documents Maturity_Promoted"; "Documents Maturity") + { + } + } + } + } + + trigger OnAfterGetRecord() + begin + AfterGetCurrentRecord(); + end; + + trigger OnInit() + begin + CurrTotalAmountVisible := true; + end; + + trigger OnModifyRecord(): Boolean + begin + CODEUNIT.Run(CODEUNIT::"Document-Edit", Rec); + exit(false); + end; + + trigger OnNewRecord(BelowxRec: Boolean) + begin + AfterGetCurrentRecord(); + end; + + trigger OnOpenPage() + begin + CategoryFilter := Rec.GetFilter("Category Code"); + UpdateStatistics(); + end; + + var + Text1100000: Label 'Payable Bills cannot be printed.'; + Text1100001: Label 'Only Receivable Bills can be rejected.'; + Text1100002: Label 'Only Bills can be rejected.'; + Doc: Record "Cartera Doc."; + CustLedgEntry: Record "Cust. Ledger Entry"; + SalesInvHeader: Record "Sales Invoice Header"; + PurchInvHeader: Record "Purch. Inv. Header"; + CarteraManagement: Codeunit CarteraManagement; + CategoryFilter: Code[250]; + CurrTotalAmountLCY: Decimal; + ShowCurrent: Boolean; + CurrTotalAmountVisible: Boolean; + + procedure UpdateStatistics() + begin + Doc.Copy(Rec); + CarteraManagement.UpdateStatistics(Doc, CurrTotalAmountLCY, ShowCurrent); + CurrTotalAmountVisible := ShowCurrent; + end; + + procedure GetSelected(var NewDoc: Record "Cartera Doc.") + begin + CurrPage.SetSelectionFilter(NewDoc); + end; + + procedure PrintDoc() + begin + CurrPage.SetSelectionFilter(Doc); + if not Doc.Find('-') then + exit; + + if (Doc.Type <> Doc.Type::Receivable) and (Doc."Document Type" = Doc."Document Type"::Bill) then + Error(Text1100000); + + if Doc.Type = Doc.Type::Receivable then begin + if Doc."Document Type" = Doc."Document Type"::Bill then begin + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(Doc."Entry No."); + CustLedgEntry.Mark(true); + until Doc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + CustLedgEntry.PrintBill(true); + end else begin + SalesInvHeader.Reset(); + repeat + SalesInvHeader.Get(Doc."Document No."); + SalesInvHeader.Mark(true); + until Doc.Next() = 0; + + SalesInvHeader.MarkedOnly(true); + SalesInvHeader.PrintRecords(true); + end; + end else begin + PurchInvHeader.Reset(); + repeat + PurchInvHeader.Get(Doc."Document No."); + PurchInvHeader.Mark(true); + until Doc.Next() = 0; + + PurchInvHeader.MarkedOnly(true); + PurchInvHeader.PrintRecords(true); + end; + end; + + + procedure RejectDocs() + begin + if Doc.Type <> Doc.Type::Receivable then + Error(Text1100001); + if Doc."Document Type" <> Rec."Document Type"::Bill then + Error(Text1100002); + + CurrPage.SetSelectionFilter(Doc); + if not Doc.Find('-') then + exit; + + CustLedgEntry.Reset(); + repeat + CustLedgEntry.Get(Doc."Entry No."); + CustLedgEntry.Mark(true); + until Doc.Next() = 0; + + CustLedgEntry.MarkedOnly(true); + REPORT.RunModal(REPORT::"Reject Docs.", true, false, CustLedgEntry); + end; + + local procedure CategoryFilterOnAfterValidate() + begin + Rec.SetFilter("Category Code", CategoryFilter); + CurrPage.Update(false); + UpdateStatistics(); + end; + + local procedure AfterGetCurrentRecord() + begin + xRec := Rec; + UpdateStatistics(); + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrder.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrder.Table.al new file mode 100644 index 00000000000..3f4555a5bc3 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrder.Table.al @@ -0,0 +1,421 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.NoSeries; +using Microsoft.Purchases.History; + +table 7000020 "Payment Order" +{ + Caption = 'Payment Order'; + DrillDownPageID = "Payment Orders List"; + LookupPageID = "Payment Orders List"; + Permissions = TableData "Cartera Doc." = m; + DataClassification = CustomerContent; + + fields + { + field(2; "No."; Code[20]) + { + Caption = 'No.'; + + trigger OnValidate() + var + NoSeries: Codeunit "No. Series"; + begin + if "No." = xRec."No." then + exit; + + CheckPrinted(); + ResetPrinted(); + + CarteraSetup.Get(); + NoSeries.TestManual(CarteraSetup."Payment Order Nos."); + "No. Series" := ''; + + UpdateDescription(); + CheckNoNotUsed(); + end; + } + field(3; "Bank Account No."; Code[20]) + { + Caption = 'Bank Account No.'; + TableRelation = "Bank Account"; + + trigger OnValidate() + begin + CalcFields("Bank Account Name"); + + if "Bank Account No." = '' then + exit; + + BankAcc.Get("Bank Account No."); + BankAcc.TestField(Blocked, false); + + if PmtOrdIsEmpty() then begin + Validate("Currency Code", BankAcc."Currency Code"); + exit; + end; + + BankAcc.TestField("Currency Code", "Currency Code"); + + CalcFields(Amount); + + if "Bank Account No." <> xRec."Bank Account No." then begin + CheckPrinted(); + ResetPrinted(); + end; + end; + } + field(4; "Bank Account Name"; Text[100]) + { + CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); + Caption = 'Bank Account Name'; + Editable = false; + FieldClass = FlowField; + } + field(5; "Posting Description"; Text[100]) + { + Caption = 'Posting Description'; + } + field(7; Amount; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Amount'; + Editable = false; + FieldClass = FlowField; + } + field(8; "Reason Code"; Code[10]) + { + Caption = 'Reason Code'; + TableRelation = "Reason Code"; + } + field(9; "No. Printed"; Integer) + { + Caption = 'No. Printed'; + } + field(10; "Posting Date"; Date) + { + Caption = 'Posting Date'; + + trigger OnValidate() + begin + if "Posting Date" <> xRec."Posting Date" then begin + CheckPrinted(); + ResetPrinted(); + end; + end; + } + field(11; Comment; Boolean) + { + CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), + Type = filter(Payable))); + Caption = 'Comment'; + Editable = false; + FieldClass = FlowField; + } + field(12; "Category Filter"; Code[10]) + { + Caption = 'Category Filter'; + FieldClass = FlowFilter; + TableRelation = "Category Code"; + ValidateTableRelation = false; + } + field(13; "Due Date Filter"; Date) + { + Caption = 'Due Date Filter'; + FieldClass = FlowFilter; + } + field(14; "Global Dimension 1 Filter"; Code[20]) + { + CaptionClass = '1,3,1'; + Caption = 'Global Dimension 1 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(15; "Global Dimension 2 Filter"; Code[20]) + { + CaptionClass = '1,3,2'; + Caption = 'Global Dimension 2 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(16; "No. Series"; Code[20]) + { + Caption = 'No. Series'; + Editable = false; + TableRelation = "No. Series"; + } + field(33; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + TableRelation = Currency; + + trigger OnLookup() + begin + Currency.Reset(); + + if Currency.Get("Currency Code") then; + Currencies.SetRecord(Currency); + Currencies.LookupMode(true); + if ACTION::LookupOK = Currencies.RunModal() then begin + Currencies.GetRecord(Currency); + Clear(Currencies); + Validate("Currency Code", Currency.Code); + end else + Clear(Currencies); + end; + + trigger OnValidate() + begin + if BankAcc.Get("Bank Account No.") and ("Currency Code" <> BankAcc."Currency Code") + then + TestField("Currency Code", BankAcc."Currency Code"); + + if ("Currency Code" <> xRec."Currency Code") and not PmtOrdIsEmpty() then + FieldError("Currency Code", + StrSubstNo(Text1100001, TableCaption)); + + if "Currency Code" <> '' then begin + Currency.Reset(); + Currency.SetRange("Payment Orders", true); + Currency.Code := "Currency Code"; + if not Currency.Find() then + Error( + Text1100002, + "Currency Code"); + end; + + if "Currency Code" <> xRec."Currency Code" then begin + CheckPrinted(); + ResetPrinted(); + end; + end; + } + field(34; "Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Payable))); + Caption = 'Amount (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(35; "Elect. Pmts Exported"; Boolean) + { + Caption = 'Elect. Pmts Exported'; + + trigger OnValidate() + var + CarteraDoc: Record "Cartera Doc."; + begin + CarteraDoc.SetRange(Type, CarteraDoc.Type::Payable); + CarteraDoc.SetRange("Bill Gr./Pmt. Order No.", "No."); + CarteraDoc.ModifyAll("Elect. Pmts Exported", true); + end; + } + field(36; "Export Electronic Payment"; Boolean) + { + Caption = 'Export Electronic Payment'; + + trigger OnValidate() + begin + TestField("Elect. Pmts Exported", false); + end; + } + } + + keys + { + key(Key1; "No.") + { + Clustered = true; + } + key(Key2; "Bank Account No.") + { + } + } + + fieldgroups + { + } + + trigger OnDelete() + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No."); + Doc.SetRange(Type, Doc.Type::Payable); + Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); + if Doc.FindFirst() then + Error(Text1100000); + + BGPOCommentLine.SetRange("BG/PO No.", "No."); + BGPOCommentLine.DeleteAll(); + end; + + trigger OnInsert() + var + NoSeries: Codeunit "No. Series"; + begin + if "No." = '' then begin + CarteraSetup.Get(); + CarteraSetup.TestField("Payment Order Nos."); + "No. Series" := CarteraSetup."Payment Order Nos."; + if NoSeries.AreRelated("No. Series", xRec."No. Series") then + "No. Series" := xRec."No. Series"; + "No." := NoSeries.GetNextNo("No. Series"); + end; + + if GetFilter("Bank Account No.") <> '' then + if GetRangeMin("Bank Account No.") = GetRangeMax("Bank Account No.") then begin + BankAcc.Get(GetRangeMin("Bank Account No.")); + Validate("Currency Code", BankAcc."Currency Code"); + Validate("Bank Account No.", BankAcc."No."); + end; + + CheckNoNotUsed(); + UpdateDescription(); + "Posting Date" := WorkDate(); + end; + + var + Text1100000: Label 'This Payment Order is not empty. Remove all its bills and invoices and try again.'; + Text1100001: Label 'can only be changed when the %1 is empty'; + Text1100002: Label 'The operation is not allowed for payment order using %1. Check your currency setup.'; + Text1100003: Label 'This payment order has already been printed. Proceed anyway?'; + Text1100004: Label 'The update has been interrupted by the user.'; + Text1100005: Label 'Payment Order'; + Text1100006: Label ' is currently in use in a Posted Payment Order.'; + Text1100007: Label ' is currently in use in a Closed Payment Order.'; + Text1100008: Label 'untitled'; + PmtOrd: Record "Payment Order"; + PostedPmtOrd: Record "Posted Payment Order"; + ClosedPmtOrd: Record "Closed Payment Order"; + Doc: Record "Cartera Doc."; + CarteraSetup: Record "Cartera Setup"; + Currency: Record Currency; + BankAcc: Record "Bank Account"; + BGPOCommentLine: Record "BG/PO Comment Line"; + Currencies: Page Currencies; + ExportAgainQst: Label 'The selected payment order has already been exported. Do you want to export again?'; + + [Scope('OnPrem')] + procedure AssistEdit(OldPmtOrd: Record "Payment Order"): Boolean + var + NoSeries: Codeunit "No. Series"; + begin + PmtOrd := Rec; + CarteraSetup.Get(); + CarteraSetup.TestField("Payment Order Nos."); + if NoSeries.LookupRelatedNoSeries(CarteraSetup."Payment Order Nos.", OldPmtOrd."No. Series", PmtOrd."No. Series") then begin + PmtOrd."No." := NoSeries.GetNextNo(PmtOrd."No. Series"); + Rec := PmtOrd; + exit(true); + end; + end; + + local procedure CheckPrinted() + begin + if "No. Printed" <> 0 then + if not Confirm(Text1100003) then + Error(Text1100004); + end; + + [Scope('OnPrem')] + procedure ResetPrinted() + begin + "No. Printed" := 0; + end; + + local procedure UpdateDescription() + begin + "Posting Description" := Text1100005 + ' ' + "No."; + end; + + local procedure CheckNoNotUsed() + begin + if PostedPmtOrd.Get("No.") then + FieldError("No.", PostedPmtOrd."No." + Text1100006); + if ClosedPmtOrd.Get("No.") then + FieldError("No.", ClosedPmtOrd."No." + Text1100007); + end; + + [Scope('OnPrem')] + procedure PrintRecords(ShowRequestForm: Boolean) + var + CarteraReportSelection: Record "Cartera Report Selections"; + begin + PmtOrd.Copy(Rec); + CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Payment Order"); + CarteraReportSelection.SetFilter("Report ID", '<>0'); + CarteraReportSelection.Find('-'); + repeat + REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, PmtOrd); + until CarteraReportSelection.Next() = 0; + end; + + local procedure PmtOrdIsEmpty(): Boolean + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No."); + Doc.SetRange(Type, Doc.Type::Payable); + Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); + exit(not Doc.FindFirst()) + end; + + procedure Caption(): Text + begin + if "No." = '' then + exit(Text1100008); + CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); + end; + + [Scope('OnPrem')] + procedure FilterSourceForExport(var GenJnlLine: Record "Gen. Journal Line") + begin + GenJnlLine.SetRange("Journal Template Name", ''); + GenJnlLine.SetRange("Journal Batch Name", ''); + GenJnlLine.SetRange("Document No.", "No."); + GenJnlLine."Bal. Account No." := "Bank Account No."; + end; + + [Scope('OnPrem')] + procedure ExportToFile() + var + GenJnlLine: Record "Gen. Journal Line"; + BankAccount: Record "Bank Account"; + begin + SetRecFilter(); + TestField("Export Electronic Payment", true); + + if "Elect. Pmts Exported" then + if not Confirm(ExportAgainQst) then + exit; + + BankAccount.Get("Bank Account No."); + FilterSourceForExport(GenJnlLine); + CODEUNIT.Run(BankAccount.GetPaymentExportCodeunitID(), GenJnlLine); + Find(); + Validate("Elect. Pmts Exported", true); + Modify(); + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderListing.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderListing.Report.al new file mode 100644 index 00000000000..d4b08452008 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderListing.Report.al @@ -0,0 +1,407 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Vendor; +using System.Utilities; + +report 7000010 "Payment Order Listing" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Purchases/Payables/PaymentOrderListing.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'Payment Order Listing'; + Permissions = TableData "Payment Order" = r; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(PmtOrd; "Payment Order") + { + DataItemTableView = sorting("No."); + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + column(PmtOrd_No_; "No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(PmtOrd__No__; PmtOrd."No.") + { + } + column(STRSUBSTNO_Text1100001_CopyText_; StrSubstNo(Text1100001, CopyText)) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") + { + } + column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") + { + } + column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") + { + } + column(PmtOrd__Posting_Date_; Format(PmtOrd."Posting Date")) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(PmtOrd__Currency_Code_; PmtOrd."Currency Code") + { + } + column(PrintAmountsInLCY; PrintAmountsInLCY) + { + } + column(OutputNo; OutputNo) + { + } + column(PageLoop_Number; Number) + { + } + column(PmtOrd__No__Caption; PmtOrd__No__CaptionLbl) + { + } + column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) + { + } + column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) + { + } + column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) + { + } + column(PmtOrd__Posting_Date_Caption; PmtOrd__Posting_Date_CaptionLbl) + { + } + column(PmtOrd__Currency_Code_Caption; PmtOrd__Currency_Code_CaptionLbl) + { + } + column(PageCaption; PageCaptionLbl) + { + } + dataitem("Cartera Doc."; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = PmtOrd; + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Payable)); + column(PmtOrdAmount; PmtOrdAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(PmtOrdAmount_Control23; PmtOrdAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Vend_City; Vend.City) + { + } + column(Vend_County; Vend.County) + { + } + column(Vend__Post_Code_; Vend."Post Code") + { + } + column(Vend_Name; Vend.Name) + { + } + column(Cartera_Doc___Account_No__; "Account No.") + { + } + column(Cartera_Doc___Document_No__; "Document No.") + { + } + column(Cartera_Doc___Due_Date_; Format("Due Date")) + { + } + column(Cartera_Doc___Document_Type_; "Document Type") + { + } + column(Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill; "Document Type" <> "Document Type"::Bill) + { + } + column(Vend_Name_Control28; Vend.Name) + { + } + column(Vend_City_Control30; Vend.City) + { + } + column(PmtOrdAmount_Control31; PmtOrdAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Vend_County_Control35; Vend.County) + { + } + column(Cartera_Doc___Document_No___Control3; "Document No.") + { + } + column(Cartera_Doc___No__; "No.") + { + } + column(Vend__Post_Code__Control9; Vend."Post Code") + { + } + column(Cartera_Doc___Due_Date__Control8; Format("Due Date")) + { + } + column(Cartera_Doc___Account_No___Control1; "Account No.") + { + } + column(Cartera_Doc___Document_Type__Control66; "Document Type") + { + } + column(Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill; "Document Type" = "Document Type"::Bill) + { + } + column(PmtOrdAmount_Control36; PmtOrdAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(PmtOrdAmount_Control39; PmtOrdAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Cartera_Doc__Type; Type) + { + } + column(Cartera_Doc__Entry_No_; "Entry No.") + { + } + column(Cartera_Doc__Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") + { + } + column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) + { + } + column(VendorNoCaption; VendorNoCaptionLbl) + { + } + column(Vend_Name_Control28Caption; Vend_Name_Control28CaptionLbl) + { + } + column(Vend__Post_Code__Control9Caption; Vend__Post_Code__Control9CaptionLbl) + { + } + column(Vend_City_Control30Caption; Vend_City_Control30CaptionLbl) + { + } + column(PmtOrdAmount_Control31Caption; PmtOrdAmount_Control31CaptionLbl) + { + } + column(Vend_County_Control35Caption; Vend_County_Control35CaptionLbl) + { + } + column(Cartera_Doc___Due_Date__Control8Caption; Cartera_Doc___Due_Date__Control8CaptionLbl) + { + } + column(Bill_No_Caption; Bill_No_CaptionLbl) + { + } + column(Document_No_Caption; Document_No_CaptionLbl) + { + } + column(Cartera_Doc___Document_Type__Control66Caption; FieldCaption("Document Type")) + { + } + column(ContinuedCaption; ContinuedCaptionLbl) + { + } + column(EmptyStringCaption; EmptyStringCaptionLbl) + { + } + column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + Vend.Get("Account No."); + + if PrintAmountsInLCY then + PmtOrdAmount := "Remaining Amt. (LCY)" + else + PmtOrdAmount := "Remaining Amount"; + end; + + trigger OnPreDataItem() + begin + Clear(PmtOrdAmount); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then begin + CopyText := Text1100000; + OutputNo += 1; + end; + end; + + trigger OnPreDataItem() + begin + NoOfLoops := Abs(NoOfCopies) + 1; + CopyText := ''; + SetRange(Number, 1, NoOfLoops); + OutputNo := 1; + end; + } + + trigger OnAfterGetRecord() + begin + BankAcc.Get(PmtOrd."Bank Account No."); + FormatAddress.FormatAddr( + BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", + BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); + + if not CurrReport.Preview then + PrintCounter.PrintCounter(DATABASE::"Payment Order", "No."); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + FormatAddress.Company(CompanyAddr, CompanyInfo); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Copies'; + ToolTip = 'Specifies how many copies of the document to print.'; + } + field(PrintAmountsInLCY; PrintAmountsInLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show amounts in LCY'; + ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + Text1100000: Label 'COPY'; + Text1100001: Label 'Payment Order %1'; + CompanyInfo: Record "Company Information"; + BankAcc: Record "Bank Account"; + Vend: Record Vendor; + FormatAddress: Codeunit "Format Address"; + PrintCounter: Codeunit "BG/PO-Post and Print"; + BankAccAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + NoOfLoops: Integer; + NoOfCopies: Integer; + CopyText: Text[30]; + PrintAmountsInLCY: Boolean; + PmtOrdAmount: Decimal; + OutputNo: Integer; + PmtOrd__No__CaptionLbl: Label 'Payment Order No.'; + CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; + CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; + CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; + PmtOrd__Posting_Date_CaptionLbl: Label 'Date'; + PmtOrd__Currency_Code_CaptionLbl: Label 'Currency Code'; + PageCaptionLbl: Label 'Page'; + All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; + VendorNoCaptionLbl: Label 'Vendor No.'; + Vend_Name_Control28CaptionLbl: Label 'Name'; + Vend__Post_Code__Control9CaptionLbl: Label 'Post Code'; + Vend_City_Control30CaptionLbl: Label 'City /'; + PmtOrdAmount_Control31CaptionLbl: Label 'Remaining Amount'; + Vend_County_Control35CaptionLbl: Label 'County'; + Cartera_Doc___Due_Date__Control8CaptionLbl: Label 'Due Date'; + Bill_No_CaptionLbl: Label 'Bill No.'; + Document_No_CaptionLbl: Label 'Document No.'; + ContinuedCaptionLbl: Label 'Continued'; + EmptyStringCaptionLbl: Label '/', Locked = true; + ContinuedCaption_Control15Lbl: Label 'Continued'; + TotalCaptionLbl: Label 'Total'; + + [Scope('OnPrem')] + procedure GetCurrencyCode(): Code[10] + begin + if PrintAmountsInLCY then + exit(''); + + exit("Cartera Doc."."Currency Code"); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderListing.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderListing.rdlc new file mode 100644 index 00000000000..63ce8be24d3 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderListing.rdlc @@ -0,0 +1,2694 @@ + + + 0 + + + + SQL + + + None + 0d7aeed8-91f0-4e82-bb5b-3a5a7c351610 + + + + + + + + + + + 17cm + + + + + 4.01892cm + + + + + + + + + + 1.425cm + + + 1.25cm + + + 1.65cm + + + 0.15cm + + + 0.7cm + + + 1.65cm + + + 3.45cm + + + 1.65cm + + + 2.35cm + + + 2.7cm + + + + + 0.423cm + + + + + true + + + + + =Fields!All_amounts_are_in_LCYCaption.Value + + + + + + 52 + + =NOT Fields!PrintAmountsInLCY.Value + + NoOutput + + + 6 + + + + + + + + + + + true + + + + + =Fields!PrintAmountsInLCY.Value + + + + + + textbox20 + 51 + + true + + + + 4 + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!Cartera_Doc___Due_Date__Control8Caption.Value) + + + + + + + 47 + + + + + + + + true + + + + + =First(Fields!Cartera_Doc___Document_Type__Control66Caption.Value) + + + + + + 46 + + + + + + + + true + + + + + =First(Fields!Document_No_Caption.Value) + + + + + + + 45 + + + + + + + + true + + + + + + + + + + + + + true + + + + + =First(Fields!Bill_No_Caption.Value) + + + + + + + 43 + + + + + + + + true + + + + + =First(Fields!VendorNoCaption.Value) + + + + + + + 42 + + + + + + + + true + + + + + =First(Fields!Vend_Name_Control28Caption.Value) + + + + + + 41 + + + + + + + + true + + + + + =First(Fields!Vend__Post_Code__Control9Caption.Value) + + + + + + 40 + + + + + + + + true + + + + + =First(Fields!Vend_City_Control30Caption.Value) + Chr(10) + First(Fields!Vend_County_Control35Caption.Value) + + + + + + 39 + + + + + + + + true + + + + + =First(Fields!PmtOrdAmount_Control31Caption.Value) + + + + + + + 38 + + + + + + + + 0.423cm + + + + + true + + + + + + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Cartera_Doc___Due_Date_.Value + + + + + + 27 + + + + + + + + true + + + + + =Fields!Cartera_Doc___Document_Type_.Value + + + + + + 26 + + + + + + + + true + + + + + =Fields!Cartera_Doc___Document_No__.Value + + + + + + + 25 + + + + + + + + true + + + + + =Fields!EmptyStringCaption.Value + + + + + + 24 + + =IIF(Fields!Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill.Value,False,True) + + NoOutput + + + + + + + + true + + + + + =Fields!Cartera_Doc___No__.Value + + + + + + + 23 + + =IIF(Fields!Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill.Value,False,True) + + NoOutput + + + + + + + + true + + + + + =Fields!Cartera_Doc___Account_No__.Value + + + + + + + 22 + + + + + + + + true + + + + + =Fields!Vend_Name.Value + + + + + + 21 + + + + + + + + true + + + + + =Fields!Vend__Post_Code_.Value + + + + + + + 20 + + + + + + + + true + + + + + =Fields!Vend_City.Value + + + + + + 19 + + + + + + + + true + true + + + + + =Fields!PmtOrdAmount.Value + + + + + + 18 + + + + + + + + 0.423cm + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + true + + + + + =Fields!Vend_County.Value + + + + + + 1 + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox48 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!TotalCaption.Value) + + + + + + 17 + + + 3 + + + + + + + + true + + + + + + + + + + + textbox2 + 16 + + + 6 + + + + + + + + + + + true + true + + + + + =Sum(Fields!PmtOrdAmount.Value) + + + + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + After + true + true + + + After + true + true + + + + + =Fields!PmtOrd_No_.Value + + + + + + Detail + + + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + + + + DataSet_Result + 0.63492cm + 6.68391in + 27 + + + true + + + + + =Fields!BankAccAddr_1_.Value + + + + + + 0.423cm + 0.5cm + 26 + + true + + + + + true + + + + + =Fields!PmtOrd__No__.Value + + + + + + + 14.60317cm + 0.423cm + 0.5cm + 25 + + true + + + + + true + + + + + =Fields!STRSUBSTNO_Text1100001_CopyText_.Value + + + + + + 4.44444cm + 0.423cm + 0.5cm + 24 + + true + + + + + true + + + + + =Fields!CompanyAddr_1_.Value + + + + + + 5.71429cm + 0.423cm + 0.5cm + 23 + + true + + + + + true + + + + + =Fields!CompanyAddr_2_.Value + + + + + + 6.34921cm + 0.423cm + 0.5cm + 22 + + true + + + + + true + + + + + =Fields!CompanyAddr_3_.Value + + + + + + 6.98413cm + 0.423cm + 0.5cm + 21 + + true + + + + + true + + + + + =Fields!CompanyAddr_4_.Value + + + + + + 7.61905cm + 0.423cm + 0.5cm + 20 + + true + + + + + true + + + + + =Fields!CompanyAddr_5_.Value + + + + + + 8.25397cm + 0.423cm + 0.5cm + 19 + + true + + + + + true + + + + + =Fields!CompanyAddr_6_.Value + + + + + + 8.88889cm + 0.423cm + 0.5cm + 18 + + true + + + + + true + + + + + =Fields!CompanyInfo__Phone_No__.Value + + + + + + 11.42857cm + 0.423cm + 0.5cm + 17 + + true + + + + + true + + + + + =Fields!CompanyInfo__Fax_No__.Value + + + + + + 12.06349cm + 0.423cm + 0.5cm + 16 + + true + + + + + true + + + + + =Fields!CompanyInfo__VAT_Registration_No__.Value + + + + + + 12.69841cm + 0.423cm + 0.5cm + 15 + + true + + + + + true + + + + + =Fields!PmtOrd__Posting_Date_.Value + + + + + + + 16.50794cm + 0.423cm + 14 + + true + + + + + true + + + + + =Fields!BankAccAddr_4_.Value + + + + + + 0.75in + 0.423cm + 0.5cm + 13 + + true + + + + + true + + + + + =Fields!BankAccAddr_5_.Value + + + + + + 1in + 0.423cm + 0.5cm + 12 + + true + + + + + true + + + + + =Fields!BankAccAddr_6_.Value + + + + + + 1.25in + 0.423cm + 0.5cm + 11 + + true + + + + + true + + + + + =Fields!BankAccAddr_7_.Value + + + + + + 1.5in + 0.423cm + 0.5cm + 10 + + true + + + + + true + + + + + =Fields!BankAccAddr_3_.Value + + + + + + 0.5in + 0.423cm + 0.5cm + 9 + + true + + + + + true + + + + + =Fields!BankAccAddr_2_.Value + + + + + + 0.25in + 0.423cm + 0.5cm + 8 + + true + + + + + true + + + + + =Fields!PmtOrd__Currency_Code_.Value + + + + + + + 15.2381cm + 0.423cm + 0.5cm + 7 + + true + + + + + true + + + + + =Fields!PmtOrd__No__Caption.Value + + + + + + 13.33333cm + 0.423cm + 0.5cm + 6 + + true + + + + + true + + + + + =Fields!CompanyInfo__Phone_No__Caption.Value + + + + + + 9.52381cm + 0.423cm + 0.5cm + 5 + + true + + + + + true + + + + + =Fields!CompanyInfo__Fax_No__Caption.Value + + + + + + 10.15873cm + 0.423cm + 0.5cm + 4 + + true + + + + + true + + + + + =Fields!CompanyInfo__VAT_Registration_No__Caption.Value + + + + + + 10.79365cm + 0.423cm + 0.5cm + 3 + + true + + + + + true + + + + + =Fields!PmtOrd__Posting_Date_Caption.Value + + + + + + 15.87302cm + 0.423cm + 0.5cm + 2 + + true + + + + + true + + + + + =Fields!PmtOrd__Currency_Code_Caption.Value + + + + + + 13.96825cm + 0.423cm + 0.5cm + 1 + + true + + + + + true + + + + + + + + + + + + + + + + + + =Fields!OutputNo.Value + =Fields!PmtOrd_No_.Value + + + Between + + + Output + true + + + + + End + + + + 4.01892cm + + 17cm + + + 2.83146in + true + true + + + true + + + + + =Code.SetCaption(ReportItems!PmtOrd__No__1.Value,24) + + + + + + + 5.499cm + 13.33333cm + 0.423cm + 2.7cm + 26 + + + + true + + + + + =Code.SetCaption(ReportItems!STRSUBSTNO_Text1100001_CopyText_1.Value,8) + + + + + + 10.18333cm + 0.423cm + 6.3cm + 25 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyAddr_1_1.Value,10) + + + + + + 1.269cm + 10.18333cm + 0.423cm + 6.3cm + 24 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyAddr_2_1.Value,11) + + + + + + 1.692cm + 10.18333cm + 0.423cm + 6.3cm + 23 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyAddr_3_1.Value,12) + + + + + + 2.115cm + 10.18333cm + 0.423cm + 6.3cm + 22 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyAddr_4_1.Value,13) + + + + + + 2.538cm + 10.18333cm + 0.423cm + 6.3cm + 21 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyAddr_5_1.Value,14) + + + + + + 2.961cm + 10.18333cm + 0.423cm + 6.3cm + 20 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyAddr_6_1.Value,15) + + + + + + 3.384cm + 10.18333cm + 0.423cm + 6.3cm + 19 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyInfo__Phone_No__1.Value,19) + + + + + + 3.807cm + 12.28333cm + 0.423cm + 4.2cm + 18 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyInfo__Fax_No__1.Value,20) + + + + + + 4.23cm + 12.28333cm + 0.423cm + 4.2cm + 17 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyInfo__VAT_Registration_No__1.Value,21) + + + + + + 4.653cm + 12.28333cm + 0.423cm + 4.2cm + 16 + + + + true + + + + + =Code.SetCaption(ReportItems!PmtOrd__Posting_Date_1.Value,27) + + + + + + + 6.768cm + 13.54333cm + 1.8cm + 15 + + + + true + + + + + =Code.SetCaption(ReportItems!PmtOrd__Currency_Code_1.Value,25) + + + + + + + 5.922cm + 13.33333cm + 0.423cm + 2.7cm + 14 + + =ReportItems!textbox20.Value + + NoOutput + + + + true + + + + + =Code.SetCaption(ReportItems!PmtOrd__No__Caption1.Value,22) + + + + + + 5.499cm + 10.18333cm + 0.423cm + 3cm + 13 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyInfo__Phone_No__Caption1.Value,16) + + + + + + 3.807cm + 10.18333cm + 0.423cm + 1.89cm + 12 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyInfo__Fax_No__Caption1.Value,17) + + + + + + 4.23cm + 10.18333cm + 0.423cm + 1.89cm + 11 + + + + true + + + + + =Code.SetCaption(ReportItems!CompanyInfo__VAT_Registration_No__Caption1.Value,18) + + + + + + 4.653cm + 10.18333cm + 0.423cm + 1.89cm + 10 + + + + true + + + + + =Code.SetCaption(ReportItems!PmtOrd__Posting_Date_Caption1.Value,26) + + + + + + 6.768cm + 10.18333cm + 3.15cm + 9 + + + + true + + + + + =Code.SetCaption(ReportItems!PmtOrd__Currency_Code_Caption1.Value,23) + + + + + + 5.922cm + 10.18333cm + 0.423cm + 3cm + 8 + + + + true + + + + + + + + + + + + 0.423cm + 10.63333cm + 0.423cm + 1.8cm + 7 + + + + true + + + + + =Code.SetCaption(ReportItems!BankAccAddr_1_1.Value,1) + + + + + + 1.269cm + 0.423cm + 4.5cm + 6 + + + + true + + + + + =Code.SetCaption(ReportItems!BankAccAddr_4_1.Value,4) + + + + + + 2.538cm + 0.423cm + 4.5cm + 5 + + + + true + + + + + =Code.SetCaption(ReportItems!BankAccAddr_5_1.Value,5) + + + + + + 2.961cm + 0.423cm + 4.5cm + 4 + + + + true + + + + + =Code.SetCaption(ReportItems!BankAccAddr_6_1.Value,6) + + + + + + 3.384cm + 0.423cm + 4.5cm + 3 + + + + true + + + + + =Code.SetCaption(ReportItems!BankAccAddr_7_1.Value,7) + + + + + + 3.807cm + 0.423cm + 4.5cm + 2 + + + + true + + + + + =Code.SetCaption(ReportItems!BankAccAddr_3_1.Value,3) + + + + + + 2.115cm + 0.423cm + 4.5cm + 1 + + + + true + + + + + =Code.SetCaption(ReportItems!BankAccAddr_2_1.Value,2) + + + + + + 1.692cm + 0.423cm + 4.5cm + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + +Public Shared CP(27) +Public Function SetCaption(ByVal Newdata As string,ByVal Number As Integer) + if Newdata<>Nothing then + CP(Number) = Newdata + end if + Return CP(Number) +End Function + =User!Language + true + Invalid + ee8b958e-f6fc-4351-abb3-b79349c8c91d + + + + + PmtOrd_No_ + + + PmtOrd__No__ + + + STRSUBSTNO_Text1100001_CopyText_ + + + CompanyAddr_1_ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyInfo__Phone_No__ + + + CompanyInfo__Fax_No__ + + + CompanyInfo__VAT_Registration_No__ + + + PmtOrd__Posting_Date_ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + BankAccAddr_3_ + + + BankAccAddr_2_ + + + BankAccAddr_1_ + + + PmtOrd__Currency_Code_ + + + PrintAmountsInLCY + + + OutputNo + + + PageLoop_Number + + + PmtOrd__No__Caption + + + CompanyInfo__Phone_No__Caption + + + CompanyInfo__Fax_No__Caption + + + CompanyInfo__VAT_Registration_No__Caption + + + PmtOrd__Posting_Date_Caption + + + PmtOrd__Currency_Code_Caption + + + PageCaption + + + PmtOrdAmount + + + PmtOrdAmountFormat + + + PmtOrdAmount_Control23 + + + PmtOrdAmount_Control23Format + + + Vend_City + + + Vend_County + + + Vend__Post_Code_ + + + Vend_Name + + + Cartera_Doc___Account_No__ + + + Cartera_Doc___Document_No__ + + + Cartera_Doc___Due_Date_ + + + Cartera_Doc___Document_Type_ + + + Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill + + + Vend_Name_Control28 + + + Vend_City_Control30 + + + PmtOrdAmount_Control31 + + + PmtOrdAmount_Control31Format + + + Vend_County_Control35 + + + Cartera_Doc___Document_No___Control3 + + + Cartera_Doc___No__ + + + Vend__Post_Code__Control9 + + + Cartera_Doc___Due_Date__Control8 + + + Cartera_Doc___Account_No___Control1 + + + Cartera_Doc___Document_Type__Control66 + + + Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill + + + PmtOrdAmount_Control36 + + + PmtOrdAmount_Control36Format + + + PmtOrdAmount_Control39 + + + PmtOrdAmount_Control39Format + + + Cartera_Doc__Type + + + Cartera_Doc__Entry_No_ + + + Cartera_Doc__Bill_Gr__Pmt__Order_No_ + + + All_amounts_are_in_LCYCaption + + + VendorNoCaption + + + Vend_Name_Control28Caption + + + Vend__Post_Code__Control9Caption + + + Vend_City_Control30Caption + + + PmtOrdAmount_Control31Caption + + + Vend_County_Control35Caption + + + Cartera_Doc___Due_Date__Control8Caption + + + Bill_No_Caption + + + Document_No_Caption + + + Cartera_Doc___Document_Type__Control66Caption + + + ContinuedCaption + + + EmptyStringCaption + + + ContinuedCaption_Control15 + + + TotalCaption + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderTest.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderTest.Report.al new file mode 100644 index 00000000000..36e68a51637 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderTest.Report.al @@ -0,0 +1,637 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Purchases.Vendor; +using System.Utilities; + +report 7000009 "Payment Order - Test" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Purchases/Payables/PaymentOrderTest.rdlc'; + Caption = 'Payment Order - Test'; + + dataset + { + dataitem(PmtOrd; "Payment Order") + { + RequestFilterFields = "No."; + column(PmtOrd_No_; "No.") + { + } + column(PmtOrd_Bank_Account_No_; "Bank Account No.") + { + } + column(PmtOrd_Currency_Code; "Currency Code") + { + } + dataitem(PageCounter; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(USERID; UserId) + { + } + column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) + { + } + column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) + { + } + column(PmtOrd_TABLECAPTION__________PmtOrdFilter; PmtOrd.TableCaption + ':' + PmtOrdFilter) + { + } + column(PmtOrd_TABLECAPTION_________PmtOrd__No__; PmtOrd.TableCaption + ' ' + PmtOrd."No.") + { + } + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(PmtOrd__Bank_Account_Name_; PmtOrd."Bank Account Name") + { + } + column(Posting_Date; Format(PmtOrd."Posting Date")) + { + } + column(PmtOrd__Posting_Description_; PmtOrd."Posting Description") + { + } + column(PostingGroup; PostingGroup) + { + } + column(PmtOrd__Currency_Code_; PmtOrd."Currency Code") + { + } + column(PageCounter_Number; Number) + { + } + column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) + { + } + column(Payment_Order___TestCaption; Payment_Order___TestCaptionLbl) + { + } + column(PmtOrd__Bank_Account_Name_Caption; PmtOrd__Bank_Account_Name_CaptionLbl) + { + } + column(PmtOrd__Posting_Date_Caption; PmtOrd__Posting_Date_CaptionLbl) + { + } + column(PmtOrd__Posting_Description_Caption; PmtOrd__Posting_Description_CaptionLbl) + { + } + column(PostingGroupCaption; PostingGroupCaptionLbl) + { + } + column(PmtOrd__Currency_Code_Caption; PmtOrd__Currency_Code_CaptionLbl) + { + } + dataitem(HeaderErrorCounter; "Integer") + { + DataItemTableView = sorting(Number); + column(ErrorText_Number_; ErrorText[Number]) + { + } + column(HeaderErrorCounter_Number; Number) + { + } + column(ErrorText_Number_Caption; ErrorText_Number_CaptionLbl) + { + } + + trigger OnPostDataItem() + begin + ErrorCounter := 0; + end; + + trigger OnPreDataItem() + begin + SetRange(Number, 1, ErrorCounter); + end; + } + dataitem(Doc; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = PmtOrd; + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Payable)); + column(Doc__Remaining_Amount_; "Remaining Amount") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Vend_City; Vend.City) + { + } + column(Vend_County; Vend.County) + { + } + column(Vend__Post_Code_; Vend."Post Code") + { + } + column(Vend_Name; Vend.Name) + { + } + column(Doc__Account_No__; "Account No.") + { + } + column(Doc__Document_No__; "Document No.") + { + } + column(Doc__Due_Date_; Format("Due Date")) + { + } + column(Doc__Document_Type_; "Document Type") + { + } + column(DocumentTypeBill; "Document Type" = "Document Type"::Bill) + { + } + column(DocumentTypeInvoice; "Document Type" = "Document Type"::Invoice) + { + } + column(Doc__Due_Date__Control44; Format("Due Date")) + { + } + column(Doc__Document_No___Control46; "Document No.") + { + } + column(Doc__No__; "No.") + { + } + column(Doc__Account_No___Control50; "Account No.") + { + } + column(Vend_Name_Control52; Vend.Name) + { + } + column(Vend__Post_Code__Control53; Vend."Post Code") + { + } + column(Vend_City_Control54; Vend.City) + { + } + column(Vend_County_Control55; Vend.County) + { + } + column(Doc__Remaining_Amount__Control35; "Remaining Amount") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Doc__Document_Type__Control26; "Document Type") + { + } + column(Doc_Type; Type) + { + } + column(Doc_Entry_No_; "Entry No.") + { + } + column(Doc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") + { + } + column(Vend_Name_Control52Caption; Vend_Name_Control52CaptionLbl) + { + } + column(Post_CodeCaption; Post_CodeCaptionLbl) + { + } + column(City__Caption; City__CaptionLbl) + { + } + column(CountyCaption; CountyCaptionLbl) + { + } + column(Doc__Due_Date__Control44Caption; Doc__Due_Date__Control44CaptionLbl) + { + } + column(Doc__Document_No___Control46Caption; FieldCaption("Document No.")) + { + } + column(Doc__No__Caption; Doc__No__CaptionLbl) + { + } + column(Vendor_No_Caption; Vendor_No_CaptionLbl) + { + } + column(Doc__Remaining_Amount__Control35Caption; FieldCaption("Remaining Amount")) + { + } + column(Doc__Document_Type__Control26Caption; FieldCaption("Document Type")) + { + } + dataitem(LineErrorCounter; "Integer") + { + DataItemTableView = sorting(Number); + column(ErrorText_Number__Control56; ErrorText[Number]) + { + } + column(LineErrorCounter_Number; Number) + { + } + column(ErrorText_Number__Control56Caption; ErrorText_Number__Control56CaptionLbl) + { + } + + trigger OnPostDataItem() + begin + ErrorCounter := 0; + end; + + trigger OnPreDataItem() + begin + SetRange(Number, 1, ErrorCounter); + end; + } + + trigger OnAfterGetRecord() + begin + Vend.Get("Account No."); + + DocCount := DocCount + 1; + + if "Collection Agent" <> "Collection Agent"::Bank then + AddError(StrSubstNo(Text1100007, FieldCaption("Collection Agent"), "Collection Agent"::Bank)); + + if "Currency Code" <> PmtOrd."Currency Code" then + AddError(StrSubstNo(Text1100008, FieldCaption("Currency Code"), PmtOrd."Currency Code")); + + if "Remaining Amt. (LCY)" = 0 then + AddError(StrSubstNo(Text1100009, FieldCaption("Remaining Amt. (LCY)"))); + + if Type <> Type::Payable then + AddError(StrSubstNo(Text1100008, FieldCaption(Type), Type::Receivable)); + + if Accepted = Accepted::No then + AddError(StrSubstNo(Text1100010, FieldCaption(Accepted), false)); + + VendLedgEntry.Get("Entry No."); + VendPostingGr.Get(VendLedgEntry."Vendor Posting Group"); + if "Document Type" = "Document Type"::Bill then begin + if VendPostingGr."Bills in Payment Order Acc." = '' then + AddError( + StrSubstNo( + Text1100011, + VendPostingGr.FieldCaption("Bills in Payment Order Acc."), + VendPostingGr.TableCaption(), + VendPostingGr.Code)); + AccountNo := VendPostingGr."Bills in Payment Order Acc."; + end else begin + if VendPostingGr."Invoices in Pmt. Ord. Acc." = '' then + AddError( + StrSubstNo( + Text1100011, + VendPostingGr.FieldCaption("Invoices in Pmt. Ord. Acc."), + VendPostingGr.TableCaption(), + VendPostingGr.Code)); + AccountNo := VendPostingGr."Invoices in Pmt. Ord. Acc."; + end; + + NoOfDays := "Due Date" - PmtOrd."Posting Date"; + if NoOfDays < 0 then + NoOfDays := 0; + + if CalcExpenses then + FeeRange.CalcPmtOrdCollExpensesAmt( + BankAcc2."Operation Fees Code", + BankAcc2."Currency Code", + "Remaining Amount", + "Entry No."); + + if CheckOtherBanks then begin + if DocPostBuffer.Find('+') then; + DocPostBuffer."Entry No." := DocPostBuffer."Entry No." + 1; + DocPostBuffer."No. of Days" := NoOfDays; + DocPostBuffer.Amount := "Remaining Amt. (LCY)"; + DocPostBuffer.Insert(); + end; + + if VendPostingGr."Bills Account" = '' then + AddError( + StrSubstNo( + Text1100011, + VendPostingGr.FieldCaption("Bills Account"), + VendPostingGr.TableCaption(), + VendPostingGr.Code)); + + BalanceAccNo := VendPostingGr."Bills Account"; + if BGPOPostBuffer.Get(AccountNo, BalanceAccNo) then begin + BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; + BGPOPostBuffer.Modify(); + end else begin + BGPOPostBuffer.Account := AccountNo; + BGPOPostBuffer."Balance Account" := BalanceAccNo; + BGPOPostBuffer.Amount := "Remaining Amount"; + BGPOPostBuffer.Insert(); + end; + end; + + trigger OnPreDataItem() + begin + Clear(DocPostBuffer); + + if CalcExpenses then + FeeRange.InitPmtOrdCollExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); + + DocCount := 0; + end; + } + dataitem(Total; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(DocCount; DocCount) + { + } + column(PmtOrd_Amount; PmtOrd.Amount) + { + AutoFormatExpression = PmtOrd."Currency Code"; + AutoFormatType = 1; + } + column(Total_Number; Number) + { + } + column(No__of_DocumentsCaption; No__of_DocumentsCaptionLbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + PmtOrd.CalcFields(Amount); + end; + } + } + dataitem("Integer"; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(Integer_Number; Number) + { + } + column(FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Caption; FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89CaptionLbl) + { + } + column(Payment_Order_Expenses_Amt_Caption; Payment_Order_Expenses_Amt_CaptionLbl) + { + } + column(BankAcc__No__Caption; BankAcc__No__CaptionLbl) + { + } + dataitem(BillGrBankAcc; "Bank Account") + { + DataItemLink = "No." = field("Bank Account No."); + DataItemLinkReference = PmtOrd; + DataItemTableView = sorting("No."); + column(FeeRange_GetTotalPmtOrdCollExpensesAmt; FeeRange.GetTotalPmtOrdCollExpensesAmt()) + { + AutoFormatExpression = PmtOrd."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalPmtOrdCollExpensesAmt_Control92; FeeRange.GetTotalPmtOrdCollExpensesAmt()) + { + AutoFormatExpression = PmtOrd."Currency Code"; + AutoFormatType = 1; + } + column(BillGrBankAcc__No__; "No.") + { + } + + trigger OnAfterGetRecord() + begin + CalcFields("Posted Receiv. Bills Rmg. Amt."); + RiskIncGr := "Posted Receiv. Bills Rmg. Amt."; + + if not CalcExpenses then + CurrReport.Break(); + end; + } + dataitem(BankAcc; "Bank Account") + { + DataItemLink = "Currency Code" = field("Currency Code"); + DataItemLinkReference = PmtOrd; + DataItemTableView = sorting("No."); + RequestFilterFields = "No."; + column(FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88; FeeRange.GetTotalPmtOrdCollExpensesAmt()) + { + AutoFormatExpression = PmtOrd."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89; FeeRange.GetTotalPmtOrdCollExpensesAmt()) + { + AutoFormatExpression = PmtOrd."Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__No__; "No.") + { + } + column(BankAcc_Currency_Code; "Currency Code") + { + } + + trigger OnAfterGetRecord() + begin + if "No." = PmtOrd."Bank Account No." then + CurrReport.Skip(); + + CalcFields("Posted Receiv. Bills Rmg. Amt."); + RiskIncGr := "Posted Receiv. Bills Rmg. Amt."; + + if not DocPostBuffer.Find('-') then + CurrReport.Skip(); + + Clear(FeeRange); + if not FeeRange.Find('=<>') then + CurrReport.Skip(); + FeeRange.InitCollExpenses("Operation Fees Code", "Currency Code"); + repeat + FeeRange.CalcCollExpensesAmt( + "Operation Fees Code", + "Currency Code", + DocPostBuffer.Amount, + DocPostBuffer."Entry No."); + until DocPostBuffer.Next() = 0; + end; + } + } + + trigger OnAfterGetRecord() + begin + Clear(BankAcc2); + Clear(PostingGroup); + Clear(CalcExpenses); + + if BankAcc2.Get(PmtOrd."Bank Account No.") then begin + if BankAcc2."Currency Code" <> PmtOrd."Currency Code" then + AddError( + StrSubstNo( + Text1100000, + BankAcc2.FieldCaption("Currency Code"), + PmtOrd."Currency Code", + BankAcc2.TableCaption, + BankAcc2."No.")); + if BankAcc2."Operation Fees Code" = '' then + AddError( + StrSubstNo( + Text1100001, + BankAcc2.FieldCaption("Operation Fees Code"), + BankAcc2.TableCaption, + BankAcc2."No.")); + if PmtOrd."Posting Date" <> 0D then + CalcExpenses := true; + FormatAddress.FormatAddr( + BankAccAddr, BankAcc2.Name, BankAcc2."Name 2", '', BankAcc2.Address, BankAcc2."Address 2", + BankAcc2.City, BankAcc2."Post Code", BankAcc2.County, BankAcc2."Country/Region Code"); + PostingGroup := BankAcc2."Bank Acc. Posting Group"; + CompanyIsBlocked := BankAcc2.Blocked; + PmtOrd."Bank Account Name" := BankAcc2.Name; + end; + + if "Bank Account No." = '' then + AddError(StrSubstNo(Text1100002, FieldCaption("Bank Account No."))) + else + if PostingGroup = '' then + AddError( + StrSubstNo( + Text1100003, + BankAcc2.TableCaption(), + "Bank Account No.", + BankAcc2.FieldCaption("Bank Acc. Posting Group"))); + + if "Posting Date" = 0D then + AddError(StrSubstNo(Text1100002, FieldCaption("Posting Date"))); + + if "No. Printed" = 0 then + AddError(Text1100004); + + if CompanyIsBlocked then + AddError(StrSubstNo(Text1100005, BankAcc2.TableCaption(), "Bank Account No.")); + + Doc.Reset(); + Doc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No."); + Doc.SetRange(Type, Doc.Type::Payable); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); + if not Doc.Find('-') then + AddError(Text1100006); + end; + + trigger OnPreDataItem() + begin + if BankAccNoFilter <> '' then begin + SetCurrentKey("Bank Account No."); + SetRange("Bank Account No.", BankAccNoFilter); + end; + end; + } + } + + requestpage + { + + layout + { + } + + actions + { + } + } + + labels + { + } + + trigger OnPreReport() + begin + PmtOrdFilter := PmtOrd.GetFilters(); + CheckOtherBanks := BankAcc.GetFilter("No.") <> ''; + BankAccNoFilter := BankAcc.GetFilter("No."); + end; + + var + Text1100000: Label '%1 must be %2 in %3 %4.'; + Text1100001: Label '%1 must be specified in %2 %3.'; + Text1100002: Label '%1 must be specified.'; + Text1100003: Label '%1 %2 has no %3.'; + Text1100004: Label 'The payment order has not been printed.'; + Text1100005: Label '%1 %2 is blocked.'; + Text1100006: Label 'The payment order is empty.'; + Text1100007: Label '%1 should be %2.'; + Text1100008: Label '%1 must be %2.'; + Text1100009: Label '%1 must not be zero.'; + Text1100010: Label '%1 cannot be %2.'; + Text1100011: Label 'Specify %1 in %2 %3.'; + BankAcc2: Record "Bank Account"; + Vend: Record Vendor; + VendLedgEntry: Record "Vendor Ledger Entry"; + VendPostingGr: Record "Vendor Posting Group"; + DocPostBuffer: Record "Doc. Post. Buffer" temporary; + BGPOPostBuffer: Record "BG/PO Post. Buffer" temporary; + FeeRange: Record "Fee Range"; + FormatAddress: Codeunit "Format Address"; + PmtOrdFilter: Text[250]; + BankAccAddr: array[8] of Text[100]; + ErrorText: array[99] of Text[250]; + ErrorCounter: Integer; + PostingGroup: Code[20]; + CompanyIsBlocked: Boolean; + DocCount: Integer; + AccountNo: Text[20]; + BalanceAccNo: Text[20]; + RiskIncGr: Decimal; + CalcExpenses: Boolean; + CheckOtherBanks: Boolean; + NoOfDays: Integer; + BankAccNoFilter: Text[20]; + CurrReport_PAGENOCaptionLbl: Label 'Page'; + Payment_Order___TestCaptionLbl: Label 'Payment Order - Test'; + PmtOrd__Bank_Account_Name_CaptionLbl: Label 'Bank Account Name'; + PmtOrd__Posting_Date_CaptionLbl: Label 'Posting Date'; + PmtOrd__Posting_Description_CaptionLbl: Label 'Posting Description'; + PostingGroupCaptionLbl: Label 'Posting Group'; + PmtOrd__Currency_Code_CaptionLbl: Label 'Currency Code'; + ErrorText_Number_CaptionLbl: Label 'Warning!'; + Vend_Name_Control52CaptionLbl: Label 'Name'; + Post_CodeCaptionLbl: Label 'Post Code'; + City__CaptionLbl: Label 'City /'; + CountyCaptionLbl: Label 'County'; + Doc__Due_Date__Control44CaptionLbl: Label 'Due Date'; + Doc__No__CaptionLbl: Label 'Bill No.'; + Vendor_No_CaptionLbl: Label 'Vendor No.'; + ErrorText_Number__Control56CaptionLbl: Label 'Warning!'; + No__of_DocumentsCaptionLbl: Label 'No. of Documents'; + TotalCaptionLbl: Label 'Total'; + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89CaptionLbl: Label 'Total Expenses'; + Payment_Order_Expenses_Amt_CaptionLbl: Label 'Payment Order Expenses Amt.'; + BankAcc__No__CaptionLbl: Label 'Bank Account No.'; + + local procedure AddError(Text: Text[250]) + begin + ErrorCounter := ErrorCounter + 1; + ErrorText[ErrorCounter] := Text; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderTest.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderTest.rdlc new file mode 100644 index 00000000000..1b53a4775f2 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrderTest.rdlc @@ -0,0 +1,3546 @@ + + + 0 + + + + SQL + + + None + dfb1181e-2af6-414d-8755-844c7fc3128d + + + + + + + + + + + 18.57913cm + + + + + 14.919cm + + + + + + + + + + 1.7cm + + + 2cm + + + 2cm + + + + + 0.96cm + + + + + true + + + + + =First(Fields!BankAcc__No__Caption.Value) + + + + + + BankAcc__No__Caption + 8 + + + + + + + + true + + + + + =First(Fields!Payment_Order_Expenses_Amt_Caption.Value) + + + + + + + Payment_Order_Expenses_Amt_Caption + 7 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Caption.Value) + + + + + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Caption + 6 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BillGrBankAcc__No__.Value + + + + + + BankAcc__No__ + 5 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt.Value + + + + + + + FeeRange_GetTotalPmtOrdCollExpensesAmt + 4 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt.Value + + + + + + + 3 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__No__.Value + + + + + + BillGrBankAcc__No__ + 2 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88.Value + + + + + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88 + 1 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88.Value + + + + + + + + + + + + + + + + + + + + + + + + + After + true + + + + Detail + + + + + =IIF(Fields!BankAcc__No__.Value="",FALSE,TRUE) + + + + + =IIF(Fields!BillGrBankAcc__No__.Value="",FALSE,TRUE) + + + + Detail_Collection + Output + true + + + + + + =Fields!BankAcc__No__Caption.Value + GreaterThan + + ="" + + + + 13.113cm + 5.7cm + 21 + + + + + + + 2.62645cm + + + 2.4cm + + + 11.421cm + + + 1.8cm + + + + + 0.423cm + + + + + true + + + + + =Fields!TotalCaption.Value + + + + + + TotalCaption + 7 + + + 2 + + + + + + + true + true + + + + + + + + + + + textbox41 + 6 + + + + + + + + true + true + + + + + =Fields!PmtOrd_Amount.Value + + + + + + + PmtOrd_Amount + 5 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox28 + 4 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!No__of_DocumentsCaption.Value + + + + + + No__of_DocumentsCaption + 3 + + + + + + + + true + + + + + =Fields!DocCount.Value + + + + + + + DocCount + 2 + + + + + + + + true + true + + + + + + + + + + + textbox34 + 1 + + + + + + + + true + true + + + + + + + + + + + textbox26 + + + + + + + + + + + + + + + + + + + + + Detail + + + + + + + Detail_Collection + Output + true + + + + + + =Fields!TotalCaption.Value + GreaterThan + + ="" + + + + 11.421cm + 1.269cm + 18.24745cm + 20 + + + + + + 1.75291cm + + + 1.5cm + + + 1.65cm + + + 0.75cm + + + 1.65cm + + + 4.5cm + + + 1.65cm + + + 2.85cm + + + 1.8cm + + + 0.07937cm + + + 0.07937cm + + + 0.07937cm + + + 0.07937cm + + + 0.07937cm + + + 0.07937cm + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox14 + 47 + + + 15 + + + + + + + + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!Doc__Due_Date__Control44Caption.Value) + + + + + + Doc__Due_Date__Control44Caption + 46 + + + + + + + + true + + + + + =First(Fields!Doc__Document_Type__Control26Caption.Value) + + + + + + Doc__Document_Type__Control26Caption + 45 + + + + + + + + true + + + + + =First(Fields!Doc__Document_No___Control46Caption.Value) + + + + + + Doc__Document_No___Control46Caption + 44 + + + + + + + + true + + + + + =First(Fields!Doc__No__Caption.Value) + + + + + + Doc__No__Caption + 43 + + + + + + + + true + + + + + =First(Fields!Vendor_No_Caption.Value) + + + + + + Vendor_No_Caption + 42 + + + + + + + + true + + + + + =First(Fields!Vend_Name_Control52Caption.Value) + + + + + + Vend_Name_Control52Caption + 41 + + + + + + + + true + + + + + =First(Fields!Post_CodeCaption.Value) + + + + + + Post_CodeCaption + 40 + + + + + + + + true + + + + + =First(Fields!City__Caption.Value) + Chr(10) + First(Fields!CountyCaption.Value) + + + + + + City__Caption + 39 + + =iif(first(Fields!Post_CodeCaption.Value)="",true,false) + + NoOutput + + + + + + + + true + + + + + =First(Fields!Doc__Remaining_Amount__Control35Caption.Value) + + + + + + + Doc__Remaining_Amount__Control35Caption + 38 + + + + + + + + true + true + + + + + =Fields!Payment_Order___TestCaption.Value + + + + + + + 37 + + true + + + + + + + + + true + true + + + + + =Fields!COMPANYNAME.Value + + + + + + + 36 + + true + + + + + + + + + true + true + + + + + =Fields!CurrReport_PAGENOCaption.Value + + + + + + + 35 + + true + + + + + + + + + true + true + + + + + =IIF(Code.IsNewPage(Fields!PmtOrd_No_.Value),TRUE,FALSE) + + + + + + + 34 + + true + + + + + + + + + true + true + + + + + =First(Fields!PmtOrd_TABLECAPTION__________PmtOrdFilter.Value) + + + + + + + 33 + + true + + + + + + + + + true + true + + + + + =first(Fields!FORMAT_TODAY_0_4_.Value) + + + + + + + 32 + + true + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox15 + 31 + + + 15 + + + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Doc__Due_Date_.Value + + + + + + + Doc__Due_Date_ + 30 + + + + + + + + true + + + + + =Fields!Doc__Document_Type_.Value + + + + + + Doc__Document_Type_ + 29 + + + + + + + + true + + + + + =Fields!Doc__Document_No__.Value + + + + + + + Doc__Document_No__ + 28 + + + + + + + + true + true + + + + + + + + + + + + textbox23 + 27 + + + + + + + + true + + + + + =Fields!Doc__Account_No__.Value + + + + + + + Doc__Account_No__ + 26 + + + + + + + + true + + + + + =Fields!Vend_Name.Value + + + + + + Vend_Name + 25 + + + + + + + + true + + + + + =Fields!Vend__Post_Code_.Value + + + + + + + Vend__Post_Code_ + 24 + + + + + + + + true + + + + + =Fields!Vend_City.Value + + + + + + Vend_City + 23 + + + + + + + + true + true + + + + + =Code.BlankZero(Fields!Doc__Remaining_Amount_.Value) + + + + + + + Doc__Remaining_Amount_ + 22 + + + + + + + + true + true + + + + + + + + + + + + textbox16 + 21 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox13 + 20 + + + 7 + + + + + + + + + + + + true + + + + + =Fields!Vend_County.Value + + + + + + Vend_County + 19 + + + + + + + + true + true + + + + + + + + + + + textbox25 + 18 + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Doc__Due_Date_.Value + + + + + + + 17 + + + + + + + + true + + + + + =Fields!Doc__Document_Type_.Value + + + + + + 16 + + + + + + + + true + + + + + =Fields!Doc__Document_No__.Value + + + + + + + 15 + + + + + + + + true + true + + + + + =Fields!Doc__No__.Value + + + + + + + 14 + + + + + + + + true + + + + + =Fields!Doc__Account_No__.Value + + + + + + + 13 + + + + + + + + true + + + + + =Fields!Vend_Name.Value + + + + + + 12 + + + + + + + + true + + + + + =Fields!Vend__Post_Code_.Value + + + + + + + 11 + + + + + + + + true + + + + + =Fields!Vend_City.Value + + + + + + 10 + + + + + + + + true + true + + + + + =Code.BlankZero(Fields!Doc__Remaining_Amount_.Value) + + + + + + + 9 + + + + + + + + true + true + + + + + + + + + + + + textbox18 + 8 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + 7 + + + 7 + + + + + + + + + + + + true + + + + + =Fields!Vend_County.Value + + + + + + 6 + + + + + + + + true + true + + + + + + + + + + + 5 + + + 7 + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!ErrorText_Number__Control56Caption.Value + + + + + + ErrorText_Number__Control56Caption + 2 + + + + + + + + true + + + + + =Fields!ErrorText_Number__Control56.Value + + + + + + ErrorText_Number__Control56 + 1 + + + 8 + + + + + + + + + + + + + true + true + + + + + + + + + + + textbox21 + + + 6 + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox19 + 4 + + + 9 + + + + + + + + + + + + + + true + true + + + + + + + + + + + textbox22 + 3 + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + + + After + true + + + After + true + + + + + =Fields!PmtOrd_No_.Value + + + + + + Detail + + + + + =IIF(Fields!DocumentTypeInvoice.Value,FALSE,TRUE) + + + + + =IIF(Fields!DocumentTypeInvoice.Value,FALSE,TRUE) + + + + + =IIF(Fields!DocumentTypeBill.Value,FALSE,TRUE) + + + + + =IIF(Fields!DocumentTypeBill.Value,FALSE,TRUE) + + + + + =IIF(Fields!ErrorText_Number__Control56.Value="",TRUE,FALSE) + + + + Detail_Collection + Output + true + + + + + Before + true + + + + + + =Fields!Vend_Name_Control52Caption.Value + GreaterThan + + ="" + + + + 7.191cm + 4.23cm + 19 + + + + + + 1.6cm + + + 16.497cm + + + + + 0.423cm + + + + + true + + + + + =Fields!ErrorText_Number_Caption.Value + + + + + + ErrorText_Number_Caption + 1 + + + + + + + + true + + + + + =Fields!ErrorText_Number_.Value + + + + + + ErrorText_Number_ + + + + + + + + + + + + + + + + + + + Detail + + + + + =IIF(Fields!ErrorText_Number_.Value="",TRUE,FALSE) + + + + Detail_Collection + Output + true + + + + 6.768cm + 0.423cm + 7.12569in + 18 + + + true + + + + + =First(Fields!PostingGroup.Value) + + + + + + 5.499cm + 5.07937cm + 0.423cm + 5cm + 17 + + + + true + + + + + =First(Fields!PmtOrd__Currency_Code_.Value) + + + + + + 5.92199cm + 5.07937cm + 0.423cm + 1.5cm + 16 + + + + true + + + + + =First(Fields!PmtOrd__Posting_Description_.Value) + + + + + + 5.076cm + 5.07937cm + 0.423cm + 5cm + 15 + + + + true + + + + + =first(Fields!Posting_Date.Value) + + + + + + + 4.653cm + 5.07937cm + 0.423cm + 1.7cm + 14 + + + + true + + + + + =First(Fields!PmtOrd__Bank_Account_Name_.Value) + + + + + + + 4.23cm + 5.07937cm + 0.423cm + 5cm + 13 + + + + true + + + + + =First(Fields!PostingGroupCaption.Value) + + + + + + 5.499cm + 0.423cm + 5cm + 12 + + + + true + + + + + =First(Fields!PmtOrd__Currency_Code_Caption.Value) + + + + + + 5.922cm + 0.423cm + 5cm + 11 + + + + true + + + + + =First(Fields!PmtOrd__Posting_Description_Caption.Value) + + + + + + 5.076cm + 0.423cm + 5cm + 10 + + + + true + + + + + =First(Fields!PmtOrd__Posting_Date_Caption.Value) + + + + + + 4.653cm + 0.423cm + 5cm + 9 + + + + true + + + + + =First(Fields!PmtOrd__Bank_Account_Name_Caption.Value) + + + + + + 4.23cm + 0.423cm + 5cm + 8 + + + + true + + + + + =First(Fields!BankAccAddr_4_.Value) + + + + + + 2.115cm + 0.423cm + 5cm + 7 + + + + true + + + + + =First(Fields!BankAccAddr_5_.Value) + + + + + + 2.538cm + 0.423cm + 5cm + 6 + + + + true + + + + + =First(Fields!BankAccAddr_6_.Value) + + + + + + 2.961cm + 0.423cm + 5cm + 5 + + + + true + + + + + =First(Fields!BankAccAddr_7_.Value) + + + + + + 3.384cm + 0.423cm + 5cm + 4 + + + + true + + + + + =First(Fields!BankAccAddr_3_.Value) + + + + + + 1.692cm + 0.423cm + 5cm + 3 + + + + true + + + + + =First(Fields!BankAccAddr_2_.Value) + + + + + + 1.269cm + 0.423cm + 5cm + 2 + + + + true + + + + + =First(Fields!BankAccAddr_1_.Value) + + + + + + 0.846cm + 0.423cm + 5cm + 1 + + + + true + + + + + =First(Fields!PmtOrd_TABLECAPTION_________PmtOrd__No__.Value) + + + + + + 0.423cm + 4.5cm + + + + true + + + + + + + + + + + + + + + + + + =Fields!PmtOrd_No_.Value + + + Between + + + Output + true + + + + DataSet_Result + + End + + + + 14.919cm + + 18.57913cm + + + 2.53968cm + true + true + + + true + + + + + =Globals!PageNumber + + + + + + + 0.423cm + 17.7cm + 0.423cm + 0.45cm + 6 + + =iif(ReportItems!CurrReport_PAGENOCaption.Value="",true,false) + + NoOutput + + + + true + true + + + + + =User!UserID + + + + + + + 0.846cm + 14.9cm + 0.423cm + 3.25cm + 5 + + =iif(ReportItems!CurrReport_PAGENOCaption.Value="",true,false) + + NoOutput + + + + true + + + + + =ReportItems!FORMAT_TODAY_0_4_.Value + + + + + + + 13.33333cm + 0.423cm + 4.81667cm + 4 + + + + true + + + + + =ReportItems!COMPANYNAME.Value + + + + + + 0.423cm + 0.423cm + 7.5cm + 3 + + + + true + + + + + =ReportItems!CurrReport_PAGENOCaption.Value + + + + + + 0.423cm + 16.95cm + 0.423cm + 0.75cm + 2 + + + + true + + + + + =ReportItems!Payment_Order___TestCaption.Value + + + + + + 0.423cm + 7.5cm + 1 + + + + true + + + + + =ReportItems!PmtOrd_TABLECAPTION__________PmtOrdFilter.Value + + + + + + 1.90476cm + 0.423cm + 18.15cm + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + +Shared offset as Integer +Shared newPage as Object +Shared currentgroup1 as Object +Shared currentgroup2 as Object +Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object + If NewPage + offset = pagenumber - 1 + End If + Return pagenumber - offset +End Function + +Public Function IsNewPage(group1 as Object) As Boolean +newPage = FALSE +If Not (group1 = currentgroup1) + newPage = TRUE + currentgroup1 = group1 + End If + Return newPage +End Function + + =User!Language + true + Invalid + 4709d82c-7878-41ab-b77a-39061e23a92e + + + + + PmtOrd_No_ + + + PmtOrd_Bank_Account_No_ + + + PmtOrd_Currency_Code + + + USERID + + + FORMAT_TODAY_0_4_ + + + COMPANYNAME + + + PmtOrd_TABLECAPTION__________PmtOrdFilter + + + PmtOrd_TABLECAPTION_________PmtOrd__No__ + + + BankAccAddr_1_ + + + BankAccAddr_2_ + + + BankAccAddr_3_ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + PmtOrd__Bank_Account_Name_ + + + Posting_Date + + + PmtOrd__Posting_Description_ + + + PostingGroup + + + PmtOrd__Currency_Code_ + + + PageCounter_Number + + + CurrReport_PAGENOCaption + + + Payment_Order___TestCaption + + + PmtOrd__Bank_Account_Name_Caption + + + PmtOrd__Posting_Date_Caption + + + PmtOrd__Posting_Description_Caption + + + PostingGroupCaption + + + PmtOrd__Currency_Code_Caption + + + ErrorText_Number_ + + + HeaderErrorCounter_Number + + + ErrorText_Number_Caption + + + Doc__Remaining_Amount_ + + + Doc__Remaining_Amount_Format + + + Vend_City + + + Vend_County + + + Vend__Post_Code_ + + + Vend_Name + + + Doc__Account_No__ + + + Doc__Document_No__ + + + Doc__Due_Date_ + + + Doc__Document_Type_ + + + DocumentTypeBill + + + DocumentTypeInvoice + + + Doc__Due_Date__Control44 + + + Doc__Document_No___Control46 + + + Doc__No__ + + + Doc__Account_No___Control50 + + + Vend_Name_Control52 + + + Vend__Post_Code__Control53 + + + Vend_City_Control54 + + + Vend_County_Control55 + + + Doc__Remaining_Amount__Control35 + + + Doc__Remaining_Amount__Control35Format + + + Doc__Document_Type__Control26 + + + Doc_Type + + + Doc_Entry_No_ + + + Doc_Bill_Gr__Pmt__Order_No_ + + + Vend_Name_Control52Caption + + + Post_CodeCaption + + + City__Caption + + + CountyCaption + + + Doc__Due_Date__Control44Caption + + + Doc__Document_No___Control46Caption + + + Doc__No__Caption + + + Vendor_No_Caption + + + Doc__Remaining_Amount__Control35Caption + + + Doc__Document_Type__Control26Caption + + + ErrorText_Number__Control56 + + + LineErrorCounter_Number + + + ErrorText_Number__Control56Caption + + + DocCount + + + PmtOrd_Amount + + + PmtOrd_AmountFormat + + + Total_Number + + + No__of_DocumentsCaption + + + TotalCaption + + + Integer_Number + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Caption + + + Payment_Order_Expenses_Amt_Caption + + + BankAcc__No__Caption + + + FeeRange_GetTotalPmtOrdCollExpensesAmt + + + FeeRange_GetTotalPmtOrdCollExpensesAmtFormat + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control92 + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control92Format + + + BillGrBankAcc__No__ + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88 + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88Format + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89 + + + FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Format + + + BankAcc__No__ + + + BankAcc_Currency_Code + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrders.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrders.Page.al new file mode 100644 index 00000000000..c6ded679a21 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrders.Page.al @@ -0,0 +1,320 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.Payment; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Navigate; +using System.Telemetry; + +page 7000050 "Payment Orders" +{ + Caption = 'Payment Orders'; + DataCaptionExpression = Rec.Caption(); + PageType = Document; + RefreshOnActivate = true; + SourceTable = "Payment Order"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("No."; Rec."No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number for this payment order.'; + + trigger OnAssistEdit() + begin + if Rec.AssistEdit(xRec) then + CurrPage.Update(); + end; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank where the payment order is delivered.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the bank where the payment order is delivered.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the general posting date for the payment order.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code associated with this payment order.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the sum total of the documents included in this payment order.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the total amount of all of the documents included in this payment order.'; + } + field("Export Electronic Payment"; Rec."Export Electronic Payment") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if this payment order will be used for electronic payments.'; + } + } + part(Docs; "Docs. in PO Subform") + { + ApplicationArea = Basic, Suite; + SubPageLink = Type = const(Payable), + "Collection Agent" = const(Bank), + "Bill Gr./Pmt. Order No." = field("No."); + SubPageView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place); + } + group(Auditing) + { + Caption = 'Auditing'; + field("Reason Code"; Rec."Reason Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; + } + field("No. Printed"; Rec."No. Printed") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of printed copies of this payment order.'; + } + } + } + area(factboxes) + { + part(Control1901420307; "Pmt Orders Analysis Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part("Payment File Errors"; "Payment Journal Errors Part") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment File Errors'; + Provider = Docs; + SubPageLink = "Document No." = field("Bill Gr./Pmt. Order No."), + "Journal Line No." = field("Entry No."); + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Pmt. O&rd.") + { + Caption = 'Pmt. O&rd.'; + action(Comments) + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."), + Type = const(Payable); + ToolTip = 'View or create a comment.'; + } + separator(Action18) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Enabled = true; + Image = "Report"; + RunObject = Page "Payment Orders Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action33) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Enabled = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + PmtOrd.Copy(Rec); + PmtOrd.SetRecFilter(); + end; + PmtOrd.PrintRecords(true); + end; + } + action(Export) + { + ApplicationArea = Basic, Suite; + Caption = 'Export to File'; + Image = ExportFile; + ToolTip = 'Export a file with the payment information on the lines.'; + + trigger OnAction() + var + FeatureTelemetry: Codeunit "Feature Telemetry"; + ESElecPaymentsTok: Label 'ES Electronic Payments', Locked = true; + begin + FeatureTelemetry.LogUptake('1000HY0', ESElecPaymentsTok, Enum::"Feature Uptake Status"::"Used"); + Rec.ExportToFile(); + FeatureTelemetry.LogUsage('1000HY1', ESElecPaymentsTok, 'ES Electronic Payments Exported'); + end; + } + } + } + area(processing) + { + group("P&osting") + { + Caption = 'P&osting'; + Image = Post; + action("Test Report") + { + ApplicationArea = Basic, Suite; + Caption = 'Test Report'; + Ellipsis = true; + Enabled = true; + Image = TestReport; + ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; + + trigger OnAction() + begin + if not Rec.Find() then + exit; + PmtOrd.Reset(); + PmtOrd := Rec; + PmtOrd.SetRecFilter(); + REPORT.Run(REPORT::"Payment Order - Test", true, false, PmtOrd); + end; + } + action(Post) + { + ApplicationArea = Basic, Suite; + Caption = 'P&ost'; + Ellipsis = true; + Image = Post; + ShortCutKey = 'F9'; + ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; + + trigger OnAction() + begin + if Rec.Find() then + PostBGPO.PayablePostOnly(Rec); + end; + } + action("Post and &Print") + { + ApplicationArea = Basic, Suite; + Caption = 'Post and &Print'; + Ellipsis = true; + Enabled = true; + Image = PostPrint; + ShortCutKey = 'Shift+F9'; + ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; + + trigger OnAction() + begin + if Rec.Find() then + PostBGPO.PayablePostAndPrint(Rec); + end; + } + } + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Enabled = true; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + Navigate.SetDoc(Rec."Posting Date", Rec."No."); + Navigate.Run(); + end; + } + action("Page Payment Orders Maturity Process") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Orders Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Payment Orders Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(Post_Promoted; Post) + { + } + actionref("Post and &Print_Promoted"; "Post and &Print") + { + } + actionref(Export_Promoted; Export) + { + } + actionref("&Navigate_Promoted"; "&Navigate") + { + } + actionref("Page Payment Orders Maturity Process_Promoted"; "Page Payment Orders Maturity Process") + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + PmtOrd: Record "Payment Order"; + PostBGPO: Codeunit "BG/PO-Post and Print"; + Navigate: Page Navigate; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersAnalysis.Page.al new file mode 100644 index 00000000000..b1aae71a660 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersAnalysis.Page.al @@ -0,0 +1,98 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000053 "Payment Orders Analysis" +{ + Caption = 'Payment Orders Analysis'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SaveValues = true; + SourceTable = "Payment Order"; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field("Category Filter"; Rec."Category Filter") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a category filter for the documents included in this payment order.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + } + group(Control3) + { + ShowCaption = false; + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the currency code associated with this payment order.'; + } + field(DocCount; DocCount) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Documents'; + Editable = false; + ToolTip = 'Specifies the number of documents included.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the sum total of the documents included in this payment order.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount of all of the documents included in this payment order.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + Doc: Record "Cartera Doc."; + DocCount: Integer; + + local procedure UpdateStatistics() + begin + Doc.SetRange(Type, Doc.Type::Payable); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Global Dimension 1 Filter", Doc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", Doc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", Doc."Category Code"); + Rec.CopyFilter("Due Date Filter", Doc."Due Date"); + DocCount := Doc.Count(); + end; + + local procedure CategoryFilterOnAfterValidate() + begin + UpdateStatistics(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersList.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersList.Page.al new file mode 100644 index 00000000000..2f5d265aaac --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersList.Page.al @@ -0,0 +1,235 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000051 "Payment Orders List" +{ + ApplicationArea = Basic, Suite; + Caption = 'Payment Orders'; + CardPageID = "Payment Orders"; + Editable = false; + PageType = List; + SourceTable = "Payment Order"; + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number for this payment order.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank where the payment order is delivered.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the bank where the payment order is delivered.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code associated with this payment order.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the sum total of the documents included in this payment order.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount of all of the documents included in this payment order.'; + } + field("Elect. Pmts Exported"; Rec."Elect. Pmts Exported") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the electronic payment has been exported for the amount on the Cartera Document.'; + } + } + } + area(factboxes) + { + part(Control1901420307; "Pmt Orders Analysis Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Pmt. O&rd.") + { + Caption = 'Pmt. O&rd.'; + action(Comments) + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."), + Type = filter(Payable); + ToolTip = 'View or create a comment.'; + } + separator(Action21) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Enabled = true; + Image = "Report"; + RunObject = Page "Payment Orders Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action24) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Enabled = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + PmtOrd.Copy(Rec); + PmtOrd.SetRecFilter(); + end; + PmtOrd.PrintRecords(true); + end; + } + } + } + area(processing) + { + group("P&osting") + { + Caption = 'P&osting'; + Image = Post; + action(TestReport) + { + ApplicationArea = Basic, Suite; + Caption = 'Test Report'; + Ellipsis = true; + Image = TestReport; + ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; + + trigger OnAction() + begin + if not Rec.Find() then + exit; + PmtOrd.Reset(); + PmtOrd := Rec; + PmtOrd.SetRecFilter(); + REPORT.Run(REPORT::"Payment Order - Test", true, false, PmtOrd); + end; + } + action(Post) + { + ApplicationArea = Basic, Suite; + Caption = 'P&ost'; + Ellipsis = true; + Image = Post; + ShortCutKey = 'F9'; + ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; + + trigger OnAction() + begin + if Rec.Find() then + PostBGPO.PayablePostOnly(Rec); + end; + } + action("Post and &Print") + { + ApplicationArea = Basic, Suite; + Caption = 'Post and &Print'; + Ellipsis = true; + Image = PostPrint; + ShortCutKey = 'Shift+F9'; + ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; + + trigger OnAction() + begin + if Rec.Find() then + PostBGPO.PayablePostAndPrint(Rec); + end; + } + } + action(GeneralPaymentOrdersMaturity) + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Orders Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Payment Orders Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(Post_Promoted; Post) + { + } + actionref("Post and &Print_Promoted"; "Post and &Print") + { + } + actionref(GeneralPaymentOrdersMaturity_Promoted; GeneralPaymentOrdersMaturity) + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + PmtOrd: Record "Payment Order"; + PostBGPO: Codeunit "BG/PO-Post and Print"; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersMaturity.Page.al new file mode 100644 index 00000000000..2f4a5d87e7d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentOrdersMaturity.Page.al @@ -0,0 +1,97 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000052 "Payment Orders Maturity" +{ + Caption = 'Payment Orders Maturity'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = List; + SaveValues = true; + SourceTable = "Payment Order"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Category Filter"; Rec."Category Filter") + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + } + group(Options) + { + Caption = 'Options'; + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View by'; + OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + field(AmountType; AmountType) + { + ApplicationArea = Basic, Suite; + Caption = 'View as'; + OptionCaption = 'Net Change,Balance at Date'; + ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + } + part(MaturityLines; "BG/PO Maturity Lines") + { + ApplicationArea = Basic, Suite; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateSubForm(); + end; + + trigger OnOpenPage() + begin + UpdateSubForm(); + end; + + var + PeriodType: Option Day,Week,Month,Quarter,Year,Period; + AmountType: Option "Net Change","Balance at Date"; + + local procedure UpdateSubForm() + begin + CurrPage.MaturityLines.PAGE.SetPayable(Rec, PeriodType, AmountType); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentorderExportN34.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentorderExportN34.Codeunit.al new file mode 100644 index 00000000000..195ee0a9718 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentorderExportN34.Codeunit.al @@ -0,0 +1,27 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.GeneralLedger.Journal; + +codeunit 7000090 "Payment order - Export N34" +{ + TableNo = "Gen. Journal Line"; + + trigger OnRun() + var + PaymentOrder: Record "Payment Order"; + begin + PaymentOrder.SetRange("No.", Rec.GetFilter("Document No.")); + if PaymentOrder.IsEmpty() then + Error(ExportPaymentErr); + Commit(); + REPORT.Run(REPORT::"Payment order - Export N34", true, false, PaymentOrder); + end; + + var + ExportPaymentErr: Label 'You cannot export payments from Payment Journal with the selected Payment Export Format in Bal. Account No.'; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentorderExportN34.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentorderExportN34.Report.al new file mode 100644 index 00000000000..dbf4655406b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PaymentorderExportN34.Report.al @@ -0,0 +1,386 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Company; +using Microsoft.Purchases.Vendor; +using System.IO; + +report 7000090 "Payment order - Export N34" +{ + ApplicationArea = Basic, Suite; + Caption = 'Payment order - Export N34'; + Permissions = TableData "Payment Order" = m; + ProcessingOnly = true; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem("Payment Order"; "Payment Order") + { + RequestFilterFields = "No."; + dataitem("Cartera Doc."; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemTableView = sorting(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date") order(ascending) where(Type = const(Payable)); + + trigger OnAfterGetRecord() + begin + TestField("Payment Method Code"); + DocType2 := DocMisc.DocType2("Payment Method Code"); + + TestField("Account No."); + Vendor.Get("Account No."); + + VATRegVend := Vendor."VAT Registration No."; + VATRegVend := PadStr('', MaxStrLen(VATRegVend) - StrLen(VATRegVend), ' ') + VATRegVend; + RmgAmount := PadStr('', MaxStrLen(RmgAmount) - StrLen(RmgAmount), '0') + RmgAmount; + + case true of + LCY = LCY::Euro: + if IsEuro then begin + TotalAmount := TotalAmount + "Remaining Amount"; + RmgAmount := EuroAmount("Remaining Amount"); + end else begin + RmgAmount := Format("Remaining Amount" * 100, 12, Text1100000); + TotalAmount := TotalAmount + "Remaining Amount"; + end; + LCY = LCY::Other: + if IsEuro then begin + TotalAmount := TotalAmount + "Remaining Amount"; + RmgAmount := EuroAmount("Remaining Amount"); + end else begin + RmgAmount := Format("Remaining Amount" * 100, 12, Text1100000); + TotalAmount := TotalAmount + "Remaining Amount" * 100; + end; + end; + + if DocType2 = '4' then begin + VendBankAccCode := "Cust./Vendor Bank Acc. Code"; + if VendBankAcc.Get("Account No.", VendBankAccCode) then begin + VendCCCAccNo := VendBankAcc."CCC Bank Account No."; + VendCCCControlDigits := VendBankAcc."CCC Control Digits"; + Vendor2 := VendBankAcc."CCC Bank No."; + VendCCCBankBranchNo := VendBankAcc."CCC Bank Branch No."; + end else begin + VendCCCAccNo := ''; + VendCCCControlDigits := ''; + Vendor2 := ''; + VendCCCBankBranchNo := ''; + end; + end else begin + TestField("Cust./Vendor Bank Acc. Code"); + VendBankAccCode := "Cust./Vendor Bank Acc. Code"; + VendBankAcc.Get("Account No.", VendBankAccCode); + VendCCCAccNo := VendBankAcc."CCC Bank Account No."; + VendCCCControlDigits := VendBankAcc."CCC Control Digits"; + Vendor2 := VendBankAcc."CCC Bank No."; + VendCCCBankBranchNo := VendBankAcc."CCC Bank Branch No."; + if (Vendor2 = '') or (VendCCCBankBranchNo = '') or + (VendCCCControlDigits = '') or (VendCCCAccNo = '') + then + Error(Text1100003, VendBankAcc."Vendor No."); + end; + + VendCCCAccNo := PadStr('', MaxStrLen(VendCCCAccNo) - StrLen(VendCCCAccNo), '0') + VendCCCAccNo; + VendCCCControlDigits := PadStr('', MaxStrLen(VendCCCControlDigits) - StrLen(VendCCCControlDigits), '0') + + VendCCCControlDigits; + + if IsEuro then + if DocType2 = '4' then + DocType := '57' + else begin + DocType := '56'; + VendBankAcc.TestField("CCC Bank Account No."); + end + else + if DocType2 = '4' then + DocType := '07' + else begin + DocType := '06'; + VendBankAcc.TestField("CCC Bank Account No."); + end; + + OutText := '06' + DocType + VATRegNo + VATRegVend + '010' + ConvertStr(RmgAmount, ' ', '0') + + ConvertStr(PadStr(Vendor2, 4, ' '), ' ', '0') + ConvertStr(PadStr(VendCCCBankBranchNo, 4, ' '), ' ', '0') + + ConvertStr(PadStr(VendCCCAccNo, 10, ' '), ' ', '0') + + '1' + '9' + PadStr('', 2, ' ') + PadStr(VendCCCControlDigits, 2, ' ') + PadStr('', 7, ' '); + OutFile.Write(OutText); + + TotalReg := TotalReg + 1; + TotalDocVend := TotalDocVend + 1; + + OutText := '06' + DocType + VATRegNo + VATRegVend + '011' + PadStr(Vendor.Name, 36, ' ') + + PadStr('', 7, ' '); + OutFile.Write(OutText); + TotalReg := TotalReg + 1; + if (DocType = '06') or (DocType = '56') then begin + OutText := '06' + DocType + VATRegNo + VATRegVend + '012' + PadStr(Vendor.Address, 36, ' ') + + PadStr('', 7, ' '); + OutFile.Write(OutText); + + TotalReg := TotalReg + 1; + + if Vendor."Address 2" <> '' then begin + OutText := '06' + DocType + VATRegNo + VATRegVend + '013' + PadStr(Vendor."Address 2", 36, ' ') + + PadStr('', 7, ' '); + OutFile.Write(OutText); + + TotalReg := TotalReg + 1; + end; + + OutText := '06' + DocType + VATRegNo + VATRegVend + '014' + PadStr(Vendor."Post Code" + ' ' + Vendor.City, 36, ' ') + + PadStr('', 7, ' '); + OutFile.Write(OutText); + + TotalReg := TotalReg + 1; + end; + end; + } + + trigger OnAfterGetRecord() + begin + TestField("Bank Account No."); + BankAcc.Get("Bank Account No."); + + CCCBankNo := BankAcc."CCC Bank No."; + CCCBankNo := PadStr('', MaxStrLen(CCCBankNo) - StrLen(CCCBankNo), '0') + CCCBankNo; + + CCCBankBranchNo := BankAcc."CCC Bank Branch No."; + CCCBankBranchNo := PadStr('', MaxStrLen(CCCBankBranchNo) - StrLen(CCCBankBranchNo), '0') + CCCBankBranchNo; + + CCCAccNo := BankAcc."CCC Bank Account No."; + CCCAccNo := PadStr('', MaxStrLen(CCCAccNo) - StrLen(CCCAccNo), '0') + CCCAccNo; + + CCCControlDigits := BankAcc."CCC Control Digits"; + CCCControlDigits := PadStr('', MaxStrLen(CCCControlDigits) - StrLen(CCCControlDigits), '0') + CCCControlDigits; + + if "Posting Date" = 0D then + PostDate := PadStr('', 6, '0') + else + PostDate := Format("Posting Date", 0, Text1100002); + + OutText := '03' + RegisterString + VATRegNo + PadStr('', 12, ' ') + '001' + + Format(DeliveryDate, 0, Text1100002) + PostDate + + CCCBankNo + CCCBankBranchNo + CCCAccNo + Relat + PadStr('', 3, ' ') + CCCControlDigits + PadStr('', 7, ' '); + OutFile.Write(OutText); + + TotalReg := TotalReg + 1; + + OutText := '03' + RegisterString + VATRegNo + PadStr('', 12, ' ') + '002' + + PadStr(CompanyInfo.Name, 36, ' ') + PadStr('', 7, ' '); + OutFile.Write(OutText); + + TotalReg := TotalReg + 1; + + OutText := '03' + RegisterString + VATRegNo + PadStr('', 12, ' ') + '003' + + PadStr(CompanyInfo.Address, 36, ' ') + PadStr('', 7, ' '); + OutFile.Write(OutText); + + TotalReg := TotalReg + 1; + + OutText := '03' + RegisterString + VATRegNo + PadStr('', 12, ' ') + '004' + + PadStr(CompanyInfo."Post Code" + ' ' + CompanyInfo.City, 36, ' ') + PadStr('', 7, ' '); + OutFile.Write(OutText); + + TotalReg := TotalReg + 1; + "Elect. Pmts Exported" := true; + Modify(); + end; + + trigger OnPreDataItem() + begin + GLSetup.Get(); + if CheckErrors then + Relat := '1' + else + Relat := '0'; + + Find('-'); + IsEuro := DocMisc.GetRegisterCode("Currency Code", RegisterCode, RegisterString); + if RegisterCode <> 0 then + RegisterString := '56' + else + RegisterString := '06'; + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(crelation; CheckErrors) + { + ApplicationArea = Basic, Suite; + Caption = 'Relation'; + ToolTip = 'Specifies if you want the bank to send you a detailed list of all transfer charges. Deselect the check box if you want a simple total of charges for all the transfers made.'; + } + field(DeliveryDate; DeliveryDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Delivery Date'; + ToolTip = 'Specifies a number to identify the operations declaration.'; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + if ExternalFile = '' then + ExternalFile := 'C:\' + Text10702; + if DeliveryDate = 0D then + DeliveryDate := Today; + end; + } + + labels + { + } + + trigger OnInitReport() + begin + CompanyInfo.Get(); + CompanyInfo.TestField("VAT Registration No."); + VATRegNo := InsStr(PadStr('', MaxStrLen(VATRegNo) - StrLen(CompanyInfo."VAT Registration No."), ' '), + CompanyInfo."VAT Registration No.", 1 + MaxStrLen(VATRegNo) - StrLen(CompanyInfo."VAT Registration No.")); + SilentMode := false; + end; + + trigger OnPostReport() + begin + TotalReg := TotalReg + 1; + case true of + LCY = LCY::Euro: + if IsEuro then + DocAmount := EuroAmount(TotalAmount) + else + DocAmount := ConvertStr(Format(TotalAmount, 12, Text1100000), ' ', '0'); + LCY = LCY::Other: + if IsEuro then + DocAmount := EuroAmount(TotalAmount) + else + DocAmount := ConvertStr(Format(TotalAmount, 12, Text1100000), ' ', '0'); + end; + + OutText := '08' + RegisterString + VATRegNo + PadStr('', 15, ' ') + + DocAmount + + (PadStr('', 8 - StrLen(Format(TotalDocVend)), '0') + Format(TotalDocVend, 0, 1)) + + (PadStr('', 10 - StrLen(Format(TotalReg)), '0') + Format(TotalReg, 0, 1)) + + PadStr('', 13, ' '); + OutFile.Write(OutText); + + OutFile.Close(); + + if SilentMode then + FileMgt.CopyServerFile(ExternalFile, SilentModeFileName, true) + else + Download(ExternalFile, '', 'C:', Text10701, ToFile); + end; + + trigger OnPreReport() + var + FileMgt: Codeunit "File Management"; + begin + OutFile.TextMode := true; + OutFile.WriteMode := true; + ExternalFile := FileMgt.ServerTempFileName(''); + ToFile := Text10702; + OutFile.Create(ExternalFile); + end; + + var + Text1100000: Label '', Locked = true; + Text1100002: Label '', Locked = true; + Text1100003: Label 'Some data from the Bank Account of Vendor %1 are missing.'; + CompanyInfo: Record "Company Information"; + Vendor: Record Vendor; + BankAcc: Record "Bank Account"; + VendBankAcc: Record "Vendor Bank Account"; + GLSetup: Record "General Ledger Setup"; + DocMisc: Codeunit "Document-Misc"; + FileMgt: Codeunit "File Management"; + OutFile: File; + ExternalFile: Text[1024]; + CheckErrors: Boolean; + VATRegNo: Text[10]; + CCCBankNo: Text[4]; + VATRegVend: Text[12]; + VendCCCBankBranchNo: Text[4]; + CCCBankBranchNo: Text[4]; + VendCCCControlDigits: Text[2]; + CCCControlDigits: Text[2]; + CCCAccNo: Text[10]; + VendCCCAccNo: Text[10]; + Vendor2: Text[4]; + TotalReg: Decimal; + TotalDocVend: Decimal; + TotalAmount: Decimal; + OutText: Text[85]; + DeliveryDate: Date; + Relat: Text[1]; + DocType2: Code[10]; + DocType: Text[2]; + RmgAmount: Text[12]; + VendBankAccCode: Code[20]; + PostDate: Text[6]; + LCY: Option Euro,Other; + IsEuro: Boolean; + RegisterCode: Integer; + RegisterString: Text[2]; + DocAmount: Text[12]; + ToFile: Text[1024]; + Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; + Text10702: Label 'ORDENPAGO.ASC'; + SilentMode: Boolean; + SilentModeFileName: Text; + + [Scope('OnPrem')] + procedure EuroAmount(Amount: Decimal): Text[12] + var + TextAmount: Text[15]; + begin + TextAmount := ConvertStr(Format(Amount), ' ', '0'); + if StrPos(TextAmount, ',') = 0 then + TextAmount := TextAmount + '00' + else begin + if StrLen(CopyStr(TextAmount, StrPos(TextAmount, ','), StrLen(TextAmount))) = 2 then + TextAmount := TextAmount + '0'; + TextAmount := DelChr(TextAmount, '=', ','); + end; + if StrPos(TextAmount, '.') = 0 then + TextAmount := TextAmount + else + TextAmount := DelChr(TextAmount, '=', '.'); + + while StrLen(TextAmount) < 12 do + TextAmount := '0' + TextAmount; + + exit(TextAmount); + end; + + [Scope('OnPrem')] + procedure EnableSilentMode(FileName: Text) + begin + SilentMode := true; + SilentModeFileName := FileName; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PmtOrdersAnalysisFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PmtOrdersAnalysisFactBox.Page.al new file mode 100644 index 00000000000..581dc9c9274 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/PmtOrdersAnalysisFactBox.Page.al @@ -0,0 +1,75 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Finance.ReceivablesPayables; + +page 35298 "Pmt Orders Analysis Fact Box" +{ + Caption = 'Pmt Orders Analysis Fact Box'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SaveValues = true; + SourceTable = "Payment Order"; + + layout + { + area(content) + { + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Suite; + Editable = false; + ToolTip = 'Specifies the currency code associated with this payment order.'; + } + field(DocCount; DocCount) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Documents'; + Editable = false; + ToolTip = 'Specifies the number of documents included.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the sum total of the documents included in this payment order.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount of all of the documents included in this payment order.'; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + Doc: Record "Cartera Doc."; + DocCount: Integer; + + local procedure UpdateStatistics() + begin + Doc.SetRange(Type, Doc.Type::Payable); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Global Dimension 1 Filter", Doc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", Doc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", Doc."Category Code"); + Rec.CopyFilter("Due Date Filter", Doc."Due Date"); + DocCount := Doc.Count(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/RedrawPayableBills.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/RedrawPayableBills.Report.al new file mode 100644 index 00000000000..1bdfb7b9c80 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/RedrawPayableBills.Report.al @@ -0,0 +1,497 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Receivables; + +report 7000083 "Redraw Payable Bills" +{ + Caption = 'Redraw Payable Bills'; + Permissions = TableData "Cust. Ledger Entry" = imd, + TableData "Vendor Ledger Entry" = imd, + TableData "Cartera Doc." = imd, + TableData "Posted Cartera Doc." = imd, + TableData "Closed Cartera Doc." = imd; + ProcessingOnly = true; + + dataset + { + dataitem(VendLedgEntry; "Vendor Ledger Entry") + { + DataItemTableView = sorting("Entry No."); + + trigger OnAfterGetRecord() + var + IsHandled: Boolean; + begin + CheckUnrealizedVAT(VendLedgEntry); + + IsHandled := false; + OnAfterGetVendorLedgerEntryOnBeforeCheckNewDueDate(VendLedgEntry, NewDueDate, IsHandled); + if not IsHandled then + if NewDueDate < "Due Date" then begin + Window.Close(); + Error( + Text1100002, + FieldCaption("Due Date"), + FieldCaption("Entry No."), + "Entry No."); + end; + + SumLCYAmt := 0; + DocCount := DocCount + 1; + Window.Update(1, DocCount); + + GenJnlLineInit(); + CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + if "Remaining Amount" <> 0 then begin // open bill + CarteraManagement.CreatePayableDocPayment(GenJnlLine, VendLedgEntry); + IsOpenBill := true; + end else begin // settled bill + CarteraManagement.ReversePayableDocPayment(GenJnlLine, VendLedgEntry); + IsOpenBill := false; + end; + + GenJnlLine.Insert(); + + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + NewDocAmount := -GenJnlLine.Amount; + NewDocAmountLCY := -GenJnlLine."Amount (LCY)"; + + Vendor.Get("Vendor No."); + Vendor.TestField("Vendor Posting Group"); + VendPostingGr.Get(Vendor."Vendor Posting Group"); + + if ((not IsOpenBill) and ("Currency Code" <> '') and + ("Document Status" = "Document Status"::Honored)) + then + InsertGainLoss(); + + case "Document Situation" of + "Document Situation"::"Posted BG/PO": + begin + PostedDoc.Get(PostedDoc.Type::Payable, "Entry No."); + AmtForCollection := PostedDoc."Amount for Collection"; + end; + "Document Situation"::"Closed BG/PO": + begin + ClosedDoc.Get(ClosedDoc.Type::Payable, "Entry No."); + AmtForCollection := ClosedDoc."Amount for Collection"; + end; + end; + + "Document Status" := "Document Status"::Redrawn; + Modify(); + + if StrPos(GenJnlLine."Bill No.", '-') = 0 then + DocNo := VendLedgEntry."Bill No." + '-1' + else + DocNo := IncStr(GenJnlLine."Bill No."); + GenJnlLineInit(); + + if ArePostedDocs then begin + PostedDoc.Get( + PostedDoc.Type::Payable, VendLedgEntry."Entry No."); + if NewPmtMethod = '' then + GenJnlLine."Payment Method Code" := PostedDoc."Payment Method Code" + else + GenJnlLine."Payment Method Code" := NewPmtMethod; + GenJnlLine."Recipient Bank Account" := PostedDoc."Cust./Vendor Bank Acc. Code"; + end else begin + ClosedDoc.Get( + ClosedDoc.Type::Payable, VendLedgEntry."Entry No."); + if NewPmtMethod = '' then + GenJnlLine."Payment Method Code" := ClosedDoc."Payment Method Code" + else + GenJnlLine."Payment Method Code" := NewPmtMethod; + GenJnlLine."Recipient Bank Account" := ClosedDoc."Cust./Vendor Bank Acc. Code"; + end; + GenJnlLine."Due Date" := NewDueDate; + GenJnlLine."External Document No." := VendLedgEntry."External Document No."; + InsertGenJnlLine( + GenJnlLine."Account Type"::Vendor, + VendLedgEntry."Vendor No.", + GenJnlLine."Document Type"::Bill, + NewDocAmount, + StrSubstNo(Text1100003, VendLedgEntry."Document No.", DocNo), DocNo); + + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + + if "Currency Code" <> '' then begin + Currency.SetFilter(Code, "Currency Code"); + Currency.FindFirst(); + if SumLCYAmt <> 0 then begin + if SumLCYAmt > 0 then begin + Currency.TestField("Residual Gains Account"); + Account := Currency."Residual Gains Account"; + end else begin + Currency.TestField("Residual Losses Account"); + Account := Currency."Residual Losses Account"; + end; + VendLedgEntry."Currency Code" := ''; + GenJnlLineInit(); + InsertGenJnlLine( + GenJnlLine."Account Type"::"G/L Account", + Account, + "Gen. Journal Document Type"::" ", + -SumLCYAmt, + Text1100004, + ''); + end; + end; + + if not IsOpenBill then + DocPost.InsertDtldVendLedgEntry( + VendLedgEntry, + NewDocAmount, + NewDocAmountLCY, + EntryType::Redrawal, + PostingDate); + end; + + trigger OnPostDataItem() + var + GenJnlLine2: Record "Gen. Journal Line" temporary; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + begin + Window.Close(); + + if ArePostedDocs then + PostedPmtOrd.Modify() + else + ClosedPmtOrd.Modify(); + if GenJnlLine.Find('-') then + repeat + GenJnlLine2 := GenJnlLine; + GenJnlPostLine.Run(GenJnlLine2); + until GenJnlLine.Next() = 0; + + Commit(); + + Message(Text1100005, DocCount); + end; + + trigger OnPreDataItem() + begin + ReasonCode := ''; + SourceCodeSetup.Get(); + SourceCode := SourceCodeSetup."Cartera Journal"; + + DocPost.CheckPostingDate(PostingDate); + + Window.Open( + Text1100001); + + DocCount := 0; + + if GenJnlLine.Find('+') then + GenJnlLineNextNo := GenJnlLine."Line No." + 10000 + else + GenJnlLineNextNo := 10000; + TransactionNo := GenJnlLine."Transaction No." + 1; + + Clear(PmtOrdPostingDate); + Find('-'); + case true of + PostedDoc.Get(PostedDoc.Type::Payable, "Entry No."): + begin + ArePostedDocs := true; + PostedPmtOrd.Get(PostedDoc."Bill Gr./Pmt. Order No."); + PmtOrdPostingDate := PostedPmtOrd."Posting Date"; + BankAcc.Get(PostedPmtOrd."Bank Account No."); + end; + ClosedDoc.Get(ClosedDoc.Type::Payable, "Entry No."): + begin + ArePostedDocs := false; + if ClosedDoc."Bill Gr./Pmt. Order No." <> '' then begin + ClosedPmtOrd.Get(ClosedDoc."Bill Gr./Pmt. Order No."); + PmtOrdPostingDate := ClosedPmtOrd."Posting Date"; + BankAcc.Get(ClosedPmtOrd."Bank Account No."); + end; + end; + else + CurrReport.Quit(); + end; + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PostingDate; PostingDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Posting Date'; + ToolTip = 'Specifies the posting date.'; + } + field(NewDueDate; NewDueDate) + { + ApplicationArea = Basic, Suite; + Caption = 'New Due Date'; + ToolTip = 'Specifies the new due date we want to define for the new bill that will be created by redrawing.'; + } + field(NewPmtMethod; NewPmtMethod) + { + ApplicationArea = Basic, Suite; + Caption = 'New Payment Method'; + TableRelation = "Payment Method" where("Create Bills" = const(true)); + ToolTip = 'Specifies a new method if you want it to be different from the one in the old bill that we are redrawing.'; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + PostingDate := WorkDate(); + end; + } + + labels + { + } + + trigger OnPreReport() + begin + if NewDueDate = 0D then + Error(Text1100000); + end; + + var + Text1100000: Label 'Please, specify a New Due Date for the redrawn bill.'; + Text1100001: Label 'Redrawing #1######'; + Text1100002: Label 'The New Due Date cannot be earlier than the current %1 in Bill %2 %3.'; + Text1100003: Label 'Bill %1/%2'; + Text1100004: Label 'Residual adjust generated by rounding Amount'; + Text1100005: Label '%1 bills have been redrawn.'; + Vendor: Record Vendor; + VendPostingGr: Record "Vendor Posting Group"; + GenJnlLine: Record "Gen. Journal Line" temporary; + PostedDoc: Record "Posted Cartera Doc."; + ClosedDoc: Record "Closed Cartera Doc."; + PostedPmtOrd: Record "Posted Payment Order"; + ClosedPmtOrd: Record "Closed Payment Order"; + BankAcc: Record "Bank Account"; + BankAccPostingGr: Record "Bank Account Posting Group"; + Currency: Record Currency; + SourceCodeSetup: Record "Source Code Setup"; + CarteraManagement: Codeunit CarteraManagement; + DocPost: Codeunit "Document-Post"; + Window: Dialog; + TransactionNo: Integer; + ArePostedDocs: Boolean; + PostingDate: Date; + PmtOrdPostingDate: Date; + SourceCode: Code[10]; + ReasonCode: Code[10]; + NewDocAmount: Decimal; + NewDocAmountLCY: Decimal; + GenJnlLineNextNo: Integer; + DocCount: Integer; + Account: Code[20]; + DocNo: Code[20]; + NewDueDate: Date; + NewPmtMethod: Code[10]; + AmtForCollection: Decimal; + SumLCYAmt: Decimal; + IsOpenBill: Boolean; + EntryType: Option " ","Initial Entry",Application,"Unrealized Loss","Unrealized Gain","Realized Loss","Realized Gain","Payment Discount","Payment Discount (VAT Excl.)","Payment Discount (VAT Adjustment)","Appln. Rounding","Correction of Remaining Amount",,,,,,,,,Settlement,Rejection,Redrawal,Expenses; + + local procedure GenJnlLineInit() + begin + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + GenJnlLine."Transaction No." := TransactionNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."Reason Code" := ReasonCode; + GenJnlLine."System-Created Entry" := true; + end; + + local procedure InsertGenJnlLine(AccountType2: Enum "Gen. Journal Account Type"; AccountNo2: Code[20]; DocumentType2: Enum "Gen. Journal Document Type"; Amount2: Decimal; Description2: Text[250]; DocNo2: Code[20]) + var + PreservedDueDate: Date; + PreservedPaymentMethodCode: Code[10]; + begin + GenJnlLine."Account Type" := AccountType2; + PreservedDueDate := GenJnlLine."Due Date"; + PreservedPaymentMethodCode := GenJnlLine."Payment Method Code"; + GenJnlLine.Validate("Account No.", AccountNo2); + GenJnlLine."Due Date" := PreservedDueDate; + GenJnlLine."Payment Method Code" := PreservedPaymentMethodCode; + GenJnlLine."Document Type" := DocumentType2; + GenJnlLine."Document No." := VendLedgEntry."Document No."; + GenJnlLine."Bill No." := DocNo2; + GenJnlLine.Description := CopyStr(Description2, 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", VendLedgEntry."Currency Code"); + GenJnlLine.Validate(Amount, Amount2); + GenJnlLine."Dimension Set ID" := + CarteraManagement.GetCombinedDimSetID(GenJnlLine, VendLedgEntry."Dimension Set ID"); + + OnBeforeInsertGenJnlLine(GenJnlLine, VendLedgEntry, NewPmtMethod); + GenJnlLine.Insert(); + end; + + [Scope('OnPrem')] + procedure InsertGainLoss() + var + GLEntry: Record "G/L Entry"; + DocMisc: Codeunit "Document-Misc"; + GainLossAmt: Decimal; + PostingDate2: Date; + TempCurrencyCode: Code[10]; + AccNo: Code[20]; + Type: Option Receivable,Payable; + TypeDoc: Option Bill,Invoice; + begin + Currency.Get(VendLedgEntry."Currency Code"); + AccNo := GetAccount(); + if ArePostedDocs then + if VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Bill then + DocMisc.FilterGLEntry(GLEntry, AccNo, PostedDoc."Document No.", PostedDoc."No.", TypeDoc::Bill, '') + else + DocMisc.FilterGLEntry(GLEntry, AccNo, PostedDoc."Document No.", PostedDoc."No.", TypeDoc::Invoice, '') + else + if VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Bill then + DocMisc.FilterGLEntry(GLEntry, AccNo, ClosedDoc."Document No.", ClosedDoc."No.", TypeDoc::Bill, '') + else + DocMisc.FilterGLEntry(GLEntry, AccNo, ClosedDoc."Document No.", ClosedDoc."No.", TypeDoc::Invoice, ''); + + if GLEntry.Find('-') then begin + GainLossAmt := 0; + GLEntry.CalcSums(Amount); + GainLossAmt := (GenJnlLine."Amount (LCY)" + GLEntry.Amount); + end else begin + PostingDate2 := 0D; + GainLossAmt := 0; + if ArePostedDocs then begin + PostingDate2 := + CarteraManagement.GetLastDate(VendLedgEntry."Currency Code", PostedDoc."Honored/Rejtd. at Date", Type::Payable); + GainLossAmt := CarteraManagement.GetGainLoss(PostingDate2, PostingDate, PostedDoc."Original Amount", VendLedgEntry. + "Currency Code"); + end else begin + PostingDate2 := + CarteraManagement.GetLastDate(VendLedgEntry."Currency Code", ClosedDoc."Honored/Rejtd. at Date", Type::Payable); + GainLossAmt := CarteraManagement.GetGainLoss(PostingDate2, PostingDate, ClosedDoc."Original Amount", VendLedgEntry. + "Currency Code"); + end; + end; + + if GainLossAmt <> 0 then begin + TempCurrencyCode := VendLedgEntry."Currency Code"; + VendLedgEntry."Currency Code" := ''; + if GainLossAmt < 0 then begin + Currency.TestField("Realized Gains Acc."); + GenJnlLineInit(); + InsertGenJnlLine( + GenJnlLine."Account Type"::"G/L Account", + Currency."Realized Gains Acc.", + "Gen. Journal Document Type"::" ", + GainLossAmt, + StrSubstNo( + Text1100003, + VendLedgEntry."Document No.", + VendLedgEntry."Bill No."), + ''); + end else begin + Currency.TestField("Realized Losses Acc."); + GenJnlLineInit(); + InsertGenJnlLine( + GenJnlLine."Account Type"::"G/L Account", + Currency."Realized Losses Acc.", + "Gen. Journal Document Type"::" ", + GainLossAmt, + StrSubstNo( + Text1100003, + VendLedgEntry."Document No.", + VendLedgEntry."Bill No."), + ''); + end; + GenJnlLineInit(); + + BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); + InsertGenJnlLine( + GenJnlLine."Account Type"::"G/L Account", + BankAccPostingGr."G/L Account No.", + "Gen. Journal Document Type"::" ", + -GainLossAmt, + StrSubstNo( + Text1100003, + VendLedgEntry."Document No.", + VendLedgEntry."Bill No."), + ''); + VendLedgEntry."Currency Code" := TempCurrencyCode; + end; + end; + + [Scope('OnPrem')] + procedure GetAccount(): Code[20] + begin + BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); + exit(BankAccPostingGr."G/L Account No."); + end; + + [Scope('OnPrem')] + procedure CheckUnrealizedVAT(VendLedgEntry: Record "Vendor Ledger Entry") + var + VATPostingSetup: Record "VAT Posting Setup"; + VendLedgEntry2: Record "Vendor Ledger Entry"; + ExistVATNOReal: Boolean; + Text1100001: Label 'You can not redraw a bill when this contains Unrealized VAT.'; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + begin + VendLedgEntry2.SetCurrentKey("Document No.", "Document Type", "Vendor No."); + VendLedgEntry2.SetRange("Document No.", VendLedgEntry."Document No."); + VendLedgEntry2.SetRange("Document Type", VendLedgEntry."Document Type"); + VendLedgEntry2.SetRange("Vendor No.", VendLedgEntry."Vendor No."); + if VendLedgEntry2.FindFirst() then begin + OnBeforeVendFindVATSetup(VendLedgEntry2); + ExistVATNOReal := GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry2, false); + end; + if ExistVATNOReal then + Error(Text1100001); + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeInsertGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; VendorLedgerEntry: Record "Vendor Ledger Entry"; NewPaymentMethod: Code[10]) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeVendFindVATSetup(var VendorLedgerEntry: Record "Vendor Ledger Entry") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterGetVendorLedgerEntryOnBeforeCheckNewDueDate(var VendorLedgerEntry: Record "Vendor Ledger Entry"; NewDueDate: Date; var IsHandled: Boolean) + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/SettleDocsinPostedPO.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/SettleDocsinPostedPO.Report.al new file mode 100644 index 00000000000..79bd391d267 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/SettleDocsinPostedPO.Report.al @@ -0,0 +1,528 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Finance.VAT.Ledger; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.History; +using Microsoft.Sales.Receivables; + +report 7000082 "Settle Docs. in Posted PO" +{ + Caption = 'Settle Docs. in Posted PO'; + Permissions = TableData "Cust. Ledger Entry" = imd, + TableData "Vendor Ledger Entry" = imd, + TableData "G/L Register" = m, + TableData "Posted Cartera Doc." = imd, + TableData "Closed Cartera Doc." = imd, + TableData "Posted Payment Order" = imd, + TableData "Closed Payment Order" = imd; + ProcessingOnly = true; + + dataset + { + dataitem(PostedDoc; "Posted Cartera Doc.") + { + DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where(Status = const(Open)); + + trigger OnAfterGetRecord() + var + FromJnl: Boolean; + IsHandled: Boolean; + begin + IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("No."); + if "Document Type" = "Document Type"::Invoice then + ExistInvoice := true; + + IsHandled := false; + OnAfterGetPostedDocOnBeforePostedPmtOrdGet(PostedDoc, PostedPmtOrd, BankAcc, Delay, IsHandled); + if not IsHandled then begin + PostedPmtOrd.Get("Bill Gr./Pmt. Order No."); + BankAcc.Get(PostedPmtOrd."Bank Account No."); + Delay := BankAcc."Delay for Notices"; + end; + + if DueOnly and (PostingDate < "Due Date" + Delay) then + CurrReport.Skip(); + + DocCount := DocCount + 1; + Window.Update(1, DocCount); + + case "Document Type" of + "Document Type"::Invoice, "Document Type"::"Credit Memo": + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine."Document Date" := GenJnlLine."Document Date"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); + VendLedgEntry.Get(PostedDoc."Entry No."); + OnBeforeValidateInvoiceAccountNo( + PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, FromJnl, ExistsNoRealVAT, PostedPmtOrd); + GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100001, PostedDoc."Document No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine."Posting Group" := VendLedgEntry."Vendor Posting Group"; + if PaymentToleranceMgt.CheckCalcPmtDiscGenJnlVend(GenJnlLine, VendLedgEntry, 0, false) then + GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount" + VendLedgEntry."Remaining Pmt. Disc. Possible") + else + GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount"); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine.Validate("Recipient Bank Account", VendLedgEntry."Recipient Bank Account"); + GenJnlLine.Validate("Dimension Set ID", VendLedgEntry."Dimension Set ID"); + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + GroupAmount := GroupAmount + "Remaining Amount"; + if PaymentToleranceMgt.CheckCalcPmtDiscGenJnlVend(GenJnlLine, VendLedgEntry, 0, false) then + CalcBankAccount("No.", "Remaining Amount" + VendLedgEntry."Remaining Pmt. Disc. Possible", VendLedgEntry."Entry No.") + else + CalcBankAccount("No.", "Remaining Amount", VendLedgEntry."Entry No."); + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + VendLedgEntry.Modify(); + OnAfterCreateInvoiceGenJnlLine( + GenJnlLine, VendLedgEntry, PostedDoc, PostedPmtOrd, FromJnl, ExistsNoRealVAT, ExistVATEntry, + IsRedrawn, FirstVATEntryNo, LastVATEntryNo, NoRealVATBuffer, BankAccPostBuffer); + end; + "Document Type"::Bill: + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); + VendLedgEntry.Get(PostedDoc."Entry No."); + + if GLSetup."Unrealized VAT" then begin + FromJnl := false; + if PostedDoc."From Journal" then + FromJnl := true; + ExistsNoRealVAT := GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry, FromJnl); + end; + + GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount"); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine.Validate("Recipient Bank Account", VendLedgEntry."Recipient Bank Account"); + GenJnlLine.Validate("Dimension Set ID", VendLedgEntry."Dimension Set ID"); + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + if GLSetup."Unrealized VAT" and ExistsNoRealVAT and (not IsRedrawn) then begin + VendLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + + OnBeforeVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); + CarteraManagement.VendUnrealizedVAT2( + VendLedgEntry, + VendLedgEntry."Remaining Amt. (LCY)", + GenJnlLine, + ExistVATEntry, + FirstVATEntryNo, + LastVATEntryNo, + NoRealVATBuffer, + FromJnl, + "Document No."); + + TempCurrCode := "Currency Code"; + "Currency Code" := ''; + + if NoRealVATBuffer.Find('-') then begin + repeat + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer.Account, + NoRealVATBuffer.Amount, + "Dimension Set ID"); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer."Balance Account", + -NoRealVATBuffer.Amount, + "Dimension Set ID"); + until NoRealVATBuffer.Next() = 0; + NoRealVATBuffer.DeleteAll(); + end; + + "Currency Code" := TempCurrCode; + end; + GroupAmount := GroupAmount + "Remaining Amount"; + CalcBankAccount("No.", "Remaining Amount", VendLedgEntry."Entry No."); + VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; + VendLedgEntry.Modify(); + OnAfterCreateBillGenJnlLine( + GenJnlLine, VendLedgEntry, PostedDoc, PostedPmtOrd, FromJnl, ExistsNoRealVAT, ExistVATEntry, + IsRedrawn, FirstVATEntryNo, LastVATEntryNo, NoRealVATBuffer, BankAccPostBuffer); + end; + end; + end; + + trigger OnPostDataItem() + var + VendLedgEntry2: Record "Vendor Ledger Entry"; + PostedDoc2: Record "Posted Cartera Doc."; + IsHandled: Boolean; + begin + if (DocCount = 0) or (GroupAmount = 0) then begin + if DueOnly then + Error(Text1100003 + Text1100004); + + Error(Text1100003 + Text1100005); + end; + + IsHandled := false; + OnBeforePostedDocOnPostDataItem(PostedDoc, PostedPmtOrd, BankAccPostBuffer, IsHandled, GenJnlLine, GenJnlLineNextNo, SumLCYAmt, PostingDate, SourceCode); + if not IsHandled then + if BankAccPostBuffer.Find('-') then + repeat + VendLedgEntry2.Get(BankAccPostBuffer."Entry No."); + PostedDoc2.Get(1, VendLedgEntry2."Entry No."); + PostedPmtOrd.Get(PostedDoc2."Bill Gr./Pmt. Order No."); + BankAcc.Get(PostedPmtOrd."Bank Account No."); + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); + GenJnlLine.Validate("Account No.", BankAcc."No."); + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100006, PostedPmtOrd."No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedPmtOrd."Currency Code"); + GenJnlLine.Validate(Amount, -BankAccPostBuffer.Amount); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine.Validate("Dimension Set ID", CarteraManagement.GetCombinedDimSetID(GenJnlLine, BankAccPostBuffer."Dimension Set ID")); + GenJnlLine."System-Created Entry" := true; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); + GenJnlLine.Insert(); + + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + until BankAccPostBuffer.Next() = 0; + + if PostedPmtOrd."Currency Code" <> '' then + if SumLCYAmt <> 0 then begin + Currency.SetFilter(Code, PostedPmtOrd."Currency Code"); + Currency.FindFirst(); + if SumLCYAmt > 0 then begin + Currency.TestField("Residual Gains Account"); + Acct := Currency."Residual Gains Account"; + end else begin + Currency.TestField("Residual Losses Account"); + Acct := Currency."Residual Losses Account"; + end; + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); + GenJnlLine.Validate("Account No.", Acct); + GenJnlLine.Description := Text1100007; + GenJnlLine.Validate("Currency Code", ''); + GenJnlLine.Validate(Amount, -SumLCYAmt); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); + GenJnlLine.Insert(); + end; + + PostedPmtOrd.Modify(); + DocPost.PostSettlementForPostedPmtOrder(GenJnlLine, PostingDate); + OnAfterPostSettlementForPostedPmtOrder(PostedDoc, PostedPmtOrd); + + Window.Close(); + + if (Counter > 1) and GLSetup."Unrealized VAT" and ExistVATEntry and ExistInvoice then begin + if VATEntry.FindLast() then + ToVATEntryNo := VATEntry."Entry No."; + GLReg.FindLast(); + GLReg."From VAT Entry No." := FromVATEntryNo; + GLReg."To VAT Entry No." := ToVATEntryNo; + GLReg.Modify(); + end else + if ExistVATEntry then begin + GLReg.FindLast(); + GLReg."From VAT Entry No." := FirstVATEntryNo; + GLReg."To VAT Entry No." := LastVATEntryNo; + GLReg.Modify(); + end; + + IsHandled := false; + OnBeforeCommit(PostedDoc, PostedPmtOrd, GenJnlLine, HidePrintDialog, IsHandled); + if IsHandled then + exit; + + Commit(); + + if not HidePrintDialog then + Message(Text1100008, DocCount, GroupAmount); + end; + + trigger OnPreDataItem() + begin + OnBeforePostedDocOnPreDataItem(PostedDoc, PostingDate); + DocPost.CheckPostingDate(PostingDate); + + SourceCodeSetup.Get(); + SourceCode := SourceCodeSetup."Cartera Journal"; + DocCount := 0; + SumLCYAmt := 0; + GenJnlLineNextNo := 0; + ExistInvoice := false; + ExistVATEntry := false; + Window.Open( + Text1100000); + Counter := Count; + if (Counter > 1) and GLSetup."Unrealized VAT" then begin + VATEntry.LockTable(); + if VATEntry.FindLast() then + FromVATEntryNo := VATEntry."Entry No." + 1; + end; + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PostingDate; PostingDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Posting Date'; + NotBlank = true; + ToolTip = 'Specifies the posting date for the document.'; + } + field(DueOnly; DueOnly) + { + ApplicationArea = Basic, Suite; + Caption = 'Due bills only'; + ToolTip = 'Specifies if you want to only include documents that have become overdue. If it does not matter if a document is overdue at the time of settlement, leave this field blank.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnInitReport() + begin + PostingDate := WorkDate(); + end; + + trigger OnPreReport() + begin + GLSetup.Get(); + end; + + var + Text1100000: Label 'Settling payable documents #1######'; + Text1100001: Label 'Payable document settlement %1'; + Text1100002: Label 'Payable bill settlement %1/%2'; + Text1100003: Label 'No payable documents have been found that can be settled.'; + Text1100004: Label 'Please check that the selection is not empty and at least one payable document is open and due.'; + Text1100005: Label 'Please check that the selection is not empty and at least one payable document is open.'; + Text1100006: Label 'Payment Order settlement %1'; + Text1100007: Label 'Residual adjust generated by rounding Amount'; + Text1100008: Label '%1 documents totaling %2 have been settled.'; + Text1100009: Label 'Document settlement %1/%2'; + SourceCodeSetup: Record "Source Code Setup"; + PostedPmtOrd: Record "Posted Payment Order"; + GenJnlLine: Record "Gen. Journal Line" temporary; + VendLedgEntry: Record "Vendor Ledger Entry"; + BankAcc: Record "Bank Account"; + Currency: Record Currency; + GLReg: Record "G/L Register"; + GLSetup: Record "General Ledger Setup"; + VATPostingSetup: Record "VAT Posting Setup"; + VATEntry: Record "VAT Entry"; + BankAccPostBuffer: Record "BG/PO Post. Buffer" temporary; + NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; + DocPost: Codeunit "Document-Post"; + CarteraManagement: Codeunit CarteraManagement; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + PaymentToleranceMgt: Codeunit "Payment Tolerance Management"; + Window: Dialog; + PostingDate: Date; + DueOnly: Boolean; + Delay: Decimal; + SourceCode: Code[10]; + Acct: Code[20]; + DocCount: Integer; + GroupAmount: Decimal; + GenJnlLineNextNo: Integer; + SumLCYAmt: Decimal; + ExistVATEntry: Boolean; + FirstVATEntryNo: Integer; + LastVATEntryNo: Integer; + IsRedrawn: Boolean; + ExistInvoice: Boolean; + FromVATEntryNo: Integer; + ToVATEntryNo: Integer; + Counter: Integer; + TempCurrCode: Code[10]; + ExistsNoRealVAT: Boolean; + HidePrintDialog: Boolean; + + local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal; DimSetID: Integer) + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedPmtOrd."No."; + GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; + GenJnlLine."Account Type" := AccType; + GenJnlLine."Account No." := AccNo; + if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)) + else + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, -Amount2); + GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := ''; + GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine.Validate("Dimension Set ID", DimSetID); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); + GenJnlLine.Insert(); + end; + + [Scope('OnPrem')] + procedure CalcBankAccount(BankAcc2: Code[20]; Amount2: Decimal; EntryNo: Integer) + var + IsHandled: Boolean; + begin + IsHandled := false; + OnBeforeCalcBankAccount(BankAcc2, Amount2, EntryNo, BankAccPostBuffer, IsHandled); + if IsHandled then + exit; + + if BankAccPostBuffer.Get(BankAcc2, '', EntryNo) then begin + BankAccPostBuffer.Amount := BankAccPostBuffer.Amount + Amount2; + BankAccPostBuffer.Modify(); + end else begin + BankAccPostBuffer.Init(); + BankAccPostBuffer.Account := BankAcc2; + BankAccPostBuffer.Amount := Amount2; + BankAccPostBuffer."Entry No." := EntryNo; + BankAccPostBuffer."Global Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; + BankAccPostBuffer."Global Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; + BankAccPostBuffer."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; + BankAccPostBuffer.Insert(); + end; + end; + + procedure SetHidePrintDialog(NewHidePrintDialog: Boolean) + begin + HidePrintDialog := NewHidePrintDialog; + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCreateBillGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var ExistVATEntry: Boolean; var IsRedrawn: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var BankBgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCreateInvoiceGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var ExistVATEntry: Boolean; var IsRedrawn: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var BankBgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterGetPostedDocOnBeforePostedPmtOrdGet(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var BankAccount: Record "Bank Account"; var Delay: Decimal; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterPostSettlementForPostedPmtOrder(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCommit(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var GenJournalLine: Record "Gen. Journal Line"; var HidePrintDialog: Boolean; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCalcBankAccount(BankAcc2: Code[20]; Amount2: Decimal; EntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var IsHandled: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeGenJournalLineInsert(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BankAccount: Record "Bank Account") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforePostedDocOnPostDataItem(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var IsHandled: Boolean; var GenJnlLine: Record "Gen. Journal Line"; var GenJnlLineNextNo: Integer; var SumLCYAmt: Decimal; PostingDate: Date; SourceCode: Code[10]) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforePostedDocOnPreDataItem(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostingDate: Date) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeValidateInvoiceAccountNo(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var PostedPaymentOrder: Record "Posted Payment Order") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/VoidPOExport.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/VoidPOExport.Report.al new file mode 100644 index 00000000000..729936257ef --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Payables/VoidPOExport.Report.al @@ -0,0 +1,124 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Payables; + +using Microsoft.Bank.BankAccount; +using Microsoft.EServices.EDocument; +using Microsoft.Finance.ReceivablesPayables; + +report 7000061 "Void PO - Export" +{ + ApplicationArea = Basic, Suite; + Caption = 'Void PO - Export'; + ProcessingOnly = true; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem("Payment Order"; "Payment Order") + { + DataItemTableView = sorting("No.") where("Elect. Pmts Exported" = const(true)); + dataitem("Cartera Doc."; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemTableView = sorting(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date"); + + trigger OnAfterGetRecord() + var + ElectPmtMgmt: Codeunit "Elect. Pmts Management"; + begin + TestField("Elect. Pmts Exported", true); + TestField("Document No."); + ElectPmtMgmt.ProcessElectronicPayment("Document No.", "Payment Order"."Bank Account No."); + + "Elect. Pmts Exported" := false; + "Export File Name" := ''; + Modify(); + end; + } + + trigger OnAfterGetRecord() + begin + if FirstTime then begin + BankAccount.Get("Bank Account No."); + "Cartera Doc.".SetRange(Type, "Cartera Doc.".Type::Payable); + "Cartera Doc.".SetRange("Bill Gr./Pmt. Order No.", "No."); + if "Cartera Doc.".FindFirst() then + FileName := "Cartera Doc."."Export File Name"; + if Exists(FileName) then + Erase(FileName); + FirstTime := false; + end; + TestField("Bank Account No."); + + "Elect. Pmts Exported" := false; + Modify(); + end; + + trigger OnPreDataItem() + begin + SetRange("No.", "No."); + + if not FindFirst() then + Error(Text1100002); + + FirstTime := true; + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PaymentOrderNo; "Payment Order"."No.") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment Order No.'; + TableRelation = "Payment Order"; + ToolTip = 'Specifies the number of the payment order.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnPostReport() + begin + Message(Text1100001, FileName); + end; + + trigger OnPreReport() + begin + "Payment Order".Get("Payment Order"."No."); + BankAccount.Get("Payment Order"."Bank Account No."); + BankAccount.TestField("Currency Code", ''); + if not Confirm(Text1100000, false, "Payment Order"."No.", BankAccount.TableCaption(), BankAccount."No.") then + CurrReport.Quit(); + end; + + var + BankAccount: Record "Bank Account"; + FirstTime: Boolean; + FileName: Text[250]; + Text1100000: Label 'Are you SURE you want to Void all of the Cartera Electronic Payments in Order %1 written against %2 %3?'; + Text1100001: Label 'The exported Electronic Payment File %1 has been voided. To post the Payment Order you must first export the Electronic Payment File again.'; + Text1100002: Label 'There is nothing to Void.'; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorCard.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorCard.PageExt.al new file mode 100644 index 00000000000..e1c416b7624 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorCard.PageExt.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Vendor; + +using Microsoft.Purchases.Payables; + +pageextension 7000174 "CRT Vendor Card" extends "Vendor Card" +{ + layout + { + addafter(VendorStatisticsFactBox) + { + part(Control1903433907; "Cartera Payables Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorList.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorList.PageExt.al new file mode 100644 index 00000000000..1e34ae3b3b7 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorList.PageExt.al @@ -0,0 +1,23 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Vendor; + +using Microsoft.Purchases.Payables; + +pageextension 7000173 "CRT Vendor List" extends "Vendor List" +{ + layout + { + addafter(VendorHistPayToFactBox) + { + part(Control1903433907; "Cartera Payables Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorStatistics.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorStatistics.PageExt.al new file mode 100644 index 00000000000..f15bdb110b8 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/Vendor/CRTVendorStatistics.PageExt.al @@ -0,0 +1,274 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Purchases.Vendor; + +using Microsoft.Purchases.Payables; + +pageextension 7000184 "CRT Vendor Statistics" extends "Vendor Statistics" +{ + layout + { + addlast(content) + { + group("Payable Docs.") + { + Caption = 'Payable Docs.'; + fixed(Control1903836701) + { + ShowCaption = false; + group("No. of Documents") + { + Caption = 'No. of Documents'; + field("NoOpen[1]"; NoOpen[1]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Documents'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoOpen[2]"; NoOpen[2]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Docs. in Payment Order'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoOpen[3]"; NoOpen[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Docs. in Posted Payment Order'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoHonored[3]"; NoHonored[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored Docs. in Posted Payment Order'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + } + } + group("Amount (LCY)") + { + Caption = 'Amount (LCY)'; + field("OpenAmtLCY[1]"; OpenAmtLCY[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(4); // Cartera + end; + } + field("OpenAmtLCY[2]"; OpenAmtLCY[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(3); // Payment Order + end; + } + field("OpenAmtLCY[3]"; OpenAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(1); // Posted Payment Order + end; + } + field("HonoredAmtLCY[3]"; HonoredAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(1); // Posted Payment Order + end; + } + } + group("Remaining Amt. (LCY)") + { + Caption = 'Remaining Amt. (LCY)'; + field("OpenRemainingAmtLCY[1]"; OpenRemainingAmtLCY[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(4); // Cartera + end; + } + field("OpenRemainingAmtLCY[2]"; OpenRemainingAmtLCY[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(3); // Payment Order + end; + } + field("OpenRemainingAmtLCY[3]"; OpenRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(1); // Posted Payment Order + end; + } + field("HonoredRemainingAmtLCY[3]"; HonoredRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(1); // Posted Payment Order + end; + } + } + } + } + } + } + + trigger OnAfterGetRecord() + begin + UpdateBillStatistics(); + end; + +#pragma warning disable AS0107 + var + NoOpen: array[3] of Integer; + NoHonored: array[3] of Integer; + OpenAmtLCY: array[3] of Decimal; + OpenRemainingAmtLCY: array[3] of Decimal; + HonoredAmtLCY: array[3] of Decimal; + HonoredRemainingAmtLCY: array[3] of Decimal; + DocumentSituationFilter: array[3] of Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; + j: Integer; +#pragma warning restore AS0107 + + [Scope('OnPrem')] + procedure UpdateBillStatistics() + var + VendLedgEntry: Record "Vendor Ledger Entry"; + begin + DocumentSituationFilter[1] := DocumentSituationFilter::Cartera; + DocumentSituationFilter[2] := DocumentSituationFilter::"BG/PO"; + DocumentSituationFilter[3] := DocumentSituationFilter::"Posted BG/PO"; + + VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); + VendLedgEntry.SetRange("Vendor No.", Rec."No."); + for j := 1 to 3 do begin + VendLedgEntry.SetRange("Document Situation", DocumentSituationFilter[j]); + VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Open); + VendLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + OpenAmtLCY[j] := VendLedgEntry."Amount (LCY) stats."; + OpenRemainingAmtLCY[j] := VendLedgEntry."Remaining Amount (LCY) stats."; + NoOpen[j] := VendLedgEntry.Count; + VendLedgEntry.SetRange("Document Status"); + + VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Honored); + VendLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + HonoredAmtLCY[j] := VendLedgEntry."Amount (LCY) stats."; + HonoredRemainingAmtLCY[j] := VendLedgEntry."Remaining Amount (LCY) stats."; + NoHonored[j] := VendLedgEntry.Count; + VendLedgEntry.SetRange("Document Status"); + + VendLedgEntry.SetRange("Document Situation"); + end; + end; + + [Scope('OnPrem')] + procedure DrillDownOpen(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents") + var + VendLedgEntry: Record "Vendor Ledger Entry"; + VendLedgEntriesForm: Page "Vendor Ledger Entries"; + begin + VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); + VendLedgEntry.SetRange("Vendor No.", Rec."No."); + case Situation of + Situation::Cartera: + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"Posted BG/PO"); + end; + VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Open); + VendLedgEntriesForm.SetTableView(VendLedgEntry); + VendLedgEntriesForm.SetRecord(VendLedgEntry); + VendLedgEntriesForm.RunModal(); + VendLedgEntry.SetRange("Document Status"); + VendLedgEntry.SetRange("Document Situation"); + end; + + [Scope('OnPrem')] + procedure DrillDownHonored(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents") + var + VendLedgEntry: Record "Vendor Ledger Entry"; + VendLedgEntriesForm: Page "Vendor Ledger Entries"; + begin + VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); + VendLedgEntry.SetRange("Vendor No.", Rec."No."); + case Situation of + Situation::Cartera: + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"Posted BG/PO"); + end; + + VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Honored); + VendLedgEntriesForm.SetTableView(VendLedgEntry); + VendLedgEntriesForm.SetRecord(VendLedgEntry); + VendLedgEntriesForm.RunModal(); + VendLedgEntry.SetRange("Document Status"); + VendLedgEntry.SetRange("Document Situation"); + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerCard.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerCard.PageExt.al new file mode 100644 index 00000000000..85aced2abac --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerCard.PageExt.al @@ -0,0 +1,30 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Customer; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +pageextension 7000180 "CRT Customer Card" extends "Customer Card" +{ + layout + { + addafter(CustomerStatisticsFactBox) + { + part(Control1903433807; "Cartera Receiv. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433607; "Cartera Fact. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerList.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerList.PageExt.al new file mode 100644 index 00000000000..b9b390abb0c --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerList.PageExt.al @@ -0,0 +1,30 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Customer; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +pageextension 7000179 "CRT Customer List" extends "Customer List" +{ + layout + { + addafter(CustomerDetailsFactBox) + { + part(Control1903433807; "Cartera Receiv. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433607; "Cartera Fact. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerPostingGroup.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerPostingGroup.TableExt.al new file mode 100644 index 00000000000..739ed70d7e3 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerPostingGroup.TableExt.al @@ -0,0 +1,114 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Customer; + +using Microsoft.Finance.GeneralLedger.Account; +using Microsoft.Finance.ReceivablesPayables; + +tableextension 7000002 "CRT Customer Posting Group" extends "Customer Posting Group" +{ + fields + { + field(7000000; "Bills Account"; Code[20]) + { + Caption = 'Bills Account'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000001; "Discted. Bills Acc."; Code[20]) + { + Caption = 'Discted. Bills Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000002; "Bills on Collection Acc."; Code[20]) + { + Caption = 'Bills on Collection Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000003; "Rejected Bills Acc."; Code[20]) + { + Caption = 'Rejected Bills Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000004; "Finance Income Acc."; Code[20]) + { + Caption = 'Finance Income Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000005; "Factoring for Collection Acc."; Code[20]) + { + Caption = 'Factoring for Collection Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000006; "Factoring for Discount Acc."; Code[20]) + { + Caption = 'Factoring for Discount Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + field(7000007; "Rejected Factoring Acc."; Code[20]) + { + Caption = 'Rejected Factoring Acc.'; + DataClassification = CustomerContent; + TableRelation = "G/L Account"; + } + } + + var + PostingSetupMgt: Codeunit PostingSetupManagement; + + procedure GetBillsAccount(Rejected: Boolean): Code[20] + begin + if Rejected then begin + TestField("Rejected Bills Acc."); + exit("Rejected Bills Acc."); + end; + TestField("Bills Account"); + exit("Bills Account"); + end; + + procedure GetBillsOnCollAccount(): Code[20] + begin + TestField("Bills on Collection Acc."); + exit("Bills on Collection Acc."); + end; + + procedure GetRejectedFactoringAcc(): Code[20] + begin + if "Rejected Factoring Acc." = '' then + PostingSetupMgt.LogCustPostingGroupFieldError(Rec, FieldNo("Rejected Factoring Acc.")); + + exit("Rejected Factoring Acc."); + end; + + procedure GetFactoringForDiscountAcc(): Code[20] + begin + if "Factoring for Discount Acc." = '' then + PostingSetupMgt.LogCustPostingGroupFieldError(Rec, FieldNo("Factoring for Discount Acc.")); + + exit("Factoring for Discount Acc."); + end; + + procedure GetFactoringForCollectionAcc(): Code[20] + begin + if "Factoring for Collection Acc." = '' then + PostingSetupMgt.LogCustPostingGroupFieldError(Rec, FieldNo("Factoring for Collection Acc.")); + + exit("Factoring for Collection Acc."); + end; + + procedure GetDiscountedBillsAcc(): Code[20] + begin + if "Discted. Bills Acc." = '' then + PostingSetupMgt.LogCustPostingGroupFieldError(Rec, FieldNo("Discted. Bills Acc.")); + + exit("Discted. Bills Acc."); + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerStatistics.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerStatistics.PageExt.al new file mode 100644 index 00000000000..6145ad9da8a --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Customer/CRTCustomerStatistics.PageExt.al @@ -0,0 +1,674 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Customer; + +using Microsoft.Sales.Receivables; + +pageextension 7000185 "CRT Customer Statistics" extends "Customer Statistics" +{ + layout + { + addlast(content) + { + group("Receivable Bills") + { + Caption = 'Receivable Bills'; + fixed(Control1903836701) + { + ShowCaption = false; + group("No. of Bills") + { + Caption = 'No. of Bills'; + field("NoOpen[1]"; NoOpen[1]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Bills'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoOpen[2]"; NoOpen[2]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Bills in Bill Gr.'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoOpen[3]"; NoOpen[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoHonored[3]"; NoHonored[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Hon. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + } + field("NoRejected[3]"; NoRejected[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Rej. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies rejected payments.'; + } + field("NoRedrawn[3]"; NoRedrawn[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Redr. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies recirculated payments.'; + } + field("NoHonored[4]"; NoHonored[4]) + { + ApplicationArea = Basic, Suite; + Caption = 'Hon. Closed Bills'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + } + field("NoRejected[4]"; NoRejected[4]) + { + ApplicationArea = Basic, Suite; + Caption = 'Rej. Closed Bills'; + Editable = false; + ToolTip = 'Specifies rejected payments.'; + } + } + group("Amount (LCY)") + { + Caption = 'Amount (LCY)'; + field("OpenAmtLCY[1]"; OpenAmtLCY[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Editable = false; + + trigger OnDrillDown() + begin + DrillDownOpen(4, 1); // Cartera + end; + } + field("OpenAmtLCY[2]"; OpenAmtLCY[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(3, 1); // Bill Group + end; + } + field("OpenAmtLCY[3]"; OpenAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(1, 1); // Posted Bill Group + end; + } + field("HonoredAmtLCY[3]"; HonoredAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(1, 1); // Posted Bill Group + end; + } + field("RejectedAmtLCY[3]"; RejectedAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + + trigger OnDrillDown() + begin + DrillDownRejected(1, 1); // Posted Bill Group + end; + } + field("RedrawnAmtLCY[3]"; RedrawnAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + + trigger OnDrillDown() + begin + DrillDownRedrawn(1, 1); // Posted Bill Group + end; + } + field("HonoredAmtLCY[4]"; HonoredAmtLCY[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(5, 1); // Closed Bills + end; + } + field("RejectedAmtLCY[4]"; RejectedAmtLCY[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + + trigger OnDrillDown() + begin + DrillDownRejected(5, 1); // Closed Bills + end; + } + } + group("Remaining Amt. (LCY)") + { + Caption = 'Remaining Amt. (LCY)'; + field("OpenRemainingAmtLCY[1]"; OpenRemainingAmtLCY[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(4, 1); // Cartera + end; + } + field("OpenRemainingAmtLCY[2]"; OpenRemainingAmtLCY[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(3, 1); // Bill Group; + end; + } + field("OpenRemainingAmtLCY[3]"; OpenRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(1, 1); // Posted Bill Group + end; + } + field("HonoredRemainingAmtLCY[3]"; HonoredRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(1, 1); // Posted Bill Group + end; + } + field("RejectedRemainingAmtLCY[3]"; RejectedRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + + trigger OnDrillDown() + begin + DrillDownRejected(1, 1); // Posted Bill Group + end; + } + field("RedrawnRemainingAmtLCY[3]"; RedrawnRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + + trigger OnDrillDown() + begin + DrillDownRedrawn(1, 1); // Posted Bill Group + end; + } + field("HonoredRemainingAmtLCY[4]"; HonoredRemainingAmtLCY[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(5, 1); // Closed Bills + end; + } + field("RejectedRemainingAmtLCY[4]"; RejectedRemainingAmtLCY[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + + trigger OnDrillDown() + begin + DrillDownRejected(5, 1); // Closed Bills + end; + } + } + } + } + group(Factoring) + { + Caption = 'Factoring'; + fixed(Control1903442601) + { + ShowCaption = false; + group("No. of Invoices") + { + Caption = 'No. of Invoices'; + field("NoOpen[5]"; NoOpen[5]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field("NoHonored[5]"; NoHonored[5]) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field("NoRejected[5]"; NoRejected[5]) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + group(Control1903422801) + { + Caption = 'Amount (LCY)'; + field("OpenAmtLCY[5]"; OpenAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = ''; + AutoFormatType = 1; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(0, 0); + end; + } + field("HonoredAmtLCY[5]"; HonoredAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(0, 0); + end; + } + field("RejectedAmtLCY[5]"; RejectedAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + + trigger OnDrillDown() + begin + DrillDownRejected(0, 0); + end; + } + } + group(Control1907816901) + { + Caption = 'Remaining Amt. (LCY)'; + field("OpenRemainingAmtLCY[5]"; OpenRemainingAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + + trigger OnDrillDown() + begin + DrillDownOpen(0, 0); + end; + } + field("HonoredRemainingAmtLCY[5]"; HonoredRemainingAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + + trigger OnDrillDown() + begin + DrillDownHonored(0, 0); + end; + } + field("RejectedRemainingAmtLCY[5]"; RejectedRemainingAmtLCY[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + + trigger OnDrillDown() + begin + DrillDownRejected(0, 0); + end; + } + } + } + } + } + } + + trigger OnAfterGetRecord() + begin + UpdateDocStatistics(); + end; + +#pragma warning disable AS0107 + var + DocumentSituationFilter: array[3] of Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; + NoOpen: array[5] of Integer; + NoHonored: array[5] of Integer; + NoRejected: array[5] of Integer; + NoRedrawn: array[5] of Integer; + OpenAmtLCY: array[5] of Decimal; + HonoredAmtLCY: array[5] of Decimal; + RejectedAmtLCY: array[5] of Decimal; + RedrawnAmtLCY: array[5] of Decimal; + OpenRemainingAmtLCY: array[5] of Decimal; + RejectedRemainingAmtLCY: array[5] of Decimal; + HonoredRemainingAmtLCY: array[5] of Decimal; + RedrawnRemainingAmtLCY: array[5] of Decimal; + j: Integer; +#pragma warning restore AS0107 + + [Scope('OnPrem')] + procedure UpdateDocStatistics() + var + CustLedgEntry: Record "Cust. Ledger Entry"; + begin + DocumentSituationFilter[1] := DocumentSituationFilter::Cartera; + DocumentSituationFilter[2] := DocumentSituationFilter::"BG/PO"; + DocumentSituationFilter[3] := DocumentSituationFilter::"Posted BG/PO"; + + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + for j := 1 to 5 do begin + case j of + 4: + // Closed Bill Group and Closed Documents + begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + end; + 5: + // Invoices + begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + else begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + CustLedgEntry.SetRange("Document Situation", DocumentSituationFilter[j]); + end; + end; + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + OpenAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + OpenRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoOpen[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + HonoredAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + HonoredRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoHonored[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + RejectedAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + RejectedRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoRejected[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Redrawn); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + RedrawnAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + RedrawnRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoRedrawn[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Situation"); + end; + end; + + [Scope('OnPrem')] + procedure DrillDownOpen(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; + + [Scope('OnPrem')] + procedure DrillDownHonored(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; + + [Scope('OnPrem')] + procedure DrillDownRejected(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; + + [Scope('OnPrem')] + procedure DrillDownRedrawn(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO", Situation::"Closed Documents": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Redrawn); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesCreditMemo.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesCreditMemo.PageExt.al new file mode 100644 index 00000000000..0794f3918db --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesCreditMemo.PageExt.al @@ -0,0 +1,38 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Document; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +pageextension 7000170 "CRT Sales Credit Memo" extends "Sales Credit Memo" +{ + layout + { + addafter("Applies-to Doc. No.") + { + field("Applies-to Bill No."; Rec."Applies-to Bill No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if you want to apply an open receivable bill with a credit memo from a customer.'; + } + } + addafter(Control1900316107) + { + part(Control1903433807; "Cartera Receiv. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bill-to Customer No."); + Visible = true; + } + part(Control1903433607; "Cartera Fact. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bill-to Customer No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesInvoice.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesInvoice.PageExt.al new file mode 100644 index 00000000000..e61cf8c9e31 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesInvoice.PageExt.al @@ -0,0 +1,30 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Document; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +pageextension 7000183 "CRT Sales Invoice" extends "Sales Invoice" +{ + layout + { + addafter(Control1900316107) + { + part(Control1903433807; "Cartera Receiv. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bill-to Customer No."); + Visible = true; + } + part(Control1903433607; "Cartera Fact. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bill-to Customer No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesOrder.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesOrder.PageExt.al new file mode 100644 index 00000000000..bac3eef46c1 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesOrder.PageExt.al @@ -0,0 +1,30 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Document; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +pageextension 7000182 "CRT Sales Order" extends "Sales Order" +{ + layout + { + addafter(SalesDocCheckFactbox) + { + part(Control1903433807; "Cartera Receiv. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Sell-to Customer No."); + Visible = true; + } + part(Control1903433607; "Cartera Fact. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Sell-to Customer No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesQuote.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesQuote.PageExt.al new file mode 100644 index 00000000000..b354842bf20 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesQuote.PageExt.al @@ -0,0 +1,30 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Document; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +pageextension 7000181 "CRT Sales Quote" extends "Sales Quote" +{ + layout + { + addfirst(Factboxes) + { + part(Control1903433807; "Cartera Receiv. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bill-to Customer No."); + Visible = true; + } + part(Control1903433607; "Cartera Fact. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bill-to Customer No."); + Visible = true; + } + } + } +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesReturnOrder.PageExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesReturnOrder.PageExt.al new file mode 100644 index 00000000000..ecf89289e17 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Document/CRTSalesReturnOrder.PageExt.al @@ -0,0 +1,30 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Document; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Sales.Receivables; + +pageextension 7000006 "CRT Sales Return Order" extends "Sales Return Order" +{ + layout + { + addafter(Control1900316107) + { + part(Control1903433807; "Cartera Receiv. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bill-to Customer No."); + Visible = true; + } + part(Control1903433607; "Cartera Fact. Statistics FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bill-to Customer No."); + Visible = true; + } + } + } +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesCrMemoHeader.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesCrMemoHeader.Codeunit.al new file mode 100644 index 00000000000..f9de0005671 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesCrMemoHeader.Codeunit.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Sales.Receivables; + +codeunit 7000103 "CRT Sales Cr. Memo Header" +{ + Access = Internal; + + [EventSubscriber(ObjectType::Table, Database::"Sales Cr.Memo Header", 'OnLookupAppliesToDocNoOnAfterSetFilters', '', false, false)] + local procedure OnLookupAppliesToDocNoOnAfterSetFilters(var CustLedgEntry: Record "Cust. Ledger Entry"; SalesCrMemoHeader: Record "Sales Cr.Memo Header") + begin + CustLedgEntry.SetRange("Bill No.", SalesCrMemoHeader."Applies-to Bill No."); + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesCrMemoHeader.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesCrMemoHeader.TableExt.al new file mode 100644 index 00000000000..2355864adea --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesCrMemoHeader.TableExt.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +tableextension 7000098 "CRT Sales Cr.Memo Header" extends "Sales Cr.Memo Header" +{ + fields + { + field(7000000; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesInvoiceHeader.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesInvoiceHeader.Codeunit.al new file mode 100644 index 00000000000..44a88af34bb --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesInvoiceHeader.Codeunit.al @@ -0,0 +1,19 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Sales.Receivables; + +codeunit 7000104 "CRT Sales Invoice Header" +{ + Access = Internal; + + [EventSubscriber(ObjectType::Table, Database::"Sales Invoice Header", 'OnLookupAppliesToDocNoOnAfterSetFilters', '', false, false)] + local procedure OnLookupAppliesToDocNoOnAfterSetFilters(var CustLedgEntry: Record "Cust. Ledger Entry"; SalesInvoiceHeader: Record "Sales Invoice Header") + begin + CustLedgEntry.SetRange("Bill No.", SalesInvoiceHeader."Applies-to Bill No."); + end; + +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesInvoiceHeader.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesInvoiceHeader.TableExt.al new file mode 100644 index 00000000000..759a829c064 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesInvoiceHeader.TableExt.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +tableextension 7000097 "CRT Sales Invoice Header" extends "Sales Invoice Header" +{ + fields + { + field(7000000; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesShipmentHeader.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesShipmentHeader.Codeunit.al new file mode 100644 index 00000000000..64c17af26bf --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesShipmentHeader.Codeunit.al @@ -0,0 +1,19 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Sales.Receivables; + +codeunit 7000105 "CRT Sales Shipment Header" +{ + Access = Internal; + + [EventSubscriber(ObjectType::Table, Database::"Sales Shipment Header", 'OnLookupAppliesToDocNoOnAfterSetFilters', '', false, false)] + local procedure OnLookupAppliesToDocNoOnAfterSetFilters(var CustLedgEntry: Record "Cust. Ledger Entry"; SalesShipmentHeader: Record "Sales Shipment Header") + begin + CustLedgEntry.SetRange("Bill No.", SalesShipmentHeader."Applies-to Bill No."); + end; + +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesShipmentHeader.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesShipmentHeader.TableExt.al new file mode 100644 index 00000000000..5cc931014c5 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/CRTSalesShipmentHeader.TableExt.al @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +tableextension 7000099 "CRT Sales Shipment Header" extends "Sales Shipment Header" +{ + fields + { + field(7000000; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + } +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostBGAnalysisLCYFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostBGAnalysisLCYFactBox.Page.al new file mode 100644 index 00000000000..2781e6831fe --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostBGAnalysisLCYFactBox.Page.al @@ -0,0 +1,174 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; + +page 35292 "Post. BG Analysis LCY Fact Box" +{ + Caption = 'Post. BG Analysis LCY Fact Box'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SourceTable = "Posted Bill Group"; + + layout + { + area(content) + { + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the posted bill group.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount in this posted bill group.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; + } + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoOpen; NoOpen) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + group("Amount (LCY)") + { + Caption = 'Amount (LCY)'; + field(OpenAmtLCY; OpenAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmtLCY; HonoredAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(RejectedAmtLCY; RejectedAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmtLCY; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + PostedDoc: Record "Posted Cartera Doc."; + OpenAmt: Decimal; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + OpenAmtLCY: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoOpen: Integer; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); + PostedDoc.SetRange(Type, PostedDoc.Type::Receivable); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); + Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + OpenAmt := PostedDoc."Amount for Collection"; + OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoOpen := PostedDoc.Count; + + PostedDoc.SetRange(Status); + PostedDoc.SetRange(Redrawn, true); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := PostedDoc."Amount for Collection"; + RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRedrawn := PostedDoc.Count; + PostedDoc.SetRange(Redrawn); + + PostedDoc.SetRange(Status, PostedDoc.Status::Honored); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; + HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; + NoHonored := PostedDoc.Count - NoRedrawn; + + PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RejectedAmt := PostedDoc."Amount for Collection"; + RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRejected := PostedDoc.Count; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostBGAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostBGAnalysisNonLCYFB.Page.al new file mode 100644 index 00000000000..c489bc7c4c5 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostBGAnalysisNonLCYFB.Page.al @@ -0,0 +1,174 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; + +page 35293 "Post. BG Analysis Non LCY FB" +{ + Caption = 'Post. BG Analysis Non LCY FB'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SourceTable = "Posted Bill Group"; + + layout + { + area(content) + { + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the posted bill group.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount in this posted bill group.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; + } + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoOpen; NoOpen) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + group(Amount) + { + Caption = 'Amount'; + field(OpenAmt; OpenAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmt; HonoredAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(RejectedAmt; RejectedAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmt; RedrawnAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + PostedDoc: Record "Posted Cartera Doc."; + OpenAmt: Decimal; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + OpenAmtLCY: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoOpen: Integer; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); + PostedDoc.SetRange(Type, PostedDoc.Type::Receivable); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); + Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + OpenAmt := PostedDoc."Amount for Collection"; + OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoOpen := PostedDoc.Count; + + PostedDoc.SetRange(Status); + PostedDoc.SetRange(Redrawn, true); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := PostedDoc."Amount for Collection"; + RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRedrawn := PostedDoc.Count; + PostedDoc.SetRange(Redrawn); + + PostedDoc.SetRange(Status, PostedDoc.Status::Honored); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; + HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; + NoHonored := PostedDoc.Count - NoRedrawn; + + PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RejectedAmt := PostedDoc."Amount for Collection"; + RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRejected := PostedDoc.Count; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGrMaturityLines.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGrMaturityLines.Page.al new file mode 100644 index 00000000000..f4633bf6253 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGrMaturityLines.Page.al @@ -0,0 +1,139 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Enums; +using Microsoft.Foundation.Period; +using System.Utilities; + +page 7000034 "Posted Bill Gr. Maturity Lines" +{ + Caption = 'Lines'; + PageType = ListPart; + SourceTable = Date; + + layout + { + area(content) + { + repeater(Control1) + { + Editable = false; + ShowCaption = false; + field("Period Start"; Rec."Period Start") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the starting date of the period that you want to view.'; + } + field("Period Name"; Rec."Period Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the period shown on the line.'; + } + field(DocAmount; DocAmount) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = PostedBillGr."Currency Code"; + AutoFormatType = 1; + Caption = 'Amount'; + DrillDown = true; + ToolTip = 'Specifies the amount for the posted bill group for the period.'; + + trigger OnDrillDown() + begin + ShowDocEntries(); + end; + } + field(DocAmountLCY; DocAmountLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount (LCY)'; + DrillDown = true; + ToolTip = 'Specifies the amount for the posted bill group for the period.'; + + trigger OnDrillDown() + begin + ShowDocEntries(); + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + SetDateFilter(); + if PostedBillGr."No." <> '' then begin + PostedBillGr.CalcFields("Amount Grouped", "Amount Grouped (LCY)"); + DocAmount := PostedBillGr."Amount Grouped"; + DocAmountLCY := PostedBillGr."Amount Grouped (LCY)"; + end else begin + DocAmount := 0; + DocAmountLCY := 0; + end; + end; + + trigger OnFindRecord(Which: Text): Boolean + begin + exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); + end; + + trigger OnNextRecord(Steps: Integer): Integer + begin + exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); + end; + + trigger OnOpenPage() + begin + Rec.Reset(); + end; + + var + PostedBillGr: Record "Posted Bill Group"; + PostedDoc: Record "Posted Cartera Doc."; + PeriodPageManagement: Codeunit PeriodPageManagement; + PeriodLength: Enum "Analysis Period Type"; + AmountType: Enum "Analysis Amount Type"; + DocAmount: Decimal; + DocAmountLCY: Decimal; + + [Scope('OnPrem')] + procedure Set(var NewPostedBillGr: Record "Posted Bill Group"; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") + begin + PostedBillGr.Copy(NewPostedBillGr); + PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); + AmountType := "Analysis Amount Type".FromInteger(NewAmountType); + CurrPage.Update(false); + end; + + [Scope('OnPrem')] + procedure SetDateFilter() + begin + if AmountType = AmountType::"Net Change" then + PostedBillGr.SetRange("Due Date Filter", Rec."Period Start", Rec."Period End") + else + PostedBillGr.SetRange("Due Date Filter", 0D, Rec."Period End"); + end; + + local procedure ShowDocEntries() + begin + SetDateFilter(); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", PostedBillGr."No."); + PostedDoc.SetRange("Collection Agent", PostedDoc."Collection Agent"::Bank); + PostedDoc.SetFilter("Due Date", PostedBillGr.GetFilter("Due Date Filter")); + PostedDoc.SetFilter("Global Dimension 1 Code", PostedBillGr.GetFilter("Global Dimension 1 Filter")); + PostedDoc.SetFilter("Global Dimension 2 Code", PostedBillGr.GetFilter("Global Dimension 2 Filter")); + PostedDoc.SetFilter("Category Code", PostedBillGr.GetFilter("Category Filter")); + PAGE.RunModal(0, PostedDoc); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroup.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroup.Table.al new file mode 100644 index 00000000000..353973e7f95 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroup.Table.al @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +table 7000006 "Posted Bill Group" +{ + Caption = 'Posted Bill Group'; + DrillDownPageID = "Posted Bill Groups List"; + LookupPageID = "Posted Bill Groups List"; + DataClassification = CustomerContent; + + fields + { + field(2; "No."; Code[20]) + { + Caption = 'No.'; + } + field(3; "Bank Account No."; Code[20]) + { + Caption = 'Bank Account No.'; + TableRelation = "Bank Account"; + } + field(4; "Bank Account Name"; Text[100]) + { + CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); + Caption = 'Bank Account Name'; + Editable = false; + FieldClass = FlowField; + } + field(5; "Posting Description"; Text[100]) + { + Caption = 'Posting Description'; + } + field(6; "Dealing Type"; Enum "Cartera Dealing Type") + { + Caption = 'Dealing Type'; + Editable = false; + } + field(7; Amount; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable))); + Caption = 'Amount'; + Editable = false; + FieldClass = FlowField; + } + field(8; "Reason Code"; Code[10]) + { + Caption = 'Reason Code'; + TableRelation = "Reason Code"; + } + field(9; "No. Printed"; Integer) + { + Caption = 'No. Printed'; + } + field(10; "Posting Date"; Date) + { + Caption = 'Posting Date'; + } + field(11; Comment; Boolean) + { + CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), + Type = filter(Receivable))); + Caption = 'Comment'; + Editable = false; + FieldClass = FlowField; + } + field(12; "Category Filter"; Code[10]) + { + Caption = 'Category Filter'; + FieldClass = FlowFilter; + TableRelation = "Category Code"; + ValidateTableRelation = false; + } + field(13; "Due Date Filter"; Date) + { + Caption = 'Due Date Filter'; + FieldClass = FlowFilter; + } + field(14; "Global Dimension 1 Filter"; Code[20]) + { + CaptionClass = '1,3,1'; + Caption = 'Global Dimension 1 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(15; "Global Dimension 2 Filter"; Code[20]) + { + CaptionClass = '1,3,2'; + Caption = 'Global Dimension 2 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(16; "Amount Grouped"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable))); + Caption = 'Amount Grouped'; + Editable = false; + FieldClass = FlowField; + } + field(17; "Remaining Amount"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable))); + Caption = 'Remaining Amount'; + Editable = false; + FieldClass = FlowField; + } + field(18; "Status Filter"; Enum "Cartera Document Status") + { + Caption = 'Status Filter'; + FieldClass = FlowFilter; + } + field(29; "Collection Expenses Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Collection Expenses Amt.'; + } + field(30; "Discount Expenses Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Discount Expenses Amt.'; + } + field(31; "Discount Interests Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Discount Interests Amt.'; + } + field(32; "Rejection Expenses Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejection Expenses Amt.'; + } + field(33; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + Editable = false; + TableRelation = Currency; + } + field(34; "Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable))); + Caption = 'Amount (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(35; "Amount Grouped (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Amt. for Collection (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable))); + Caption = 'Amount Grouped (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(36; "Remaining Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable))); + Caption = 'Remaining Amount (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(37; "Risked Factoring Exp. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Risked Factoring Exp. Amt.'; + } + field(38; "Unrisked Factoring Exp. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Unrisked Factoring Exp. Amt.'; + } + field(39; Factoring; Option) + { + Caption = 'Factoring'; + Editable = false; + OptionCaption = ' ,Unrisked,Risked'; + OptionMembers = " ",Unrisked,Risked; + } + field(1200; "Partner Type"; Option) + { + Caption = 'Partner Type'; + OptionCaption = ' ,Company,Person'; + OptionMembers = " ",Company,Person; + } + } + + keys + { + key(Key1; "No.") + { + Clustered = true; + } + key(Key2; "Bank Account No.", "Posting Date") + { + SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; + } + key(Key3; "Bank Account No.", "Posting Date", "Currency Code") + { + SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; + } + key(Key4; "Bank Account No.", "Posting Date", Factoring) + { + SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; + } + } + + fieldgroups + { + } + + var + Text1100000: Label 'untitled'; + + procedure Caption(): Text + begin + if "No." = '' then + exit(Text1100000); + CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupListing.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupListing.Report.al new file mode 100644 index 00000000000..91e38ef35d4 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupListing.Report.al @@ -0,0 +1,451 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.Utilities; + +report 7000001 "Posted Bill Group Listing" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Sales/History/PostedBillGroupListing.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Group Listing'; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(PostedBillGr; "Posted Bill Group") + { + DataItemTableView = sorting("No."); + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + column(PostedBillGr_No_; "No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(Operation; Operation) + { + } + column(PostedBillGr__No__; PostedBillGr."No.") + { + } + column(STRSUBSTNO_Text1100003_CopyText_; StrSubstNo(Text1100003, CopyText)) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") + { + } + column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") + { + } + column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") + { + } + column(FORMAT_PostedBillGr__Posting_Date__; Format(PostedBillGr."Posting Date")) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(PostedBillGr__Currency_Code_; PostedBillGr."Currency Code") + { + } + column(FactoringType; FactoringType) + { + } + column(OutputNo; OutputNo) + { + } + column(PrintAmountsInLCY; PrintAmountsInLCY) + { + } + column(PageLoop_Number; Number) + { + } + column(PostedBillGr__No__Caption; PostedBillGr__No__CaptionLbl) + { + } + column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) + { + } + column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) + { + } + column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) + { + } + column(PostedBillGr__Posting_Date_Caption; PostedBillGr__Posting_Date_CaptionLbl) + { + } + column(PostedBillGr__Currency_Code_Caption; PostedBillGr__Currency_Code_CaptionLbl) + { + } + column(PageCaption; PageCaptionLbl) + { + } + dataitem(PostedDoc; "Posted Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = PostedBillGr; + DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where("Collection Agent" = const(Bank), Type = const(Receivable)); + column(AmtForCollection; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmtForCollection_Control32; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Customer_City; Customer.City) + { + } + column(Customer_County; Customer.County) + { + } + column(Customer__Post_Code_; Customer."Post Code") + { + } + column(Customer_Name; Customer.Name) + { + } + column(PostedDoc__Account_No__; "Account No.") + { + } + column(PostedDoc__Honored_Rejtd__at_Date_; "Honored/Rejtd. at Date") + { + } + column(PostedDoc_Status; Status) + { + } + column(PostedDoc__Document_No__; "Document No.") + { + } + column(PostedDoc__Document_Type_; "Document Type") + { + } + column(FORMAT__Due_Date__; Format("Due Date")) + { + } + column(PostedDoc__Document_Type_____PostedDoc__Document_Type___Bill; "Document Type" <> "Document Type"::Bill) + { + } + column(Customer_Name_Control28; Customer.Name) + { + } + column(Customer_City_Control30; Customer.City) + { + } + column(AmtForCollection_Control31; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Customer_County_Control35; Customer.County) + { + } + column(PostedDoc__Document_No___Control3; "Document No.") + { + } + column(PostedDoc__No__; "No.") + { + } + column(Customer__Post_Code__Control9; Customer."Post Code") + { + } + column(PostedDoc_Status_Control78; Status) + { + } + column(PostedDoc__Honored_Rejtd__at_Date__Control80; "Honored/Rejtd. at Date") + { + } + column(FORMAT__Due_Date___Control8; Format("Due Date")) + { + } + column(PostedDoc__Account_No___Control1; "Account No.") + { + } + column(PostedDoc__Document_Type__Control23; "Document Type") + { + } + column(PostedDoc__Document_Type____PostedDoc__Document_Type___Bill; "Document Type" = "Document Type"::Bill) + { + } + column(AmtForCollection_Control36; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(AmtForCollection_Control39; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(PostedDoc_Type; Type) + { + } + column(PostedDoc_Entry_No_; "Entry No.") + { + } + column(PostedDoc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") + { + } + column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) + { + } + column(Document_No_Caption; Document_No_CaptionLbl) + { + } + column(Bill_No_Caption; Bill_No_CaptionLbl) + { + } + column(Customer_Name_Control28Caption; Customer_Name_Control28CaptionLbl) + { + } + column(Customer__Post_Code__Control9Caption; Customer__Post_Code__Control9CaptionLbl) + { + } + column(Customer_City_Control30Caption; Customer_City_Control30CaptionLbl) + { + } + column(AmtForCollection_Control31Caption; AmtForCollection_Control31CaptionLbl) + { + } + column(Customer_County_Control35Caption; Customer_County_Control35CaptionLbl) + { + } + column(PostedDoc_Status_Control78Caption; FieldCaption(Status)) + { + } + column(PostedDoc__Honored_Rejtd__at_Date__Control80Caption; FieldCaption("Honored/Rejtd. at Date")) + { + } + column(PostedDoc__Due_Date__Control8Caption; PostedDoc__Due_Date__Control8CaptionLbl) + { + } + column(Customer_No_Caption; Customer_No_CaptionLbl) + { + } + column(PostedDoc__Document_Type__Control23Caption; FieldCaption("Document Type")) + { + } + column(ContinuedCaption; ContinuedCaptionLbl) + { + } + column(EmptyStringCaption; EmptyStringCaptionLbl) + { + } + column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + Customer.Get("Account No."); + if PrintAmountsInLCY then + AmtForCollection := "Amt. for Collection (LCY)" + else + AmtForCollection := "Amount for Collection"; + end; + + trigger OnPreDataItem() + begin + Clear(AmtForCollection); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then + CopyText := Text1100002; + OutputNo := OutputNo + 1; + end; + + trigger OnPreDataItem() + begin + NoOfLoops := Abs(NoOfCopies) + 1; + CopyText := ''; + SetRange(Number, 1, NoOfLoops); + OutputNo := 1; + end; + } + + trigger OnAfterGetRecord() + begin + if "Dealing Type" = "Dealing Type"::Discount then + Operation := Text1100000 + else + Operation := Text1100001; + FactoringType := GetFactoringType(); + + BankAcc.Get(PostedBillGr."Bank Account No."); + FormatAddress.FormatAddr( + BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", + BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); + + if not CurrReport.Preview then + PrintCounter.PrintCounter(DATABASE::"Posted Bill Group", "No."); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + FormatAddress.Company(CompanyAddr, CompanyInfo); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Copies'; + ToolTip = 'Specifies how many copies of the document to print.'; + } + field(PrintAmountsInLCY; PrintAmountsInLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show amounts in LCY'; + ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + Text1100000: Label 'For Discount'; + Text1100001: Label 'For Collection'; + Text1100002: Label 'COPY'; + Text1100003: Label 'Bill Group %1'; + Text1100005: Label 'Risked Factoring'; + Text1100006: Label 'Unrisked Factoring'; + CompanyInfo: Record "Company Information"; + BankAcc: Record "Bank Account"; + Customer: Record Customer; + FormatAddress: Codeunit "Format Address"; + PrintCounter: Codeunit "BG/PO-Post and Print"; + BankAccAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + Operation: Text[80]; + NoOfLoops: Integer; + NoOfCopies: Integer; + CopyText: Text[30]; + PrintAmountsInLCY: Boolean; + AmtForCollection: Decimal; + FactoringType: Text[30]; + OutputNo: Integer; + PostedBillGr__No__CaptionLbl: Label 'Bill Group No.'; + CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; + CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; + CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; + PostedBillGr__Posting_Date_CaptionLbl: Label 'Date'; + PostedBillGr__Currency_Code_CaptionLbl: Label 'Currency Code'; + PageCaptionLbl: Label 'Page'; + All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; + Document_No_CaptionLbl: Label 'Document No.'; + Bill_No_CaptionLbl: Label 'Bill No.'; + Customer_Name_Control28CaptionLbl: Label 'Name'; + Customer__Post_Code__Control9CaptionLbl: Label 'Post Code'; + Customer_City_Control30CaptionLbl: Label 'City /'; + AmtForCollection_Control31CaptionLbl: Label 'Amount for Collection'; + Customer_County_Control35CaptionLbl: Label 'County'; + PostedDoc__Due_Date__Control8CaptionLbl: Label 'Due Date'; + Customer_No_CaptionLbl: Label 'Customer No.'; + ContinuedCaptionLbl: Label 'Continued'; + EmptyStringCaptionLbl: Label '/', Locked = true; + ContinuedCaption_Control15Lbl: Label 'Continued'; + TotalCaptionLbl: Label 'Total'; + + [Scope('OnPrem')] + procedure GetCurrencyCode(): Code[10] + begin + if PrintAmountsInLCY then + exit(''); + + exit(PostedDoc."Currency Code"); + end; + + [Scope('OnPrem')] + procedure GetFactoringType(): Text[30] + begin + if PostedBillGr.Factoring <> PostedBillGr.Factoring::" " then begin + if PostedBillGr.Factoring = PostedBillGr.Factoring::Risked then + exit(Text1100005); + + exit(Text1100006); + end; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupListing.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupListing.rdlc new file mode 100644 index 00000000000..766c5e4a85e --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupListing.rdlc @@ -0,0 +1,2467 @@ + + + 0 + + + + SQL + + + None + e156e4d9-9087-484d-852d-bcd8584dbff5 + + + + + + + + + + + 18.70741cm + + + + + 12.47892cm + + + + + + + + + + 1.7cm + + + 1.4cm + + + 1.3cm + + + 0.9cm + + + 0.45cm + + + 1.9cm + + + 1.55cm + + + 3.3cm + + + 1.5cm + + + 2.7cm + + + 2cm + + + + + 0.423cm + + + + + true + + + + + =First(Fields!All_amounts_are_in_LCYCaption.Value) + + + + + + All_amounts_are_in_LCYCaption_1 + 45 + + + 7 + + + + + + + + + + + + true + + + + + + + + + + + textbox13 + 44 + + + 4 + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!PostedDoc__Due_Date__Control8Caption.Value) + + + + + + + 43 + + + + + + + + true + + + + + =First(Fields!PostedDoc__Document_Type__Control23Caption.Value) + + + + + + 42 + + + + + + + + true + + + + + =First(Fields!Document_No_Caption.Value) + + + + + + + 41 + + + + + + + + true + + + + + =First(Fields!Bill_No_Caption.Value) + + + + + + + 40 + + + + + + + + true + + + + + =First(Fields!PostedDoc_Status_Control78Caption.Value) + + + + + + 39 + + + + + + + + true + + + + + =First(Fields!PostedDoc__Honored_Rejtd__at_Date__Control80Caption.Value) + + + + + + + 38 + + + + + + + + true + + + + + =First(Fields!Customer_No_Caption.Value) + + + + + + + 37 + + + + + + + + true + + + + + =First(Fields!Customer_Name_Control28Caption.Value) + + + + + + 36 + + + + + + + + true + + + + + =First(Fields!Customer__Post_Code__Control9Caption.Value) + + + + + + 35 + + + + + + + + true + + + + + =First(Fields!Customer_City_Control30Caption.Value)+ Chr(10) + First(Fields!Customer_County_Control35Caption.Value) + + + + + + 34 + + + + + + + + true + + + + + =First(Fields!AmtForCollection_Control31Caption.Value) + + + + + + + 33 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + + textbox3 + 32 + + + 11 + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!FORMAT__Due_Date__.Value + + + + + + 31 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_Type_.Value + + + + + + 30 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_No__.Value + + + + + + + 29 + + + 2 + + + + + + + true + + + + + =Fields!PostedDoc_Status.Value + + + + + + 27 + + + + + + + + true + + + + + =Fields!PostedDoc__Honored_Rejtd__at_Date_.Value + + + + + + 26 + + + + + + + + true + + + + + =Fields!PostedDoc__Account_No__.Value + + + + + + + 25 + + + + + + + + true + + + + + =Fields!Customer_Name.Value + + + + + + 24 + + + + + + + + true + + + + + =Fields!Customer__Post_Code_.Value + + + + + + + 23 + + + + + + + + true + + + + + =Fields!Customer_City.Value + + + + + + 22 + + + + + + + + true + + + + + =Fields!AmtForCollection.Value + + + + + + 21 + + + + + + + + 0.423cm + + + + + true + + + + + + + + 9 + + + + + + + + + + + + + + true + + + + + =Fields!Customer_County.Value + + + + + + 19 + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!FORMAT__Due_Date__.Value + + + + + + 17 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_Type_.Value + + + + + + 16 + + + + + + + + true + + + + + =Fields!PostedDoc__Document_No__.Value + + + + + + + 15 + + + + + + + + true + + + + + =Fields!EmptyStringCaption.Value + Fields!PostedDoc__No__.Value + + + + + + + 14 + + + + + + + + true + + + + + =Fields!PostedDoc_Status.Value + + + + + + 13 + + + + + + + + true + + + + + =Fields!PostedDoc__Honored_Rejtd__at_Date_.Value + + + + + + 12 + + + + + + + + true + + + + + =Fields!PostedDoc__Account_No__.Value + + + + + + + 11 + + + + + + + + true + + + + + =Fields!Customer_Name.Value + + + + + + 10 + + + + + + + + true + + + + + =Fields!Customer__Post_Code_.Value + + + + + + + 9 + + + + + + + + true + + + + + =Fields!Customer_City.Value + + + + + + 8 + + + + + + + + true + + + + + =Fields!AmtForCollection.Value + + + + + + 7 + + + + + + + + 0.423cm + + + + + true + + + + + + + + 9 + + + + + + + + + + + + + + true + + + + + =Fields!Customer_County.Value + + + + + + 1 + + + + + + + + true + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox2 + 3 + + + 11 + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!TotalCaption.Value) + + + + + + 6 + + + 4 + + + + + + + + + true + + + + + + + + 6 + + + + + + + + + + + true + + + + + =Sum(Fields!AmtForCollection.Value) + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + =IIF(Fields!PrintAmountsInLCY.Value,False,True) + + After + true + true + + + After + true + true + + + After + true + true + + + + Detail + + + + + =IIF(Fields!PostedDoc__Document_Type_____PostedDoc__Document_Type___Bill.Value,FALSE,TRUE) + + + + + =IIF(Fields!PostedDoc__Document_Type_____PostedDoc__Document_Type___Bill.Value,FALSE,TRUE) + + + + + =IIF(Fields!PostedDoc__Document_Type____PostedDoc__Document_Type___Bill.Value,FALSE,TRUE) + + + + + =IIF(Fields!PostedDoc__Document_Type____PostedDoc__Document_Type___Bill.Value,FALSE,TRUE) + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + + DataSet_Result + 8.037cm + 1.66556in + 29 + + + true + + + + + =First(Fields!BankAccAddr_1_.Value) + + + + + + 1.269cm + 0.423cm + 4.5cm + 28 + + + + true + + + + + =First(Fields!CompanyAddr_2_.Value) + + + + + + 1.692cm + 12cm + 0.423cm + 6.3cm + 27 + + + + true + + + + + =First(Fields!CompanyAddr_3_.Value) + + + + + + 2.115cm + 12cm + 0.423cm + 6.3cm + 26 + + + + true + + + + + =First(Fields!CompanyAddr_4_.Value) + + + + + + 2.538cm + 12cm + 0.423cm + 6.3cm + 25 + + + + true + + + + + =First(Fields!CompanyAddr_5_.Value) + + + + + + 2.961cm + 12cm + 0.423cm + 6.3cm + 24 + + + + true + + + + + =First(Fields!CompanyAddr_6_.Value) + + + + + + 3.384cm + 12cm + 0.423cm + 6.3cm + 23 + + + + true + + + + + =First(Fields!CompanyInfo__Phone_No__.Value) + + + + + + 3.807cm + 14.1cm + 0.423cm + 4.2cm + 22 + + + + true + + + + + =First(Fields!CompanyInfo__Fax_No__.Value) + + + + + + 4.23cm + 14.1cm + 0.423cm + 4.2cm + 21 + + + + true + + + + + =First(Fields!CompanyInfo__VAT_Registration_No__.Value) + + + + + + 4.653cm + 14.1cm + 0.423cm + 4.2cm + 20 + + + + true + + + + + =First(Fields!CompanyInfo__Phone_No__Caption.Value) + + + + + + 3.807cm + 12cm + 0.423cm + 1.89cm + 19 + + + + true + + + + + =First(Fields!CompanyInfo__Fax_No__Caption.Value) + + + + + + 4.23cm + 12cm + 0.423cm + 1.89cm + 18 + + + + true + + + + + =First(Fields!CompanyInfo__VAT_Registration_No__Caption.Value) + + + + + + 4.653cm + 12cm + 0.423cm + 1.89cm + 17 + + + + true + + + + + =First(Fields!STRSUBSTNO_Text1100003_CopyText_.Value) + + + + + + 12cm + 0.423cm + 6.3cm + 16 + + + + true + + + + + =First(Fields!CompanyAddr_1_.Value) + + + + + + 1.269cm + 12cm + 0.423cm + 6.3cm + 14 + + + + true + + + + + =First(Fields!BankAccAddr_4_.Value) + + + + + + 2.538cm + 0.423cm + 4.5cm + 13 + + + + true + + + + + =First(Fields!BankAccAddr_5_.Value) + + + + + + 2.961cm + 0.423cm + 4.5cm + 12 + + + + true + + + + + =First(Fields!BankAccAddr_6_.Value) + + + + + + 3.384cm + 0.423cm + 4.5cm + 11 + + + + true + + + + + =First(Fields!BankAccAddr_7_.Value) + + + + + + 3.807cm + 0.423cm + 4.5cm + 10 + + + + true + + + + + =First(Fields!BankAccAddr_3_.Value) + + + + + + 2.115cm + 0.423cm + 4.5cm + 9 + + + + true + + + + + =First(Fields!BankAccAddr_2_.Value) + + + + + + 1.692cm + 0.423cm + 4.5cm + 8 + + + + true + + + + + =First(Fields!PostedBillGr__No__Caption.Value) + + + + + + 5.499cm + 12cm + 0.423cm + 3cm + 7 + + + + true + + + + + =First(Fields!FORMAT_PostedBillGr__Posting_Date__.Value) + + + + + + 7.191cm + 15.7cm + 0.423cm + 1.68cm + 6 + + + + true + + + + + =First(Fields!PostedBillGr__Currency_Code_.Value) + + + + + + 5.922cm + 15.15cm + 0.423cm + 2.7cm + 5 + + + + true + + + + + =First(Fields!Operation.Value) + + + + + + 6.345cm + 12cm + 0.423cm + 5.85cm + 4 + + + + true + + + + + =First(Fields!FactoringType.Value) + + + + + + 6.768cm + 12cm + 0.423cm + 5.85cm + 3 + + + + true + + + + + =First(Fields!PostedBillGr__No__.Value) + + + + + + 5.499cm + 15.15cm + 0.423cm + 2.7cm + 2 + + + + true + + + + + =First(Fields!PostedBillGr__Posting_Date_Caption.Value) + + + + + + 7.191cm + 12cm + 0.423cm + 3.15cm + 1 + + + + true + + + + + =First(Fields!PostedBillGr__Currency_Code_Caption.Value) + + + + + + 5.922cm + 12cm + 0.423cm + 3cm + + + + true + + + + + + + + + + + + + + + + + + =Fields!PostedBillGr_No_.Value + =Fields!OutputNo.Value + + + Between + + + Output + true + + + + DataSet_Result + + End + + + + 12.47892cm + + 18.70741cm + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + + +Shared offset as Integer +Shared newPage as Object +Shared currentgroup1 as Object +Shared currentgroup2 as Object +Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object + If NewPage + offset = pagenumber - 1 + End If + Return pagenumber - offset +End Function + +Public Function IsNewPage(group1 as Object, group2 as Object) As Boolean +newPage = FALSE +If Not (group1 = currentgroup1) + newPage = TRUE + currentgroup1 = group1 + currentgroup2 = group2 + ELSE + If Not (group2 = currentgroup2) + newPage = TRUE + currentgroup2 = group2 + End If + End If + Return newPage +End Function + + =User!Language + true + Invalid + d4faa554-37b8-43e7-aff0-5bd9636af7be + + + + + PostedBillGr_No_ + + + Operation + + + PostedBillGr__No__ + + + STRSUBSTNO_Text1100003_CopyText_ + + + CompanyAddr_1_ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyInfo__Phone_No__ + + + CompanyInfo__Fax_No__ + + + CompanyInfo__VAT_Registration_No__ + + + FORMAT_PostedBillGr__Posting_Date__ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + BankAccAddr_3_ + + + BankAccAddr_2_ + + + BankAccAddr_1_ + + + PostedBillGr__Currency_Code_ + + + FactoringType + + + OutputNo + + + PrintAmountsInLCY + + + PageLoop_Number + + + PostedBillGr__No__Caption + + + CompanyInfo__Phone_No__Caption + + + CompanyInfo__Fax_No__Caption + + + CompanyInfo__VAT_Registration_No__Caption + + + PostedBillGr__Posting_Date_Caption + + + PostedBillGr__Currency_Code_Caption + + + PageCaption + + + AmtForCollection + + + AmtForCollectionFormat + + + AmtForCollection_Control32 + + + AmtForCollection_Control32Format + + + Customer_City + + + Customer_County + + + Customer__Post_Code_ + + + Customer_Name + + + PostedDoc__Account_No__ + + + PostedDoc__Honored_Rejtd__at_Date_ + + + PostedDoc_Status + + + PostedDoc__Document_No__ + + + PostedDoc__Document_Type_ + + + FORMAT__Due_Date__ + + + PostedDoc__Document_Type_____PostedDoc__Document_Type___Bill + + + Customer_Name_Control28 + + + Customer_City_Control30 + + + AmtForCollection_Control31 + + + AmtForCollection_Control31Format + + + Customer_County_Control35 + + + PostedDoc__Document_No___Control3 + + + PostedDoc__No__ + + + Customer__Post_Code__Control9 + + + PostedDoc_Status_Control78 + + + PostedDoc__Honored_Rejtd__at_Date__Control80 + + + FORMAT__Due_Date___Control8 + + + PostedDoc__Account_No___Control1 + + + PostedDoc__Document_Type__Control23 + + + PostedDoc__Document_Type____PostedDoc__Document_Type___Bill + + + AmtForCollection_Control36 + + + AmtForCollection_Control36Format + + + AmtForCollection_Control39 + + + AmtForCollection_Control39Format + + + PostedDoc_Type + + + PostedDoc_Entry_No_ + + + PostedDoc_Bill_Gr__Pmt__Order_No_ + + + All_amounts_are_in_LCYCaption + + + Document_No_Caption + + + Bill_No_Caption + + + Customer_Name_Control28Caption + + + Customer__Post_Code__Control9Caption + + + Customer_City_Control30Caption + + + AmtForCollection_Control31Caption + + + Customer_County_Control35Caption + + + PostedDoc_Status_Control78Caption + + + PostedDoc__Honored_Rejtd__at_Date__Control80Caption + + + PostedDoc__Due_Date__Control8Caption + + + Customer_No_Caption + + + PostedDoc__Document_Type__Control23Caption + + + ContinuedCaption + + + EmptyStringCaption + + + ContinuedCaption_Control15 + + + TotalCaption + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupSelect.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupSelect.Page.al new file mode 100644 index 00000000000..b94fce79874 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupSelect.Page.al @@ -0,0 +1,394 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Navigate; +using Microsoft.Sales.Receivables; +using System.Text; + +page 7000064 "Posted Bill Group Select." +{ + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups (Batch)'; + DeleteAllowed = false; + Editable = true; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Worksheet; + SaveValues = true; + SourceTable = "Posted Bill Group"; + UsageCategory = Tasks; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(DueDateFilter; DueDateFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Due Date Filter'; + ToolTip = 'Specifies a due date or a range of due dates that documents must contain to be included in the selection.'; + + trigger OnValidate() + begin + DueDateFilterOnAfterValidate(); + end; + } + field(BankAccFilter; BankAccFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Bank Account Filter'; + TableRelation = "Bank Account"."No."; + ToolTip = 'Specifies which bank accounts the values are shown for.'; + + trigger OnValidate() + begin + BankAccFilterOnAfterValidate(); + end; + } + field(CurrCodeFilter; CurrCodeFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Currency Code Filter'; + TableRelation = Currency; + ToolTip = 'Specifies the currencies that the data is included for.'; + + trigger OnValidate() + begin + CurrCodeFilterOnAfterValidate(); + end; + } + } + repeater(Control1) + { + Editable = false; + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the posted bill group, which is assigned when you create the bill group.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank to which you submitted this posted bill group.'; + } + field("Posting Description"; Rec."Posting Description") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the posting description for the posted bill group.'; + } + field("Dealing Type"; Rec."Dealing Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the type of payment. Collection: The document will be sent to the bank for processing as a receivable. Discount: The document will be sent to the bank for processing as a prepayment discount. When a document is submitted for discount, the bill group bank advances the amount of the document (or a portion of it, in the case of invoices). Later, the bank is responsible for processing the collection of the document on the due date.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the posting date for this bill group.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount in this posted bill group.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the posted bill group.'; + } + field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount of this posted bill group.'; + } + field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for collection, of the documents included in this bill group posted.'; + } + field(Factoring; Rec.Factoring) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the factoring method to be applied to the invoices associated with this bill group.'; + } + } + group(Control49) + { + ShowCaption = false; + field(CurrTotalAmount; CurrTotalAmountLCY) + { + ApplicationArea = All; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Total Rmg. Amt. (LCY)'; + Editable = false; + ToolTip = 'Specifies the sum of amounts that remain to be paid.'; + Visible = CurrTotalAmountVisible; + + trigger OnValidate() + begin + CurrTotalAmountLCYOnAfterValid(); + end; + } + } + } + area(factboxes) + { + part(Control1901420907; "Post. BG Analysis LCY Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1901421007; "Post. BG Analysis Non LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("&Bill Group") + { + Caption = '&Bill Group'; + Image = VoucherGroup; + action(Card) + { + ApplicationArea = Basic, Suite; + Caption = 'Card'; + Image = EditLines; + RunObject = Page "Posted Bill Groups"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Status Filter" = field("Status Filter"); + ShortCutKey = 'Shift+F7'; + ToolTip = 'View or change detailed information about the record that is being processed on the document or journal line.'; + } + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."); + ToolTip = 'View or create a comment.'; + } + separator(Action39) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + RunObject = Page "Posted Bill Groups Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action44) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + PostedBillGr.Copy(Rec); + PostedBillGr.SetRecFilter(); + REPORT.Run(REPORT::"Posted Bill Group Listing", true, false, PostedBillGr); + end; + end; + } + } + } + area(processing) + { + group("F&unctions") + { + Caption = 'F&unctions'; + Image = "Action"; + action(BatchSettlement) + { + ApplicationArea = Basic, Suite; + Caption = 'Batch &Settlement'; + Ellipsis = true; + Image = ApplyEntries; + ToolTip = 'Fully settle the documents that are included in the selected posted bill groups.'; + + trigger OnAction() + begin + CurrPage.SetSelectionFilter(PostedBillGr2); + if not PostedBillGr2.Find('=><') then + exit; + REPORT.RunModal(REPORT::"Batch Settl. Posted Bill Grs.", true, false, PostedBillGr2); + UpdateStatistics(); + CurrPage.Update(false); + end; + } + } + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + begin + Navigate.SetDoc(Rec."Posting Date", Rec."No."); + Navigate.Run(); + end; + } + action("Posted Bill Groups Maturity") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Posted Bill Groups Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(BatchSettlement_Promoted; BatchSettlement) + { + } + actionref("&Navigate_Promoted"; "&Navigate") + { + } + actionref("Posted Bill Groups Maturity_Promoted"; "Posted Bill Groups Maturity") + { + } + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + trigger OnInit() + begin + CurrTotalAmountVisible := true; + end; + + trigger OnOpenPage() + begin + Rec.SetCurrentKey("Bank Account No.", "Posting Date", "Currency Code"); + CurrCodeFilter := Rec.GetFilter("Currency Code"); + BankAccFilter := Rec.GetFilter("Bank Account No."); + UpdateStatistics(); + end; + + var + PostedBillGr: Record "Posted Bill Group"; + PostedBillGr2: Record "Posted Bill Group"; + Navigate: Page Navigate; + CurrTotalAmountLCY: Decimal; + ShowCurrent: Boolean; + CurrCodeFilter: Code[250]; + BankAccFilter: Code[250]; + CurrTotalAmountVisible: Boolean; + DueDateFilter: Text[30]; + + procedure UpdateStatistics() + begin + PostedBillGr.Copy(Rec); + CurrTotalAmountLCY := 0; + UpdateStatistics2(PostedBillGr, CurrTotalAmountLCY, ShowCurrent); + CurrTotalAmountVisible := true; + end; + + procedure GetSelected(var NewPostedBillGr: Record "Posted Bill Group") + begin + CurrPage.SetSelectionFilter(NewPostedBillGr); + end; + + procedure UpdateStatistics2(var PostedBillGr2: Record "Posted Bill Group"; var CurrTotalAmount: Decimal; var ShowCurrent: Boolean) + begin + PostedBillGr2.SetCurrentKey("Bank Account No.", "Posting Date", "Currency Code"); + if PostedBillGr2.Find('-') then; + repeat + PostedBillGr2.CalcFields("Remaining Amount (LCY)"); + CurrTotalAmount := CurrTotalAmount + PostedBillGr2."Remaining Amount (LCY)"; + until PostedBillGr2.Next() = 0; + ShowCurrent := (CurrTotalAmount <> 0); + end; + + local procedure CurrTotalAmountLCYOnAfterValid() + begin + UpdateStatistics(); + end; + + local procedure CurrCodeFilterOnAfterValidate() + begin + Rec.SetFilter("Currency Code", CurrCodeFilter); + CurrPage.Update(false); + UpdateStatistics(); + end; + + local procedure BankAccFilterOnAfterValidate() + begin + Rec.SetFilter("Bank Account No.", BankAccFilter); + CurrPage.Update(false); + UpdateStatistics(); + end; + + local procedure DueDateFilterOnAfterValidate() + var + FilterTokens: Codeunit "Filter Tokens"; + begin + FilterTokens.MakeDateFilter(DueDateFilter); + Rec.SetFilter("Due Date Filter", DueDateFilter); + DueDateFilter := Rec.GetFilter("Due Date Filter"); + CurrPage.Update(false); + UpdateStatistics(); + Rec.SetFilter(Amount, '<>0'); + CurrPage.Update(false); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroups.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroups.Page.al new file mode 100644 index 00000000000..2722d6250c3 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroups.Page.al @@ -0,0 +1,299 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Navigate; +using Microsoft.Sales.Receivables; + +page 7000012 "Posted Bill Groups" +{ + Caption = 'Posted Bill Groups'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + PageType = Document; + RefreshOnActivate = true; + SourceTable = "Posted Bill Group"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("No."; Rec."No.") + { + ApplicationArea = All; + Editable = false; + ToolTip = 'Specifies the number of the posted bill group, which is assigned when you create the bill group.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number or code of the bank to which you submitted this posted bill group.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number associated with the code or number of the bank, to which the bill group was submitted.'; + } + field("Dealing Type"; Rec."Dealing Type") + { + ApplicationArea = Basic, Suite; + Editable = false; + Importance = Promoted; + ToolTip = 'Specifies the type of payment. Collection: The document will be sent to the bank for processing as a receivable. Discount: The document will be sent to the bank for processing as a prepayment discount. When a document is submitted for discount, the bill group bank advances the amount of the document (or a portion of it, in the case of invoices). Later, the bank is responsible for processing the collection of the document on the due date.'; + } + field("Partner Type"; Rec."Partner Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the posted bill group is a person or company.'; + } + field(Factoring; Rec.Factoring) + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the factoring method to be applied to the invoices associated with this bill group.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Editable = false; + Importance = Promoted; + ToolTip = 'Specifies the posting date for this bill group.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the posted bill group.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount in this posted bill group.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; + } + field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the grouped amount of this posted bill group.'; + } + field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the amount outstanding for collection, of the documents included in this bill group posted.'; + } + } + part(Docs; "Docs. in Posted BG Subform") + { + ApplicationArea = Basic, Suite; + SubPageLink = "Bill Gr./Pmt. Order No." = field("No."); + SubPageView = sorting("Bill Gr./Pmt. Order No.") + where(Type = const(Receivable)); + } + group(Expenses) + { + Caption = 'Expenses'; + field("Collection Expenses Amt."; Rec."Collection Expenses Amt.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the amount of fees and commission for processing the collection of bills for the posted bill group.'; + } + field("Discount Expenses Amt."; Rec."Discount Expenses Amt.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the amount of fees and commissions, in order to process this posted bill group for discount.'; + } + field("Discount Interests Amt."; Rec."Discount Interests Amt.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the total interest charged, to discount the documents for this posted bill group.'; + } + field("Rejection Expenses Amt."; Rec."Rejection Expenses Amt.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the amount of the expenses associated with the rejection of bills for this bill group.'; + } + field("Risked Factoring Exp. Amt."; Rec."Risked Factoring Exp. Amt.") + { + ApplicationArea = Basic, Suite; + Editable = false; + Enabled = true; + ToolTip = 'Specifies the financial institution''s charges and commission for risked factoring.'; + } + field("Unrisked Factoring Exp. Amt."; Rec."Unrisked Factoring Exp. Amt.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the financial institution''s charges and commission for unrisked factoring.'; + } + } + group(Auditing) + { + Caption = 'Auditing'; + field("Reason Code"; Rec."Reason Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; + } + field("No. Printed"; Rec."No. Printed") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of copies printed of this posted bill group.'; + } + } + } + area(factboxes) + { + part(Control1901420907; "Post. BG Analysis LCY Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1901421007; "Post. BG Analysis Non LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Bill &Group") + { + Caption = 'Bill &Group'; + Image = VoucherGroup; + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = Type = filter(Receivable), + "BG/PO No." = field("No."); + ToolTip = 'View or create a comment.'; + } + separator(Action20) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + RunObject = Page "Posted Bill Groups Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action58) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + PostedBillGr.Copy(Rec); + PostedBillGr.SetRecFilter(); + REPORT.Run(REPORT::"Posted Bill Group Listing", true, false, PostedBillGr); + end; + end; + } + } + } + area(processing) + { + action("&Navigate") + { + ApplicationArea = Basic, Suite; + Caption = 'Find entries...'; + Image = Navigate; + ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; + + trigger OnAction() + var + begin + Navigate.SetDoc(Rec."Posting Date", Rec."No."); + Navigate.Run(); + end; + } + action("Posted Bill Groups Maturity") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Posted Bill Groups Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Navigate_Promoted"; "&Navigate") + { + } + actionref("Posted Bill Groups Maturity_Promoted"; "Posted Bill Groups Maturity") + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + PostedBillGr: Record "Posted Bill Group"; + Navigate: Page Navigate; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsAnalysis.Page.al new file mode 100644 index 00000000000..1a2892da9fa --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsAnalysis.Page.al @@ -0,0 +1,241 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000021 "Posted Bill Groups Analysis" +{ + Caption = 'Posted Bill Groups Analysis'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SourceTable = "Posted Bill Group"; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field("Category Filter"; Rec."Category Filter") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a sort code for the documents to be included in the posted bill group posted.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + } + group(Control16) + { + ShowCaption = false; + fixed(Control1902454701) + { + ShowCaption = false; + group("No. of Documents") + { + Caption = 'No. of Documents'; + field(NoOpen; NoOpen) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the posted bill group.'; + } + field("Amount Grouped"; Rec."Amount Grouped") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the grouped amount in this posted bill group.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; + } + } + group(Amount) + { + Caption = 'Amount'; + field(OpenAmt; OpenAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmt; HonoredAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Closed'; + Editable = false; + ToolTip = 'Specifies if the document is closed.'; + } + field(RejectedAmt; RejectedAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmt; RedrawnAmt) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + group("Amount (LCY)") + { + Caption = 'Amount (LCY)'; + field(OpenAmtLCY; OpenAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmtLCY; HonoredAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Closed'; + Editable = false; + ToolTip = 'Specifies if the document is closed.'; + } + field(RejectedAmtLCY; RejectedAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmtLCY; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + } + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + PostedDoc: Record "Posted Cartera Doc."; + OpenAmt: Decimal; + HonoredAmt: Decimal; + RejectedAmt: Decimal; + RedrawnAmt: Decimal; + OpenAmtLCY: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + NoOpen: Integer; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + + local procedure UpdateStatistics() + begin + PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); + PostedDoc.SetRange(Type, PostedDoc.Type::Receivable); + PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); + Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); + + PostedDoc.SetRange(Status, PostedDoc.Status::Open); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + OpenAmt := PostedDoc."Amount for Collection"; + OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoOpen := PostedDoc.Count; + + PostedDoc.SetRange(Status); + PostedDoc.SetRange(Redrawn, true); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RedrawnAmt := PostedDoc."Amount for Collection"; + RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRedrawn := PostedDoc.Count; + PostedDoc.SetRange(Redrawn); + + PostedDoc.SetRange(Status, PostedDoc.Status::Honored); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; + HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; + NoHonored := PostedDoc.Count - NoRedrawn; + + PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); + PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); + RejectedAmt := PostedDoc."Amount for Collection"; + RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; + NoRejected := PostedDoc.Count; + end; + + local procedure CategoryFilterOnAfterValidate() + begin + UpdateStatistics(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsList.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsList.Page.al new file mode 100644 index 00000000000..84383549581 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsList.Page.al @@ -0,0 +1,186 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000014 "Posted Bill Groups List" +{ + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups'; + CardPageID = "Posted Bill Groups"; + Editable = false; + PageType = List; + RefreshOnActivate = true; + SourceTable = "Posted Bill Group"; + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the posted bill group, which is assigned when you create the bill group.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank to which you submitted this posted bill group.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number associated with the code or number of the bank, to which the bill group was submitted.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the posted bill group.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total for all of the documents included in this bill group.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total for all of the documents included in this posted bill group.'; + } + field("Remaining Amount"; Rec."Remaining Amount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; + } + field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount outstanding for collection, of the documents included in this bill group posted.'; + } + } + } + area(factboxes) + { + part(Control1901420907; "Post. BG Analysis LCY Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1901421007; "Post. BG Analysis Non LCY FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Bill &Group") + { + Caption = 'Bill &Group'; + Image = VoucherGroup; + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = "BG/PO No." = field("No."), + Type = filter(Receivable); + ToolTip = 'View or create a comment.'; + } + separator(Action21) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + RunObject = Page "Posted Bill Groups Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action24) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + PostedBillGr.Copy(Rec); + PostedBillGr.SetRecFilter(); + REPORT.Run(REPORT::"Posted Bill Group Listing", true, false, PostedBillGr); + end; + end; + } + } + } + area(processing) + { + action("Posted Bill Groups Maturity") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Posted Bill Groups Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("Posted Bill Groups Maturity_Promoted"; "Posted Bill Groups Maturity") + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + PostedBillGr: Record "Posted Bill Group"; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsMaturity.Page.al new file mode 100644 index 00000000000..cb32b69261a --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillGroupsMaturity.Page.al @@ -0,0 +1,94 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +page 7000033 "Posted Bill Groups Maturity" +{ + Caption = 'Posted Bill Groups Maturity'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + PageType = List; + SaveValues = true; + SourceTable = "Posted Bill Group"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Category Filter"; Rec."Category Filter") + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + } + group(Options) + { + Caption = 'Options'; + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View by'; + OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + field(AmountType; AmountType) + { + ApplicationArea = Basic, Suite; + Caption = 'View as'; + OptionCaption = 'Net Change,Balance at Date'; + ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + } + part(MaturityLines; "Posted Bill Gr. Maturity Lines") + { + ApplicationArea = Basic, Suite; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateSubForm(); + end; + + trigger OnOpenPage() + begin + UpdateSubForm(); + end; + + var + PeriodType: Option Day,Week,Month,Quarter,Year,Period; + AmountType: Option "Net Change","Balance at Date"; + + local procedure UpdateSubForm() + begin + CurrPage.MaturityLines.PAGE.Set(Rec, PeriodType, AmountType); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillsAnalysis.Page.al new file mode 100644 index 00000000000..ae9804485f0 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillsAnalysis.Page.al @@ -0,0 +1,276 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +page 7000068 "Posted Bills Analysis" +{ + Caption = 'Posted Bills Analysis'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SourceTable = "Posted Cartera Doc."; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + } + group(Control16) + { + ShowCaption = false; + fixed(Control1902454701) + { + ShowCaption = false; + group("Number of Bills") + { + Caption = 'Number of Bills'; + field(NoOpen; NoOpen) + { + ApplicationArea = Basic, Suite; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(NoHonored; NoHonored) + { + ApplicationArea = Basic, Suite; + Caption = 'Honored'; + Editable = false; + ToolTip = 'Specifies that the related payment is settled. '; + } + field(NoRejected; NoRejected) + { + ApplicationArea = Basic, Suite; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(NoRedrawn; NoRedrawn) + { + ApplicationArea = Basic, Suite; + Caption = 'Redrawn (o/Rejected)'; + Editable = false; + ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; + } + field(BGPOAmtLCY; BGPOAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'BGPO Amount'; + Editable = false; + ToolTip = 'Specifies the amount on the bill group or payment order.'; + } + field(NoBillInBGPO; NoBillInBGPO) + { + ApplicationArea = Basic, Suite; + Caption = 'Number of Bills'; + Editable = false; + ToolTip = 'Specifies the number of bills included.'; + } + } + group(Amount) + { + Caption = 'Amount'; + field(OpenAmtLCY; OpenAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open'; + Editable = false; + ToolTip = 'Specifies that the related payment is not processed yet. '; + } + field(HonoredAmtLCY; HonoredAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Closed'; + Editable = false; + ToolTip = 'Specifies if the document is closed.'; + } + field(RejectedAmtLCY; RejectedAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rejected'; + Editable = false; + ToolTip = 'Specifies that the related payment is rejected.'; + } + field(RedrawnAmtLCY; RedrawnAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Editable = false; + } + } + group("%") + { + Caption = '%'; + field(OpenPercentage; OpenPercentage) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 0; + ExtendedDatatype = Ratio; + MaxValue = 100; + MinValue = 0; + } + field(HonoredPercentage; HonoredPercentage) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 0; + ExtendedDatatype = Ratio; + MaxValue = 100; + MinValue = 0; + } + field(RejectedPercentage; RejectedPercentage) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 0; + ExtendedDatatype = Ratio; + MaxValue = 100; + MinValue = 0; + } + field(RedrawnPercentage; RedrawnPercentage) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 0; + ExtendedDatatype = Ratio; + MaxValue = 100; + MinValue = 0; + } + } + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + trigger OnOpenPage() + begin + UpdateStatistics(); + end; + + var + OpenAmtLCY: Decimal; + HonoredAmtLCY: Decimal; + RejectedAmtLCY: Decimal; + RedrawnAmtLCY: Decimal; + BGPOAmtLCY: Decimal; + OpenPercentage: Decimal; + RejectedPercentage: Decimal; + HonoredPercentage: Decimal; + RedrawnPercentage: Decimal; + NoBillInBGPO: Integer; + NoOpen: Integer; + NoHonored: Integer; + NoRejected: Integer; + NoRedrawn: Integer; + CategoryFilter: Code[10]; + + local procedure UpdateStatistics() + begin + Rec.SetCurrentKey("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date", "Document Type"); + Rec.SetRange("Document Type", Rec."Document Type"::Bill); + if Rec.Type = Rec.Type::Receivable then + Rec.SetRange(Type, Rec.Type::Receivable) + else + Rec.SetRange(Type, Rec.Type::Payable); + + if CategoryFilter = '' then + Rec.SetRange("Category Code") + else + Rec.SetRange("Category Code", CategoryFilter); + + Rec.SetRange(Status); + Rec.CalcSums("Amt. for Collection (LCY)"); + BGPOAmtLCY := Rec."Amt. for Collection (LCY)"; + NoBillInBGPO := Rec.Count; + + Rec.SetRange(Status, Rec.Status::Open); + Rec.CalcSums("Amt. for Collection (LCY)"); + OpenAmtLCY := Rec."Amt. for Collection (LCY)"; + NoOpen := Rec.Count; + + if BGPOAmtLCY = 0 then + OpenPercentage := 0 + else + OpenPercentage := OpenAmtLCY / BGPOAmtLCY * 100; + + Rec.SetRange(Status); + Rec.SetRange(Redrawn, true); + Rec.CalcSums("Amt. for Collection (LCY)"); + RedrawnAmtLCY := Rec."Amt. for Collection (LCY)"; + NoRedrawn := Rec.Count; + + Rec.SetRange(Redrawn); + + Rec.SetRange(Status, Rec.Status::Honored); + Rec.CalcSums("Amt. for Collection (LCY)"); + HonoredAmtLCY := Rec."Amt. for Collection (LCY)" - RedrawnAmtLCY; + NoHonored := Rec.Count - NoRedrawn; + + if BGPOAmtLCY = 0 then + HonoredPercentage := 0 + else + HonoredPercentage := HonoredAmtLCY / BGPOAmtLCY * 100; + + Rec.SetRange(Status); + + Rec.SetRange(Status, Rec.Status::Rejected); + Rec.CalcSums("Amt. for Collection (LCY)"); + RejectedAmtLCY := Rec."Amt. for Collection (LCY)" + RedrawnAmtLCY; + NoRejected := Rec.Count + NoRedrawn; + + if BGPOAmtLCY = 0 then + RejectedPercentage := 0 + else + RejectedPercentage := RejectedAmtLCY / BGPOAmtLCY * 100; + + if RejectedAmtLCY = 0 then + RedrawnPercentage := 0 + else + RedrawnPercentage := RedrawnAmtLCY / RejectedAmtLCY * 100; + + Rec.SetRange(Status); + end; + + local procedure CategoryFilterOnAfterValidate() + begin + UpdateStatistics(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillsMaturityLin.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillsMaturityLin.Page.al new file mode 100644 index 00000000000..6e5103b6268 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedBillsMaturityLin.Page.al @@ -0,0 +1,137 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Enums; +using Microsoft.Foundation.Period; +using System.Utilities; + +page 7000070 "Posted Bills Maturity Lin." +{ + Caption = 'Lines'; + PageType = ListPart; + SourceTable = Date; + + layout + { + area(content) + { + repeater(Control1) + { + Editable = false; + ShowCaption = false; + field("Period Start"; Rec."Period Start") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the starting date of the period that you want to view.'; + } + field("Period Name"; Rec."Period Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the name of the period shown on the line.'; + } + field(DocAmtLCY; DocAmtLCY) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount'; + DrillDown = true; + ToolTip = 'Specifies the amount for the posted bills for the period.'; + + trigger OnDrillDown() + begin + ShowDocs(); + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + SetDateFilter(); + PostedDoc.SetCurrentKey("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, + "Category Code", Redrawn, "Due Date", "Document Type"); + if PostedDoc.Type = PostedDoc.Type::Receivable then + PostedDoc.SetRange(Type, PostedDoc.Type::Receivable) + else + PostedDoc.SetRange(Type, PostedDoc.Type::Payable); + PostedDoc.SetRange("Document Type", PostedDoc."Document Type"::Bill); + PostedDoc.CalcSums("Remaining Amt. (LCY)"); + DocAmtLCY := PostedDoc."Remaining Amt. (LCY)"; + end; + + trigger OnFindRecord(Which: Text): Boolean + begin + exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); + end; + + trigger OnNextRecord(Steps: Integer): Integer + begin + exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); + end; + + trigger OnOpenPage() + begin + Rec.Reset(); + end; + + var + PostedDoc: Record "Posted Cartera Doc."; + PostedDoc2: Record "Posted Cartera Doc."; + PeriodPageManagement: Codeunit PeriodPageManagement; + PeriodLength: Enum "Analysis Period Type"; + AmountType: Enum "Analysis Amount Type"; + DocAmtLCY: Decimal; + DocType: Option Receivable,Payable; + + [Scope('OnPrem')] + procedure Set(var NewPostedDoc: Record "Posted Cartera Doc."; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") + begin + PostedDoc.Copy(NewPostedDoc); + PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); + AmountType := "Analysis Amount Type".FromInteger(NewAmountType); + CurrPage.Update(false); + end; + + [Scope('OnPrem')] + procedure SetDateFilter() + begin + if AmountType = AmountType::"Net Change" then + PostedDoc.SetRange("Due Date", Rec."Period Start", Rec."Period End") + else + PostedDoc.SetRange("Due Date", 0D, Rec."Period End"); + end; + + local procedure ShowDocs() + begin + SetDateFilter(); + if PostedDoc.Type = PostedDoc.Type::Receivable then + PostedDoc2.SetRange(Type, PostedDoc.Type::Receivable) + else + PostedDoc2.SetRange(Type, PostedDoc.Type::Payable); + PostedDoc2.SetRange("Document Type", PostedDoc."Document Type"::Bill); + PostedDoc2.SetFilter(Type, PostedDoc.GetFilter(Type)); + PostedDoc2.SetFilter("Due Date", PostedDoc.GetFilter("Due Date")); + PostedDoc2.SetFilter("Global Dimension 1 Code", PostedDoc.GetFilter("Global Dimension 1 Code")); + PostedDoc2.SetFilter("Global Dimension 2 Code", PostedDoc.GetFilter("Global Dimension 2 Code")); + PostedDoc2.SetFilter("Category Code", PostedDoc.GetFilter("Category Code")); + PostedDoc2.SetFilter("Remaining Amt. (LCY)", '<>0'); + PAGE.RunModal(0, PostedDoc2); + end; + + [Scope('OnPrem')] + procedure SetType(DocType2: Option Receivable,Payable) + begin + DocType := DocType2; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedPayableBillsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedPayableBillsMaturity.Page.al new file mode 100644 index 00000000000..0b68ca21dfc --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedPayableBillsMaturity.Page.al @@ -0,0 +1,188 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +page 7000072 "Posted Payable Bills Maturity" +{ + Caption = 'Posted Payable Bills Maturity'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + PageType = Worksheet; + SaveValues = true; + SourceTable = "Posted Cartera Doc."; + SourceTableView = sorting("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date", "Document Type") + where("Document Type" = const(Bill), + Type = const(Payable)); + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View by'; + OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + if PeriodType = PeriodType::Period then + PeriodPeriodTypeOnValidate(); + if PeriodType = PeriodType::Year then + YearPeriodTypeOnValidate(); + if PeriodType = PeriodType::Quarter then + QuarterPeriodTypeOnValidate(); + if PeriodType = PeriodType::Month then + MonthPeriodTypeOnValidate(); + if PeriodType = PeriodType::Week then + WeekPeriodTypeOnValidate(); + if PeriodType = PeriodType::Day then + DayPeriodTypeOnValidate(); + end; + } + field(AmountType; AmountType) + { + ApplicationArea = Basic, Suite; + Caption = 'View as'; + OptionCaption = 'Net Change,Balance at Date'; + ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; + + trigger OnValidate() + begin + if AmountType = AmountType::"Balance at Date" then + BalanceatDateAmountTypeOnValid(); + if AmountType = AmountType::"Net Change" then + NetChangeAmountTypeOnValidate(); + end; + } + } + part(DueDateLin; "Posted Bills Maturity Lin.") + { + ApplicationArea = Basic, Suite; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateSubForm(); + end; + + var + PeriodType: Option Day,Week,Month,Quarter,Year,Period; + AmountType: Option "Net Change","Balance at Date"; + CategoryFilter: Code[250]; + + local procedure UpdateSubForm() + begin + Rec.SetFilter("Category Code", CategoryFilter); + CurrPage.DueDateLin.PAGE.Set(Rec, PeriodType, AmountType); + end; + + local procedure DayPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure WeekPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure MonthPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure QuarterPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure YearPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure PeriodPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure BalanceatDateAmountTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure NetChangeAmountTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure DayPeriodTypeOnValidate() + begin + DayPeriodTypeOnPush(); + end; + + local procedure WeekPeriodTypeOnValidate() + begin + WeekPeriodTypeOnPush(); + end; + + local procedure MonthPeriodTypeOnValidate() + begin + MonthPeriodTypeOnPush(); + end; + + local procedure QuarterPeriodTypeOnValidate() + begin + QuarterPeriodTypeOnPush(); + end; + + local procedure YearPeriodTypeOnValidate() + begin + YearPeriodTypeOnPush(); + end; + + local procedure PeriodPeriodTypeOnValidate() + begin + PeriodPeriodTypeOnPush(); + end; + + local procedure NetChangeAmountTypeOnValidate() + begin + NetChangeAmountTypeOnPush(); + end; + + local procedure BalanceatDateAmountTypeOnValid() + begin + BalanceatDateAmountTypeOnPush(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedReceivBillsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedReceivBillsMaturity.Page.al new file mode 100644 index 00000000000..5c5880d78de --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/History/PostedReceivBillsMaturity.Page.al @@ -0,0 +1,188 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.History; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +page 7000069 "Posted Receiv. Bills Maturity" +{ + Caption = 'Posted Receiv. Bills Maturity'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + PageType = List; + SaveValues = true; + SourceTable = "Posted Cartera Doc."; + SourceTableView = sorting("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date", "Document Type") + where("Document Type" = const(Bill), + Type = const(Receivable)); + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View by'; + OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + if PeriodType = PeriodType::Period then + PeriodPeriodTypeOnValidate(); + if PeriodType = PeriodType::Year then + YearPeriodTypeOnValidate(); + if PeriodType = PeriodType::Quarter then + QuarterPeriodTypeOnValidate(); + if PeriodType = PeriodType::Month then + MonthPeriodTypeOnValidate(); + if PeriodType = PeriodType::Week then + WeekPeriodTypeOnValidate(); + if PeriodType = PeriodType::Day then + DayPeriodTypeOnValidate(); + end; + } + field(AmountType; AmountType) + { + ApplicationArea = Basic, Suite; + Caption = 'View as'; + OptionCaption = 'Net Change,Balance at Date'; + ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; + + trigger OnValidate() + begin + if AmountType = AmountType::"Balance at Date" then + BalanceatDateAmountTypeOnValid(); + if AmountType = AmountType::"Net Change" then + NetChangeAmountTypeOnValidate(); + end; + } + } + part(DueDateLin; "Posted Bills Maturity Lin.") + { + ApplicationArea = Basic, Suite; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateSubForm(); + end; + + var + PeriodType: Option Day,Week,Month,Quarter,Year,Period; + AmountType: Option "Net Change","Balance at Date"; + CategoryFilter: Code[250]; + + local procedure UpdateSubForm() + begin + Rec.SetFilter("Category Code", CategoryFilter); + CurrPage.DueDateLin.PAGE.Set(Rec, PeriodType, AmountType); + end; + + local procedure DayPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure WeekPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure MonthPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure QuarterPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure YearPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure PeriodPeriodTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure BalanceatDateAmountTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure NetChangeAmountTypeOnPush() + begin + UpdateSubForm(); + end; + + local procedure DayPeriodTypeOnValidate() + begin + DayPeriodTypeOnPush(); + end; + + local procedure WeekPeriodTypeOnValidate() + begin + WeekPeriodTypeOnPush(); + end; + + local procedure MonthPeriodTypeOnValidate() + begin + MonthPeriodTypeOnPush(); + end; + + local procedure QuarterPeriodTypeOnValidate() + begin + QuarterPeriodTypeOnPush(); + end; + + local procedure YearPeriodTypeOnValidate() + begin + YearPeriodTypeOnPush(); + end; + + local procedure PeriodPeriodTypeOnValidate() + begin + PeriodPeriodTypeOnPush(); + end; + + local procedure NetChangeAmountTypeOnValidate() + begin + NetChangeAmountTypeOnPush(); + end; + + local procedure BalanceatDateAmountTypeOnValid() + begin + BalanceatDateAmountTypeOnPush(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BGAnalysisFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BGAnalysisFactBox.Page.al new file mode 100644 index 00000000000..0147131c81d --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BGAnalysisFactBox.Page.al @@ -0,0 +1,75 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Finance.ReceivablesPayables; + +page 35291 "BG Analysis Fact Box" +{ + Caption = 'BG Analysis Fact Box'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SaveValues = true; + SourceTable = "Bill Group"; + + layout + { + area(content) + { + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the currency code for the bill group.'; + } + field(DocCount; DocCount) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Documents'; + Editable = false; + ToolTip = 'Specifies the number of documents included.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total of the sums of the documents included in the bill group.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount for all of the documents included in the bill group.'; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + Doc: Record "Cartera Doc."; + DocCount: Integer; + + local procedure UpdateStatistics() + begin + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Global Dimension 1 Filter", Doc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", Doc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", Doc."Category Code"); + Rec.CopyFilter("Due Date Filter", Doc."Due Date"); + DocCount := Doc.Count(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankAccountInformationFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankAccountInformationFB.Page.al new file mode 100644 index 00000000000..7d0716fb3ce --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankAccountInformationFB.Page.al @@ -0,0 +1,134 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.ReceivablesPayables; + +page 35303 "Bank Account Information FB" +{ + Caption = 'Bank Account Information FB'; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = CardPart; + SourceTable = "Bank Account"; + SourceTableView = sorting("Currency Code"); + + layout + { + area(content) + { + field("CurrBillGr.Amount"; CurrBillGr.Amount) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = CurrBillGr."Currency Code"; + AutoFormatType = 1; + Caption = 'Curr. Bill Gr. Amount'; + Editable = false; + ToolTip = 'Specifies the current amount related to bill groups on the bank account.'; + + trigger OnDrillDown() + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code"); + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Bill Gr./Pmt. Order No.", CurrBillGr."No."); + Doc.SetFilter("Category Code", CategoryFilter); + PAGE.RunModal(0, Doc); + end; + + trigger OnValidate() + begin + CurrBillGrAmountOnAfterValidat(); + end; + } + field("CurrBillGr.""Currency Code"""; CurrBillGr."Currency Code") + { + ApplicationArea = Basic, Suite; + Caption = 'Curr. Bill Gr.Currency Code'; + Editable = false; + TableRelation = Currency; + ToolTip = 'Specifies the currency of the bill groups amount. '; + } + field("CurrBillGr.""Amount (LCY)"""; CurrBillGr."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + Caption = 'Curr. Bill Gr. Amt. (LCY)'; + Editable = false; + ToolTip = 'Specifies the current amount related to bill groups on the bank account, in LCY.'; + + trigger OnDrillDown() + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code"); + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Bill Gr./Pmt. Order No.", CurrBillGr."No."); + Doc.SetFilter("Category Code", CategoryFilter); + PAGE.RunModal(0, Doc); + end; + + trigger OnValidate() + begin + CurrBillGrAmountLCYOnAfterVali(); + end; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + RiskIncGr := Rec."Posted Receiv. Bills Rmg. Amt."; + if (CurrBillGr."Dealing Type" = CurrBillGr."Dealing Type"::Discount) and + (CurrBillGr.Factoring = CurrBillGr.Factoring::" ") + then + RiskIncGr := RiskIncGr + CurrBillGr.Amount; + if Rec."Credit Limit for Discount" <> 0 then + RiskPercIncGr := RiskIncGr / Rec."Credit Limit for Discount" * 100 + else + if RiskIncGr = 0 then + RiskPercIncGr := 0 + else + RiskPercIncGr := 100; + end; + + trigger OnInit() + begin + CurrPage.LookupMode := true; + end; + + trigger OnOpenPage() + begin + CurrBillGr.SetFilter("Category Filter", CategoryFilter); + CurrBillGr.CalcFields(Amount, "Amount (LCY)"); + if Rec.Get(CurrBillGr."Bank Account No.") then; + end; + + var + Doc: Record "Cartera Doc."; + CurrBillGr: Record "Bill Group"; + RiskIncGr: Decimal; + RiskPercIncGr: Decimal; + CategoryFilter: Code[250]; + + local procedure CurrBillGrAmountOnAfterValidat() + begin + CurrBillGr.SetFilter("Category Filter", CategoryFilter); + CurrBillGr.CalcFields(Amount); + CurrPage.Update(false); + end; + + local procedure CurrBillGrAmountLCYOnAfterVali() + begin + CurrBillGr.SetFilter("Category Filter", CategoryFilter); + CurrBillGr.CalcFields(Amount); + CurrPage.Update(false); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankAccountSelection.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankAccountSelection.Page.al new file mode 100644 index 00000000000..274b7bcc030 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankAccountSelection.Page.al @@ -0,0 +1,484 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.Check; +using Microsoft.Bank.Ledger; +using Microsoft.Bank.Statement; +using Microsoft.Finance.Currency; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.Comment; +using Microsoft.Purchases.History; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; + +page 7000018 "Bank Account Selection" +{ + Caption = 'Bank Account Selection'; + DataCaptionExpression = Caption; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Worksheet; + SourceTable = "Bank Account"; + SourceTableView = sorting("Currency Code"); + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + field("CurrBillGr.""Dealing Type"""; CurrBillGr."Dealing Type") + { + ApplicationArea = Basic, Suite; + Caption = 'Dealing Type'; + ToolTip = 'Specifies the type of payment. Collection: The document will be sent to the bank for processing as a receivable. Discount: The document will be sent to the bank for processing as a prepayment discount. When a document is submitted for discount, the bill group bank advances the amount of the document (or a portion of it, in the case of invoices). Later, the bank is responsible for processing the collection of the document on the due date.'; + + trigger OnValidate() + begin + CurrBillGrDealingTypeOnAfterVa(); + end; + } + } + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the bank account number.'; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies if the name of the account.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the relevant currency code for the bank account.'; + Visible = false; + } + field("Credit Limit for Discount"; Rec."Credit Limit for Discount") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the credit limit for the discount of bills available at this particular bank.'; + } + field("Posted Receiv. Bills Rmg. Amt."; Rec."Posted Receiv. Bills Rmg. Amt.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the amount pending from the receivables registered at this bank.'; + } + field(RiskIncGr; RiskIncGr) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Risk Including Current Bill Group'; + Editable = false; + ToolTip = 'Specifies that customers'' insolvency risk rating includes the ongoing bill group.'; + } + field(RiskPercIncGr; RiskPercIncGr) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 0; + Caption = 'Risk % Including Current Bill Group'; + ExtendedDatatype = Ratio; + MaxValue = 100; + MinValue = 0; + ToolTip = 'Specifies that customers'' insolvency risk rating includes the ongoing bill group.'; + } + } + group(Control42) + { + ShowCaption = false; + fixed(Control1900668801) + { + ShowCaption = false; + group("Curr. Bill Gr. Amount") + { + Caption = 'Curr. Bill Gr. Amount'; + field("CurrBillGr.Amount"; CurrBillGr.Amount) + { + ApplicationArea = Basic, Suite; + AutoFormatExpression = CurrBillGr."Currency Code"; + AutoFormatType = 1; + Editable = false; + + trigger OnDrillDown() + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code"); + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Bill Gr./Pmt. Order No.", CurrBillGr."No."); + Doc.SetFilter("Category Code", CategoryFilter); + PAGE.RunModal(0, Doc); + end; + + trigger OnValidate() + begin + CurrBillGrAmountOnAfterValidat(); + end; + } + } + group("Curr. Bill Gr.Currency Code") + { + Caption = 'Curr. Bill Gr.Currency Code'; + field("CurrBillGr.""Currency Code"""; CurrBillGr."Currency Code") + { + ApplicationArea = Basic, Suite; + Caption = 'Curr. Bill Gr.Currency Code'; + Editable = false; + TableRelation = Currency; + ToolTip = 'Specifies the currency of the bill groups amount. '; + } + } + group("Curr. Bill Gr. Amt. (LCY)") + { + Caption = 'Curr. Bill Gr. Amt. (LCY)'; + field("CurrBillGr.""Amount (LCY)"""; CurrBillGr."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + Caption = 'Curr. Bill Gr. Amt. (LCY)'; + Editable = false; + ToolTip = 'Specifies the current amount related to bill groups on the bank account, in LCY.'; + + trigger OnDrillDown() + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code"); + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Bill Gr./Pmt. Order No.", CurrBillGr."No."); + Doc.SetFilter("Category Code", CategoryFilter); + PAGE.RunModal(0, Doc); + end; + + trigger OnValidate() + begin + CurrBillGrAmountLCYOnAfterVali(); + end; + } + } + } + } + } + area(factboxes) + { + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("&Bank Acc.") + { + Caption = '&Bank Acc.'; + Image = Bank; + action(Card) + { + ApplicationArea = Basic, Suite; + Caption = 'Card'; + Image = EditLines; + RunObject = Page "Bank Account Card"; + RunPageLink = "No." = field("No."); + ShortCutKey = 'Shift+F7'; + ToolTip = 'View or change detailed information about the record that is being processed on the document or journal line.'; + } + action("Ledger E&ntries") + { + ApplicationArea = Basic, Suite; + Caption = 'Ledger E&ntries'; + RunObject = Page "Bank Account Ledger Entries"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No.", "Posting Date"); + ShortCutKey = 'Ctrl+F7'; + ToolTip = 'View the history of transactions that have been posted for the selected record.'; + } + action("Co&mments") + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "Comment Sheet"; + RunPageLink = "Table Name" = const("Bank Account"), + "No." = field("No."); + ToolTip = 'View or create a comment.'; + } + action(Statistics) + { + ApplicationArea = Basic, Suite; + Caption = 'Statistics'; + Image = Statistics; + RunObject = Page "Bank Account Statistics"; + RunPageLink = "No." = field("No."), + "Date Filter" = field("Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); + ShortCutKey = 'F7'; + ToolTip = 'View statistical information, such as the value of posted entries, for the record.'; + } + action(Balance) + { + ApplicationArea = Basic, Suite; + Caption = 'Balance'; + Image = Balance; + RunObject = Page "Bank Account Balance"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); + ToolTip = 'View a summary of the bank account balance in different periods.'; + } + action("St&atements") + { + ApplicationArea = Basic, Suite; + Caption = 'St&atements'; + RunObject = Page "Bank Account Statement List"; + RunPageLink = "Bank Account No." = field("No."); + ToolTip = 'View statements for selected bank accounts. For each bank transaction, the report shows a description, an applied amount, a statement amount, and other information.'; + } + action("Chec&k Ledger Entries") + { + ApplicationArea = Basic, Suite; + Caption = 'Chec&k Ledger Entries'; + Image = CheckLedger; + RunObject = Page "Check Ledger Entries"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No.", "Entry Status", "Check No."); + ToolTip = 'View check ledger entries that result from posting transactions in a payment journal for the relevant bank account.'; + } + separator(Action51) + { + } + action("&Operation Fees") + { + ApplicationArea = Basic, Suite; + Caption = '&Operation Fees'; + RunObject = Page "Operation Fees"; + RunPageLink = Code = field("Operation Fees Code"), + "Currency Code" = field("Currency Code"); + ToolTip = 'View the various operation fees that banks charge to process the documents that are remitted to them. These operations include: collections, discounts, discount interest, rejections, payment orders, unrisked factoring, and risked factoring.'; + } + action("Customer Ratings") + { + ApplicationArea = Basic, Suite; + Caption = 'Customer Ratings'; + Image = CustomerRating; + RunObject = Page "Customer Ratings"; + RunPageLink = Code = field("Customer Ratings Code"), + "Currency Code" = field("Currency Code"); + ToolTip = 'View or edit the risk percentages that are assigned to customers according to their insolvency risk.'; + } + action("Sufi&xes") + { + ApplicationArea = Basic, Suite; + Caption = 'Sufi&xes'; + Image = NumberSetup; + RunObject = Page Suffixes; + RunPageLink = "Bank Acc. Code" = field("No."); + ToolTip = 'View the bank suffixes that area assigned to manage bill groups. Typically, banks assign the company a different suffix for managing bill groups, depending if they are receivable or discount management type operations.'; + } + separator(Action10) + { + Caption = ''; + } + action("Bill &Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Bill &Groups'; + Image = VoucherGroup; + RunObject = Page "Bill Groups List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View the related bill groups.'; + } + action("Posted Bill Groups") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Bill Groups'; + Image = PostedVoucherGroup; + RunObject = Page "Posted Bill Groups List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; + } + separator(Action27) + { + Caption = ''; + } + action("Payment O&rders") + { + ApplicationArea = Basic, Suite; + Caption = 'Payment O&rders'; + RunObject = Page "Payment Orders List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View or edit related payment orders.'; + } + action("Posted P&ayment Orders") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted P&ayment Orders'; + Image = PostedPayment; + RunObject = Page "Posted Payment Orders List"; + RunPageLink = "Bank Account No." = field("No."); + RunPageView = sorting("Bank Account No."); + ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; + } + separator(Action60) + { + } + action("Posted Recei&vable Bills") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Recei&vable Bills'; + Image = PostedReceivableVoucher; + RunObject = Page "Bank Cat. Posted Receiv. Bills"; + ToolTip = 'View the list of posted bill groups pertaining to receivables.'; + } + action("Posted Pa&yable Bills") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Pa&yable Bills'; + Image = PostedPayableVoucher; + RunObject = Page "Bank Cat. Posted Payable Bills"; + ToolTip = 'View the list of posted bill groups pertaining to payables.'; + } + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(Statistics_Promoted; Statistics) + { + } + } + } + } + + trigger OnAfterGetRecord() + begin + RiskIncGr := Rec."Posted Receiv. Bills Rmg. Amt."; + if (CurrBillGr."Dealing Type" = CurrBillGr."Dealing Type"::Discount) and + (CurrBillGr.Factoring = CurrBillGr.Factoring::" ") + then + RiskIncGr := RiskIncGr + CurrBillGr.Amount; + if Rec."Credit Limit for Discount" <> 0 then + RiskPercIncGr := RiskIncGr / Rec."Credit Limit for Discount" * 100 + else + if RiskIncGr = 0 then + RiskPercIncGr := 0 + else + RiskPercIncGr := 100; + end; + + trigger OnInit() + begin + CurrPage.LookupMode := true; + end; + + trigger OnOpenPage() + begin + CurrBillGr.SetFilter("Category Filter", CategoryFilter); + CurrBillGr.CalcFields(Amount, "Amount (LCY)"); + if Rec.Get(CurrBillGr."Bank Account No.") then; + end; + + var + Doc: Record "Cartera Doc."; + CurrBillGr: Record "Bill Group"; + CurrPmtOrd: Record "Payment Order"; + RiskIncGr: Decimal; + RiskPercIncGr: Decimal; + CategoryFilter: Code[250]; + Caption: Text[250]; + + [Scope('OnPrem')] + procedure SetCurrBillGr(var CurrBillGr2: Record "Bill Group") + begin + Rec.Reset(); + CurrBillGr.Copy(CurrBillGr2); + CurrBillGr.SetFilter("Category Filter", CategoryFilter); + CurrBillGr.CalcFields(Amount, "Amount (LCY)", "Bank Account Name"); + Caption := StrSubstNo('%1 %2 %3', CurrBillGr2."No.", CurrBillGr2."Bank Account Name", CurrBillGr2.TableCaption()); + if (CurrBillGr."Currency Code" <> '') or + (CurrBillGr."Bank Account No." <> '') + then + Rec.SetRange("Currency Code", CurrBillGr."Currency Code"); + end; + + [Scope('OnPrem')] + procedure SetCurrPmtOrd(var CurrPmtOrd2: Record "Payment Order") + begin + Rec.Reset(); + CurrPmtOrd.Copy(CurrPmtOrd2); + CurrPmtOrd.SetFilter("Category Filter", CategoryFilter); + CurrPmtOrd.CalcFields(Amount, "Amount (LCY)", "Bank Account Name"); + Caption := StrSubstNo('%1 %2 %3', CurrPmtOrd2."No.", CurrPmtOrd2."Bank Account Name", CurrPmtOrd2.TableCaption()); + if (CurrPmtOrd."Currency Code" <> '') or + (CurrPmtOrd."Bank Account No." <> '') + then + Rec.SetRange("Currency Code", CurrPmtOrd."Currency Code"); + end; + + [Scope('OnPrem')] + procedure IsForDiscount(): Integer + begin + if CurrBillGr."Dealing Type" = CurrBillGr."Dealing Type"::Collection then + exit(0); // Collection + + exit(1); // Discount + end; + + local procedure CategoryFilterOnAfterValidate() + begin + CurrBillGr.SetFilter("Category Filter", CategoryFilter); + CurrBillGr.CalcFields(Amount, "Amount (LCY)"); + CurrPage.Update(false); + end; + + local procedure CurrBillGrDealingTypeOnAfterVa() + begin + CurrPage.Update(); + end; + + local procedure CurrBillGrAmountLCYOnAfterVali() + begin + CurrBillGr.SetFilter("Category Filter", CategoryFilter); + CurrBillGr.CalcFields(Amount); + CurrPage.Update(false); + end; + + local procedure CurrBillGrAmountOnAfterValidat() + begin + CurrBillGr.SetFilter("Category Filter", CategoryFilter); + CurrBillGr.CalcFields(Amount); + CurrPage.Update(false); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankCatPostRecBillsMatrix.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankCatPostRecBillsMatrix.Page.al new file mode 100644 index 00000000000..501f1f87ab8 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankCatPostRecBillsMatrix.Page.al @@ -0,0 +1,515 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using System.Utilities; + +page 36848 "Bank Cat.Post.Rec.Bills Matrix" +{ + Caption = 'Bank Cat.Post.Rec.Bills Matrix'; + Editable = false; + PageType = List; + SourceTable = "Bank Account"; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of the posted receivables bill. '; + } + field(Name; Rec.Name) + { + ApplicationArea = All; + ToolTip = 'Specifies if the name of the bill.'; + } + field(Field1; MATRIX_CellData[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[1]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(1); + end; + } + field(Field2; MATRIX_CellData[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[2]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(2); + end; + } + field(Field3; MATRIX_CellData[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[3]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(3); + end; + } + field(Field4; MATRIX_CellData[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[4]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(4); + end; + } + field(Field5; MATRIX_CellData[5]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[5]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(5); + end; + } + field(Field6; MATRIX_CellData[6]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[6]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(6); + end; + } + field(Field7; MATRIX_CellData[7]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[7]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(7); + end; + } + field(Field8; MATRIX_CellData[8]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[8]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(8); + end; + } + field(Field9; MATRIX_CellData[9]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[9]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(9); + end; + } + field(Field10; MATRIX_CellData[10]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[10]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(10); + end; + } + field(Field11; MATRIX_CellData[11]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[11]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(11); + end; + } + field(Field12; MATRIX_CellData[12]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[12]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(12); + end; + } + field(Field13; MATRIX_CellData[13]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[13]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(13); + end; + } + field(Field14; MATRIX_CellData[14]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[14]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(14); + end; + } + field(Field15; MATRIX_CellData[15]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[15]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(15); + end; + } + field(Field16; MATRIX_CellData[16]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[16]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(16); + end; + } + field(Field17; MATRIX_CellData[17]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[17]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(17); + end; + } + field(Field18; MATRIX_CellData[18]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[18]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(18); + end; + } + field(Field19; MATRIX_CellData[19]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[19]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(19); + end; + } + field(Field20; MATRIX_CellData[20]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[20]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(20); + end; + } + field(Field21; MATRIX_CellData[21]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[21]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(21); + end; + } + field(Field22; MATRIX_CellData[22]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[22]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(22); + end; + } + field(Field23; MATRIX_CellData[23]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[23]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(23); + end; + } + field(Field24; MATRIX_CellData[24]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[24]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(24); + end; + } + field(Field25; MATRIX_CellData[25]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[25]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(25); + end; + } + field(Field26; MATRIX_CellData[26]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[26]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(26); + end; + } + field(Field27; MATRIX_CellData[27]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[27]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(27); + end; + } + field(Field28; MATRIX_CellData[28]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[28]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(28); + end; + } + field(Field29; MATRIX_CellData[29]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[29]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(29); + end; + } + field(Field30; MATRIX_CellData[30]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[30]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(30); + end; + } + field(Field31; MATRIX_CellData[31]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[31]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(31); + end; + } + field(Field32; MATRIX_CellData[32]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + CaptionClass = '3,' + MATRIX_ColumnCaption[32]; + + trigger OnDrillDown() + begin + MATRIX_OnDrillDown(32); + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + var + MATRIX_CurrentColumnOrdinal: Integer; + MATRIX_NoOfColumns: Integer; + begin + MATRIX_CurrentColumnOrdinal := 1; + MATRIX_NoOfColumns := ArrayLen(MATRIX_CellData); + + while MATRIX_CurrentColumnOrdinal <= MATRIX_NoOfColumns do begin + MATRIX_OnAfterGetRecord(MATRIX_CurrentColumnOrdinal); + MATRIX_CurrentColumnOrdinal := MATRIX_CurrentColumnOrdinal + 1; + end; + end; + + var + MatrixRecords: array[32] of Record Date; + StatusFilterOption: Option Open,Honored,Rejected,All; + CalcAmt: Decimal; + MATRIX_CellData: array[32] of Decimal; + CategoryFilter: Code[250]; + MATRIX_ColumnCaption: array[32] of Text[1024]; + + local procedure SetDateFilter(ColumnID: Integer) + begin + if CategoryFilter = '' then + Rec.SetRange("Category Filter") + else + Rec.SetFilter("Category Filter", CategoryFilter); + if StatusFilterOption = StatusFilterOption::All then + Rec.SetFilter("Status Filter", '%1|%2|%3', + StatusFilterOption::Open, + StatusFilterOption::Honored, + StatusFilterOption::Rejected) + else + Rec.SetRange("Status Filter", StatusFilterOption); + + if MatrixRecords[ColumnID]."Period Start" = MatrixRecords[ColumnID]."Period End" then + Rec.SetRange("Due Date Filter", MatrixRecords[ColumnID]."Period Start") + else + Rec.SetRange("Due Date Filter", MatrixRecords[ColumnID]."Period Start", MatrixRecords[ColumnID]."Period End") + end; + + [Scope('OnPrem')] + procedure Load(MatrixColumns1: array[32] of Text[1024]; var MatrixRecords1: array[32] of Record Date; CategoryFilter1: Code[20]; StatusFilter: Text[30]) + begin + CopyArray(MATRIX_ColumnCaption, MatrixColumns1, 1); + CopyArray(MatrixRecords, MatrixRecords1, 1); + CategoryFilter := CategoryFilter1; + if Evaluate(StatusFilterOption, StatusFilter) then; + end; + + local procedure MATRIX_OnDrillDown(ColumnID: Integer) + var + PostedCarteraDoc: Record "Posted Cartera Doc."; + PostedBills: Page "Posted Bills"; + begin + SetDateFilter(ColumnID); + PostedCarteraDoc.SetRange("Document Type", PostedCarteraDoc."Document Type"::Bill); + PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Receivable); + + if MatrixRecords[ColumnID]."Period Start" = MatrixRecords[ColumnID]."Period End" then + PostedCarteraDoc.SetRange("Due Date", MatrixRecords[ColumnID]."Period Start") + else + PostedCarteraDoc.SetRange("Due Date", MatrixRecords[ColumnID]."Period Start", MatrixRecords[ColumnID]."Period End"); + + PostedCarteraDoc.SetFilter("Category Code", CategoryFilter); + PostedCarteraDoc.SetRange(Status, "Cartera Document Status".FromInteger(StatusFilterOption)); + PostedCarteraDoc.SetRange("Bank Account No.", Rec."No."); + PostedBills.SetTableView(PostedCarteraDoc); + PostedBills.RunModal(); + end; + + local procedure MATRIX_OnAfterGetRecord(ColumnID: Integer) + begin + SetDateFilter(ColumnID); + Rec.SetFilter("Category Filter", CategoryFilter); + if StatusFilterOption = StatusFilterOption::All then + Rec.SetFilter("Status Filter", '%1|%2|%3', + StatusFilterOption::Open, + StatusFilterOption::Honored, + StatusFilterOption::Rejected) + else + Rec.SetRange("Status Filter", StatusFilterOption); + Rec.CalcFields("Posted Receiv Bills Amt. (LCY)"); + CalcAmt := Rec."Posted Receiv Bills Amt. (LCY)"; + MATRIX_CellData[ColumnID] := Rec."Posted Receiv Bills Amt. (LCY)"; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankCatPostedReceivBills.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankCatPostedReceivBills.Page.al new file mode 100644 index 00000000000..ca7f7049cfe --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankCatPostedReceivBills.Page.al @@ -0,0 +1,165 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Analysis; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.Enums; +using System.Utilities; + +page 7000066 "Bank Cat. Posted Receiv. Bills" +{ + Caption = 'Bank Cat. Posted Receiv. Bills'; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SaveValues = true; + SourceTable = "Bank Account"; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryFilter; CategoryFilter) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the categories that the data is included for.'; + } + field(StatusFilterOption; StatusFilterOption) + { + ApplicationArea = Basic, Suite; + Caption = 'Status Filter'; + OptionCaption = 'Open,Honored,Rejected,All'; + ToolTip = 'Specifies a filter for the status of bills that will be included.'; + } + } + group("Matrix Options") + { + Caption = 'Matrix Options'; + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View By'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + SetColumns(SetWanted::Initial); + end; + } + field(ColumnSet; ColumnSet) + { + ApplicationArea = Basic, Suite; + Caption = 'Column Set'; + Editable = false; + ToolTip = 'Specifies the column setting based on how you have selected to view the matrix.'; + } + } + } + } + + actions + { + area(processing) + { + action("&Show Matrix") + { + ApplicationArea = Basic, Suite; + Caption = '&Show Matrix'; + Image = ShowMatrix; + ToolTip = 'View the data overview according to the selected filters and options.'; + + trigger OnAction() + var + MatrixForm: Page "Bank Cat.Post.Rec.Bills Matrix"; + begin + StatusFilter := Format(StatusFilterOption, 0, ''); + MatrixForm.Load(MatrixColumnCaptions, MatrixRecords, CategoryFilter, StatusFilter); + MatrixForm.RunModal(); + end; + } + action("Next Set") + { + ApplicationArea = Basic, Suite; + Caption = 'Next Set'; + Image = NextSet; + ToolTip = 'Go to the next set of data.'; + + trigger OnAction() + begin + SetColumns(SetWanted::Next); + end; + } + action("Previous Set") + { + ApplicationArea = Basic, Suite; + Caption = 'Previous Set'; + Image = PreviousSet; + ToolTip = 'Go to the previous data set.'; + + trigger OnAction() + begin + SetColumns(SetWanted::Previous); + end; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref("&Show Matrix_Promoted"; "&Show Matrix") + { + } + actionref("Next Set_Promoted"; "Next Set") + { + } + actionref("Previous Set_Promoted"; "Previous Set") + { + } + } + } + } + + trigger OnOpenPage() + begin + SetColumns(SetWanted::Initial); + if Rec.HasFilter then begin + CategoryFilter := Rec.GetFilter("Category Filter"); + StatusFilter := Rec.GetFilter("Status Filter"); + if Evaluate(StatusFilterOption, StatusFilter) then; + end; + end; + + var + MatrixRecords: array[32] of Record Date; + CategoryFilter: Code[20]; + StatusFilterOption: Option Open,Honored,Rejected,All; + PeriodType: Enum "Analysis Period Type"; + SetWanted: Option Initial,Previous,Same,Next; + MatrixColumnCaptions: array[32] of Text[1024]; + ColumnSet: Text[1024]; + PKFirstRecInCurrSet: Text[100]; + StatusFilter: Text[30]; + CurrSetLength: Integer; + + [Scope('OnPrem')] + procedure SetColumns(SetWanted: Option Initial,Previous,Same,Next) + var + MatrixMgt: Codeunit "Matrix Management"; + begin + MatrixMgt.GeneratePeriodMatrixData(SetWanted, 32, false, PeriodType, '', + PKFirstRecInCurrSet, MatrixColumnCaptions, ColumnSet, CurrSetLength, MatrixRecords); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankSummBillGroup.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankSummBillGroup.Report.al new file mode 100644 index 00000000000..e7c3a0a8bc2 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankSummBillGroup.Report.al @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Foundation.Address; + +report 7000004 "Bank - Summ. Bill Group" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Sales/Receivables/BankSummBillGroup.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'Bank - Summ. Bill Group'; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(BankAcc; "Bank Account") + { + CalcFields = "Posted Receiv. Bills Amt.", "Posted Receiv Bills Amt. (LCY)", "Closed Receiv. Bills Amt.", "Closed Receiv Bills Amt. (LCY)"; + RequestFilterFields = "No.", "Search Name", "Bank Acc. Posting Group"; + column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) + { + } + column(USERID; UserId) + { + } + column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) + { + } + column(BankAcc_TABLECAPTION__________BankAccTableFilter; TableCaption + ': ' + BankAccTableFilter) + { + } + column(BankAccTableFilter; BankAccTableFilter) + { + } + column(PrintAmountsInLCY; PrintAmountsInLCY) + { + } + column(BankAcc__No__; "No.") + { + } + column(BankAcc_Name; Name) + { + } + column(BankAcc__Bank_Acc__Posting_Group_; "Bank Acc. Posting Group") + { + } + column(BankAcc__Our_Contact_Code_; "Our Contact Code") + { + } + column(BankAddr_5_; BankAddr[5]) + { + } + column(BankAcc_Contact; Contact) + { + } + column(BankAcc__Phone_No__; "Phone No.") + { + } + column(BankAddr_6_; BankAddr[6]) + { + } + column(BankAddr_7_; BankAddr[7]) + { + } + column(BankAddr_4_; BankAddr[4]) + { + } + column(BankAddr_3_; BankAddr[3]) + { + } + column(BankAddr_1_; BankAddr[1]) + { + } + column(BankAddr_2_; BankAddr[2]) + { + } + column(BankAcc__Operation_Fees_Code_; "Operation Fees Code") + { + } + column(BankAcc__Last_Bill_Gr__No__; "Last Bill Gr. No.") + { + } + column(BankAcc__Date_of_Last_Post__Bill_Gr__; Format("Date of Last Post. Bill Gr.")) + { + } + column(PostedBillAmt; PostedBillAmt) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(ClosedBillAmt; ClosedBillAmt) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(BankAcc__Currency_Code_; "Currency Code") + { + } + column(PostedBillAmt_Control5; PostedBillAmt) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(ClosedBillAmt_Control6; ClosedBillAmt) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Bank___Summ__Bill_GroupCaption; Bank___Summ__Bill_GroupCaptionLbl) + { + } + column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) + { + } + column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) + { + } + column(BankAcc__No__Caption; FieldCaption("No.")) + { + } + column(BankAcc_NameCaption; FieldCaption(Name)) + { + } + column(BankAcc__Bank_Acc__Posting_Group_Caption; FieldCaption("Bank Acc. Posting Group")) + { + } + column(BankAcc__Our_Contact_Code_Caption; FieldCaption("Our Contact Code")) + { + } + column(BankAcc__Operation_Fees_Code_Caption; FieldCaption("Operation Fees Code")) + { + } + column(BankAcc__Last_Bill_Gr__No__Caption; FieldCaption("Last Bill Gr. No.")) + { + } + column(BankAcc__Date_of_Last_Post__Bill_Gr__Caption; BankAcc__Date_of_Last_Post__Bill_Gr__CaptionLbl) + { + } + column(PostedBillAmtCaption; PostedBillAmtCaptionLbl) + { + } + column(ClosedBillAmtCaption; ClosedBillAmtCaptionLbl) + { + } + column(BankAcc_ContactCaption; FieldCaption(Contact)) + { + } + column(BankAcc__Phone_No__Caption; FieldCaption("Phone No.")) + { + } + column(BankAcc__Currency_Code_Caption; BankAcc__Currency_Code_CaptionLbl) + { + } + column(PostedBillAmt_Control5Caption; PostedBillAmt_Control5CaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + FormatAddress.FormatAddr( + BankAddr, Name, "Name 2", '', Address, "Address 2", + City, "Post Code", County, "Country/Region Code"); + + if PrintAmountsInLCY then begin + PostedBillAmt := "Posted Receiv Bills Amt. (LCY)"; + ClosedBillAmt := "Closed Receiv Bills Amt. (LCY)"; + end else begin + PostedBillAmt := "Posted Receiv. Bills Amt."; + ClosedBillAmt := "Closed Receiv. Bills Amt."; + end; + end; + + trigger OnPreDataItem() + begin + Clear(PostedBillAmt); + Clear(ClosedBillAmt); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PrintAmountsInLCY; PrintAmountsInLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show amounts in LCY'; + ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnPreReport() + begin + BankAccTableFilter := BankAcc.GetFilters(); + end; + + var + FormatAddress: Codeunit "Format Address"; + BankAddr: array[8] of Text[100]; + BankAccTableFilter: Text[250]; + PrintAmountsInLCY: Boolean; + ClosedBillAmt: Decimal; + PostedBillAmt: Decimal; + Bank___Summ__Bill_GroupCaptionLbl: Label 'Bank - Summ. Bill Group'; + CurrReport_PAGENOCaptionLbl: Label 'Page'; + All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; + BankAcc__Date_of_Last_Post__Bill_Gr__CaptionLbl: Label 'Date of Last Post. Bill Gr.'; + PostedBillAmtCaptionLbl: Label 'Posted Receiv. Bills Amt.'; + ClosedBillAmtCaptionLbl: Label 'Closed Receiv. Bills Amt.'; + BankAcc__Currency_Code_CaptionLbl: Label 'Currency Code'; + PostedBillAmt_Control5CaptionLbl: Label 'Total'; + + [Scope('OnPrem')] + procedure GetCurrencyCode(): Code[10] + begin + if PrintAmountsInLCY then + exit(''); + + exit(BankAcc."Currency Code"); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankSummBillGroup.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankSummBillGroup.rdlc new file mode 100644 index 00000000000..ec5f963f918 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BankSummBillGroup.rdlc @@ -0,0 +1,2185 @@ + + + 0 + + + + SQL + + + None + 9cdb8cbc-65f6-479d-b53c-6767c14854f8 + + + + + + + + + + + 1.7cm + + + 3cm + + + 1.65cm + + + 1.65cm + + + 1.65cm + + + 1.65cm + + + 1.65cm + + + 1.5cm + + + 1.9cm + + + 1.9cm + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox39 + 52 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + =First(Fields!BankAcc_TABLECAPTION__________BankAccTableFilter.Value) + + + + + + textbox29 + 51 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox16 + 50 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + true + + + + + =First(Fields!All_amounts_are_in_LCYCaption.Value) + + + + + + textbox6 + 49 + + + 4 + + + + + + + + + true + true + + + + + + + + + + + textbox10 + 48 + + + 6 + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!BankAcc__No__Caption.Value) + + + + + + 47 + + + + + + + + true + + + + + =First(Fields!BankAcc_NameCaption.Value) + + + + + + 46 + + + 2 + + + + + + + true + + + + + =First(Fields!BankAcc__Bank_Acc__Posting_Group_Caption.Value) + + + + + + 45 + + + + + + + + true + + + + + =First(Fields!BankAcc__Our_Contact_Code_Caption.Value) + + + + + + 44 + + + + + + + + true + + + + + =First(Fields!BankAcc__Operation_Fees_Code_Caption.Value) + + + + + + 43 + + + + + + + + true + + + + + =First(Fields!BankAcc__Last_Bill_Gr__No__Caption.Value) + + + + + + 42 + + + + + + + + true + + + + + =First(Fields!BankAcc__Date_of_Last_Post__Bill_Gr__Caption.Value) + + + + + + + 41 + + + + + + + + true + + + + + =First(Fields!PostedBillAmtCaption.Value) + + + + + + + 40 + + + + + + + + true + + + + + =First(Fields!ClosedBillAmtCaption.Value) + + + + + + + 39 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__No__.Value + + + + + + + 37 + + + + + + + + true + + + + + =Fields!BankAcc_Name.Value + + + + + + 36 + + + 2 + + + + + + + true + + + + + =Fields!BankAcc__Bank_Acc__Posting_Group_.Value + + + + + + 35 + + + + + + + + true + + + + + =Fields!BankAcc__Our_Contact_Code_.Value + + + + + + 34 + + + + + + + + true + + + + + =Fields!BankAcc__Operation_Fees_Code_.Value + + + + + + 33 + + + + + + + + true + + + + + =Fields!BankAcc__Last_Bill_Gr__No__.Value + + + + + + + 32 + + + + + + + + true + + + + + =Fields!BankAcc__Date_of_Last_Post__Bill_Gr__.Value + + + + + + 31 + + + + + + + + true + true + + + + + =Fields!PostedBillAmt.Value + + + + + + 30 + + + + + + + + true + true + + + + + =Fields!ClosedBillAmt.Value + + + + + + 29 + + + + + + + + 0.423cm + + + + + true + true + + + + + + + + + + + textbox23 + 28 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAddr_1_.Value + + + + + + 27 + + + 2 + + + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAddr_2_.Value + + + + + + 25 + + + 2 + + + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAddr_3_.Value + + + + + + 23 + + + 2 + + + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAddr_4_.Value + + + + + + 21 + + + 2 + + + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAddr_5_.Value + + + + + + 19 + + + 2 + + + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAddr_6_.Value + + + + + + 17 + + + 2 + + + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAddr_7_.Value + + + + + + 15 + + + 2 + + + + + + + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc_ContactCaption.Value + + + + + + 13 + + + + + + + + true + + + + + =Fields!BankAcc_Contact.Value + + + + + + 12 + + + + + + + + true + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__Phone_No__Caption.Value + + + + + + 10 + + + + + + + + true + + + + + =Fields!BankAcc__Phone_No__.Value + + + + + + 9 + + + + + + + + true + true + + + + + + + + 8 + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__Currency_Code_Caption.Value + + + + + + 7 + + + + + + + + true + + + + + =Fields!BankAcc__Currency_Code_.Value + + + + + + 6 + + + + + + + + true + true + + + + + + + + 8 + + + + + + + + + + + + + 0.846cm + + + + + true + true + + + + + + + + + + + textbox59 + + + 10 + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!PostedBillAmt_Control5Caption.Value) + + + + + + 4 + + + + + + + + true + true + + + + + + + + 7 + + + + + + + + + + + + true + true + + + + + =Sum(Fields!PostedBillAmt.Value) + + + + + + 2 + + + + + + + + true + true + + + + + =Sum(Fields!ClosedBillAmt.Value) + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) + + After + true + + + + =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) + + After + true + + + + =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) + + After + true + + + + =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) + + After + true + + + After + true + + + After + true + + + + Detail + + + + + + + + + + + + + + + + + Detail_Collection + Output + true + + + Before + true + + + + DataSet_Result + 1.32275cm + 6 + + + true + true + + + + + =User!UserID + + + + + + + 0.84628cm + 14.9cm + 0.423cm + 3.25cm + 5 + + + + true + + + + + =Fields!FORMAT_TODAY_0_4_.Value + + + + + + + 0.00028cm + 15cm + 0.423cm + 3.15cm + 3 + + + + true + + + + + =Fields!COMPANYNAME.Value + + + + + + 0.42328cm + 0.423cm + 7.5cm + 2 + + + + true + + + + + =Fields!Bank___Summ__Bill_GroupCaption.Value + + + + + + 0.00028cm + 0.423cm + 7.5cm + 1 + + + + true + + + + + =Fields!CurrReport_PAGENOCaption.Value + + + + + + 0.42328cm + 16.95cm + 0.423cm + 0.75cm + + + + 10.62875cm + + 18.25cm + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + + =User!Language + true + Invalid + faa0a980-97e6-4165-978f-6170e9bd36cf + + + + + COMPANYNAME + + + USERID + + + FORMAT_TODAY_0_4_ + + + BankAcc_TABLECAPTION__________BankAccTableFilter + + + BankAccTableFilter + + + PrintAmountsInLCY + + + BankAcc__No__ + + + BankAcc_Name + + + BankAcc__Bank_Acc__Posting_Group_ + + + BankAcc__Our_Contact_Code_ + + + BankAddr_5_ + + + BankAcc_Contact + + + BankAcc__Phone_No__ + + + BankAddr_6_ + + + BankAddr_7_ + + + BankAddr_4_ + + + BankAddr_3_ + + + BankAddr_1_ + + + BankAddr_2_ + + + BankAcc__Operation_Fees_Code_ + + + BankAcc__Last_Bill_Gr__No__ + + + BankAcc__Date_of_Last_Post__Bill_Gr__ + + + PostedBillAmt + + + PostedBillAmtFormat + + + ClosedBillAmt + + + ClosedBillAmtFormat + + + BankAcc__Currency_Code_ + + + PostedBillAmt_Control5 + + + PostedBillAmt_Control5Format + + + ClosedBillAmt_Control6 + + + ClosedBillAmt_Control6Format + + + Bank___Summ__Bill_GroupCaption + + + CurrReport_PAGENOCaption + + + All_amounts_are_in_LCYCaption + + + BankAcc__No__Caption + + + BankAcc_NameCaption + + + BankAcc__Bank_Acc__Posting_Group_Caption + + + BankAcc__Our_Contact_Code_Caption + + + BankAcc__Operation_Fees_Code_Caption + + + BankAcc__Last_Bill_Gr__No__Caption + + + BankAcc__Date_of_Last_Post__Bill_Gr__Caption + + + PostedBillAmtCaption + + + ClosedBillAmtCaption + + + BankAcc_ContactCaption + + + BankAcc__Phone_No__Caption + + + BankAcc__Currency_Code_Caption + + + PostedBillAmt_Control5Caption + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BatchSettlPostedBillGrs.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BatchSettlPostedBillGrs.Report.al new file mode 100644 index 00000000000..3f42543db09 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BatchSettlPostedBillGrs.Report.al @@ -0,0 +1,555 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Ledger; +using Microsoft.Finance.GeneralLedger.Posting; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Purchases.Payables; +using Microsoft.Sales.History; + +report 7000086 "Batch Settl. Posted Bill Grs." +{ + Caption = 'Batch Settl. Posted Bill Grs.'; + Permissions = TableData "Cust. Ledger Entry" = imd, + TableData "Vendor Ledger Entry" = imd, + TableData "G/L Register" = m, + TableData "Posted Cartera Doc." = imd, + TableData "Closed Cartera Doc." = imd, + TableData "Posted Bill Group" = imd, + TableData "Closed Bill Group" = imd; + ProcessingOnly = true; + + dataset + { + dataitem(PostedBillGr; "Posted Bill Group") + { + DataItemTableView = sorting("No.") order(ascending); + dataitem(PostedDoc; "Posted Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where(Status = const(Open), Type = const(Receivable)); + + trigger OnAfterGetRecord() + var + FromJnl: Boolean; + begin + IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("No."); + BankAcc.Get(PostedBillGr."Bank Account No."); + OnReadPostedBillGroupOnAfterGetBankAcc(BankAcc); + Delay := BankAcc."Delay for Notices"; + OnReadPostedBillGroupOnAfterSetDelay(BankAcc, Delay, PostedBillGr); + + if DueOnly and (PostingDate < "Due Date" + Delay) then + CurrReport.Skip(); + + TotalDocCount := TotalDocCount + 1; + DocCount := DocCount + 1; + Window.Update(3, Round(DocCount / TotalDoc * 10000, 1)); + Window.Update(4, StrSubstNo('%1 %2', "Document Type", "Document No.")); + + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedBillGr."No."; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Customer); + CustLedgEntry.Get(PostedDoc."Entry No."); + if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then begin + GenJnlLine.Description := CopyStr( + StrSubstNo(Text1100004, PostedDoc."Document No.", PostedDoc."No."), + 1, MaxStrLen(GenJnlLine.Description)); + if GLSetup."Unrealized VAT" then begin + FromJnl := false; + if PostedDoc."From Journal" then + FromJnl := true; + ExistsNoRealVAT := GenJnlPostLine.CustFindVATSetup(VATPostingSetup, CustLedgEntry, FromJnl); + end; + end else + GenJnlLine.Description := CopyStr( + StrSubstNo(Text1100005, PostedDoc."Document No."), + 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Account No.", CustLedgEntry."Customer No."); + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, -PostedDoc."Remaining Amount"); + GenJnlLine."Applies-to Doc. Type" := CustLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := CustLedgEntry."Document No."; + GenJnlLine."Applies-to Bill No." := CustLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := CustLedgEntry."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry, PostedBillGr); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + + if ("Document Type" = "Document Type"::Bill) and + GLSetup."Unrealized VAT" and + ExistVATEntry and + (not IsRedrawn) + then begin + CustLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); + OnBeforeCustUnrealizedVAT2(PostedDoc, GenJnlLine, CustLedgEntry, PostedBillGr, NoRealVATBuffer); + CarteraManagement.CustUnrealizedVAT2( + CustLedgEntry, + CustLedgEntry."Remaining Amt. (LCY)", + GenJnlLine, + ExistVATEntry, + FirstVATEntryNo, + LastVATEntryNo, + NoRealVATBuffer, + FromJnl, + "Document No."); + OnAfterCustUnrealizedVAT2(PostedDoc, GenJnlLine, CustLedgEntry, PostedBillGr, NoRealVATBuffer); + + if NoRealVATBuffer.Find('-') then begin + repeat + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer.Account, + NoRealVATBuffer.Amount); + InsertGenJournalLine( + GenJnlLine."Account Type"::"G/L Account", + NoRealVATBuffer."Balance Account", + -NoRealVATBuffer.Amount); + until NoRealVATBuffer.Next() = 0; + NoRealVATBuffer.DeleteAll(); + end; + end; + + GroupAmount := GroupAmount + "Remaining Amount"; + GroupAmountLCY := GroupAmountLCY + "Remaining Amt. (LCY)"; + CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Honored; + CustLedgEntry.Modify(); + + if BGPOPostBuffer.Get('', '', CustLedgEntry."Entry No.") then begin + BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; + BGPOPostBuffer.Modify(); + end else begin + BGPOPostBuffer.Init(); + BGPOPostBuffer."Entry No." := CustLedgEntry."Entry No."; + BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; + BGPOPostBuffer.Insert(); + end; + + if (PostedBillGr."Dealing Type" = PostedBillGr."Dealing Type"::Discount) and + (PostedBillGr.Factoring <> PostedBillGr.Factoring::" ") + then + DiscFactLiabs(PostedDoc); + end; + + trigger OnPostDataItem() + var + CustLedgEntry2: Record "Cust. Ledger Entry"; + begin + if (DocCount = 0) or (GroupAmount = 0) then + CurrReport.Skip(); + + if PostedBillGr.Factoring = PostedBillGr.Factoring::" " then begin + CustLedgEntry2.Get(BGPOPostBuffer."Entry No."); + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedBillGr."No."; + if "Dealing Type" = "Dealing Type"::Discount then begin + BankAcc.TestField("Bank Acc. Posting Group"); + BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); + BankAccPostingGr.TestField("Liabs. for Disc. Bills Acc."); + GenJnlLine.Validate("Account No.", BankAccPostingGr."Liabs. for Disc. Bills Acc."); + end else begin + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); + GenJnlLine.Validate("Account No.", BankAcc."No."); + end; + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedBillGr."No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedBillGr."Currency Code"); + GenJnlLine.Validate(Amount, GroupAmount); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := CustLedgEntry."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry2, PostedBillGr); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + end else + FactBankAccounting(); + + if PostedBillGr."Currency Code" <> '' then + if SumLCYAmt <> 0 then begin + Currency.SetFilter(Code, PostedBillGr."Currency Code"); + Currency.FindFirst(); + if SumLCYAmt > 0 then begin + Currency.TestField("Residual Gains Account"); + Acct := Currency."Residual Gains Account"; + end else begin + Currency.TestField("Residual Losses Account"); + Acct := Currency."Residual Losses Account"; + end; + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedBillGr."No."; + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); + GenJnlLine.Validate("Account No.", Acct); + GenJnlLine.Description := Text1100010; + GenJnlLine.Validate("Currency Code", ''); + GenJnlLine.Validate(Amount, -SumLCYAmt); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine.Validate("Shortcut Dimension 1 Code", BankAcc."Global Dimension 1 Code"); + GenJnlLine.Validate("Shortcut Dimension 2 Code", BankAcc."Global Dimension 2 Code"); + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry2, PostedBillGr); + GenJnlLine.Insert(); + end; + + OnPostDataItemPostedDocOnBeforePostSettlement(GenJnlLine, PostedBillGr, PostingDate); + DocPost.PostSettlement(GenJnlLine); + GenJnlLine.DeleteAll(); + + DocPost.CloseBillGroupIfEmpty(PostedBillGr, PostingDate); + + if ExistVATEntry then begin + GLReg.FindLast(); + GLReg."From VAT Entry No." := FirstVATEntryNo; + GLReg."To VAT Entry No." := LastVATEntryNo; + GLReg.Modify(); + end; + end; + + trigger OnPreDataItem() + begin + SumLCYAmt := 0; + GenJnlLineNextNo := 0; + TotalDoc := Count; + ExistVATEntry := false; + end; + } + + trigger OnAfterGetRecord() + begin + BillGrCount := BillGrCount + 1; + Window.Update(1, Round(BillGrCount / TotalBillGr * 10000, 1)); + Window.Update(2, StrSubstNo('%1', "No.")); + Window.Update(3, 0); + GroupAmount := 0; + + TotalDisctdAmt := 0; + end; + + trigger OnPostDataItem() + begin + Window.Close(); + + Commit(); + + Message( + Text1100003, + TotalDocCount, BillGrCount, GroupAmountLCY); + end; + + trigger OnPreDataItem() + begin + DocPost.CheckPostingDate(PostingDate); + + SourceCodeSetup.Get(); + SourceCode := SourceCodeSetup."Cartera Journal"; + + GroupAmountLCY := 0; + BillGrCount := 0; + DocCount := 0; + TotalDocCount := 0; + TotalBillGr := Count; + Window.Open( + Text1100000 + + Text1100001 + + Text1100002); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(PostingDate; PostingDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Posting Date'; + NotBlank = true; + ToolTip = 'Specifies the posting date.'; + } + field(DueOnly; DueOnly) + { + ApplicationArea = Basic, Suite; + Caption = 'Due bills only'; + ToolTip = 'Specifies if you want to only include documents that have become overdue. If it does not matter if a document is overdue at the time of settlement, leave this field blank.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + trigger OnInitReport() + begin + PostingDate := WorkDate(); + end; + + trigger OnPreReport() + begin + GLSetup.Get(); + end; + + var + Text1100000: Label 'Settling @1@@@@@@@@@@@@@@@@@@@@@@@\\'; + Text1100001: Label 'Bill Groups #2###### @3@@@@@@@@@@@@@\'; + Text1100002: Label 'Receiv. Documents #4######'; + Text1100003: Label '%1 Documents in %2 Bill Groups totaling %3 (LCY) have been settled.'; + Text1100004: Label 'Receivable bill settlement %1/%2'; + Text1100005: Label 'Receivable document settlement %1'; + Text1100009: Label 'Bill Group settlement %1'; + Text1100010: Label 'Residual adjust generated by rounding Amount'; + Text1100011: Label 'Bill Group settlement %1 Customer No. %2'; + Text1100012: Label 'Receivable document settlement %1/%2'; + SourceCodeSetup: Record "Source Code Setup"; + GenJnlLine: Record "Gen. Journal Line" temporary; + CustLedgEntry: Record "Cust. Ledger Entry"; + BankAccPostingGr: Record "Bank Account Posting Group"; + BankAcc: Record "Bank Account"; + Currency: Record Currency; + GLSetup: Record "General Ledger Setup"; + GLReg: Record "G/L Register"; + VATPostingSetup: Record "VAT Posting Setup"; + DocPost: Codeunit "Document-Post"; + CarteraManagement: Codeunit CarteraManagement; + GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; + Window: Dialog; + Delay: Decimal; + SourceCode: Code[10]; + Acct: Code[20]; + DocCount: Integer; + TotalDocCount: Integer; + GroupAmount: Decimal; + GroupAmountLCY: Decimal; + GenJnlLineNextNo: Integer; + SumLCYAmt: Decimal; + TotalDisctdAmt: Decimal; + BillGrCount: Integer; + TotalBillGr: Integer; + TotalDoc: Integer; + ExistVATEntry: Boolean; + LastVATEntryNo: Integer; + FirstVATEntryNo: Integer; + IsRedrawn: Boolean; + BGPOPostBuffer: Record "BG/PO Post. Buffer" temporary; + NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; + ExistsNoRealVAT: Boolean; + + protected var + PostingDate: Date; + DueOnly: Boolean; + + [Scope('OnPrem')] + procedure DiscFactLiabs(PostedDoc2: Record "Posted Cartera Doc.") + var + Currency2: Record Currency; + DisctedAmt: Decimal; + RoundingPrec: Decimal; + begin + DisctedAmt := 0; + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + + if PostedDoc2."Currency Code" <> '' then begin + Currency2.Get(PostedDoc2."Currency Code"); + RoundingPrec := Currency2."Amount Rounding Precision"; + end else + RoundingPrec := GLSetup."Amount Rounding Precision"; + + DisctedAmt := Round(DocPost.FindDisctdAmt( + PostedDoc2."Remaining Amount", + PostedDoc2."Account No.", + PostedDoc2."Bank Account No."), RoundingPrec); + + TotalDisctdAmt := TotalDisctdAmt + DisctedAmt; + + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedBillGr."No."; + BankAcc.TestField("Bank Acc. Posting Group"); + BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); + BankAccPostingGr.TestField("Liabs. for Factoring Acc."); + GenJnlLine.Validate("Account No.", BankAccPostingGr."Liabs. for Factoring Acc."); + GenJnlLine.Description := CopyStr( + StrSubstNo(Text1100011, + PostedBillGr."No.", + PostedDoc2."Account No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedBillGr."Currency Code"); + GenJnlLine.Validate(Amount, DisctedAmt); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := PostedDoc2."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := PostedDoc2."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := PostedDoc2."Dimension Set ID"; + BGPOPostBuffer."Gain - Loss Amount (LCY)" := BGPOPostBuffer."Gain - Loss Amount (LCY)" + GenJnlLine.Amount; + BGPOPostBuffer.Modify(); + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry, PostedBillGr); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + end; + + [Scope('OnPrem')] + procedure FactBankAccounting() + var + CustLedgEntry2: Record "Cust. Ledger Entry"; + begin + case true of + PostedDoc."Dealing Type" = PostedDoc."Dealing Type"::Discount: + begin + CustLedgEntry2.Get(BGPOPostBuffer."Entry No."); + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedBillGr."No."; + BankAcc.TestField("Bank Acc. Posting Group"); + BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); + GenJnlLine.Validate("Account No.", BankAcc."No."); + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedBillGr."No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedBillGr."Currency Code"); + GenJnlLine.Validate(Amount, GroupAmount - TotalDisctdAmt); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry2."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry2."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := CustLedgEntry2."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry2, PostedBillGr); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + end; + else begin + CustLedgEntry2.Get(BGPOPostBuffer."Entry No."); + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedBillGr."No."; + BankAcc.TestField("Bank Acc. Posting Group"); + BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); + GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); + GenJnlLine.Validate("Account No.", BankAcc."No."); + GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedBillGr."No."), 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedBillGr."Currency Code"); + GenJnlLine.Validate(Amount, GroupAmount); + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry2."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry2."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := CustLedgEntry2."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry2, PostedBillGr); + GenJnlLine.Insert(); + SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; + end; + end; + end; + + local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal) + begin + GenJnlLineNextNo := GenJnlLineNextNo + 10000; + + Clear(GenJnlLine); + GenJnlLine.Init(); + GenJnlLine."Line No." := GenJnlLineNextNo; + GenJnlLine."Posting Date" := PostingDate; + GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; + GenJnlLine."Document No." := PostedBillGr."No."; + GenJnlLine."Account Type" := AccType; + GenJnlLine."Account No." := AccNo; + GenJnlLine.Description := CopyStr( + StrSubstNo(Text1100012, PostedDoc."Document No.", PostedDoc."No."), + 1, MaxStrLen(GenJnlLine.Description)); + GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); + GenJnlLine.Validate(Amount, -Amount2); + GenJnlLine."Applies-to Doc. Type" := CustLedgEntry."Document Type"; + GenJnlLine."Applies-to Doc. No." := ''; + GenJnlLine."Applies-to Bill No." := CustLedgEntry."Bill No."; + GenJnlLine."Source Code" := SourceCode; + GenJnlLine."System-Created Entry" := true; + GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry."Global Dimension 1 Code"; + GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry."Global Dimension 2 Code"; + GenJnlLine."Dimension Set ID" := CustLedgEntry."Dimension Set ID"; + OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry, PostedBillGr); + GenJnlLine.Insert(); + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCustUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var PostedBillGroup: Record "Posted Bill Group"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCustUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var PostedBillGroup: Record "Posted Bill Group"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeGenJournalLineInsert(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var CustLedgerEntry2: Record "Cust. Ledger Entry"; var PostedBillGroup: Record "Posted Bill Group") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnReadPostedBillGroupOnAfterGetBankAcc(BankAccount: Record "Bank Account") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnReadPostedBillGroupOnAfterSetDelay(var BankAccount: Record "Bank Account"; var Delay: Decimal; PostedBillGr: Record "Posted Bill Group") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnPostDataItemPostedDocOnBeforePostSettlement(var GenJournalLine: Record "Gen. Journal Line"; PostedBillGroup: Record "Posted Bill Group"; PostingDate: Date); + begin + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroup.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroup.Table.al new file mode 100644 index 00000000000..736f9f4db62 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroup.Table.al @@ -0,0 +1,514 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.DirectDebit; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; +using Microsoft.Foundation.Enums; +using Microsoft.Foundation.NoSeries; +using Microsoft.Sales.History; + +table 7000005 "Bill Group" +{ + Caption = 'Bill Group'; + DrillDownPageID = "Bill Groups List"; + LookupPageID = "Bill Groups List"; + DataClassification = CustomerContent; + + fields + { + field(2; "No."; Code[20]) + { + Caption = 'No.'; + + trigger OnValidate() + var + NoSeries: Codeunit "No. Series"; + begin + if "No." = xRec."No." then + exit; + + CheckPrinted(); + ResetPrinted(); + + CarteraSetup.Get(); + NoSeries.TestManual(CarteraSetup."Bill Group Nos."); + "No. Series" := ''; + + UpdateDescription(); + CheckNoNotUsed(); + end; + } + field(3; "Bank Account No."; Code[20]) + { + Caption = 'Bank Account No.'; + TableRelation = "Bank Account"; + + trigger OnValidate() + begin + CalcFields("Bank Account Name"); + + if "Bank Account No." = '' then + exit; + + BankAcc.Get("Bank Account No."); + BankAcc.TestField(Blocked, false); + + if BillGrIsEmpty() then begin + Validate("Currency Code", BankAcc."Currency Code"); + exit; + end; + + BankAcc.TestField("Currency Code", "Currency Code"); + + CalcFields(Amount); + if (Amount <> 0) and (Factoring = Factoring::" ") then + CarteraManagement.CheckDiscCreditLimit(Rec); + + if "Bank Account No." <> xRec."Bank Account No." then begin + CheckPrinted(); + ResetPrinted(); + end; + end; + } + field(4; "Bank Account Name"; Text[100]) + { + CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); + Caption = 'Bank Account Name'; + Editable = false; + FieldClass = FlowField; + } + field(5; "Posting Description"; Text[100]) + { + Caption = 'Posting Description'; + } + field(6; "Dealing Type"; Enum "Cartera Dealing Type") + { + Caption = 'Dealing Type'; + + trigger OnValidate() + begin + Validate("Currency Code"); + + CalcFields(Amount); + if (Factoring = Factoring::" ") and (Amount <> 0) then + CarteraManagement.CheckDiscCreditLimit(Rec); + + if "Dealing Type" <> xRec."Dealing Type" then begin + CheckPrinted(); + ResetPrinted(); + end; + end; + } + field(7; Amount; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable))); + Caption = 'Amount'; + Editable = false; + FieldClass = FlowField; + } + field(8; "Reason Code"; Code[10]) + { + Caption = 'Reason Code'; + TableRelation = "Reason Code"; + } + field(9; "No. Printed"; Integer) + { + Caption = 'No. Printed'; + } + field(10; "Posting Date"; Date) + { + Caption = 'Posting Date'; + + trigger OnValidate() + begin + if "Posting Date" <> xRec."Posting Date" then begin + CheckPrinted(); + ResetPrinted(); + end; + end; + } + field(11; Comment; Boolean) + { + CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), + Type = filter(Receivable))); + Caption = 'Comment'; + Editable = false; + FieldClass = FlowField; + } + field(12; "Category Filter"; Code[10]) + { + Caption = 'Category Filter'; + FieldClass = FlowFilter; + TableRelation = "Category Code"; + ValidateTableRelation = false; + } + field(13; "Due Date Filter"; Date) + { + Caption = 'Due Date Filter'; + FieldClass = FlowFilter; + } + field(14; "Global Dimension 1 Filter"; Code[20]) + { + CaptionClass = '1,3,1'; + Caption = 'Global Dimension 1 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(15; "Global Dimension 2 Filter"; Code[20]) + { + CaptionClass = '1,3,2'; + Caption = 'Global Dimension 2 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(16; "No. Series"; Code[20]) + { + Caption = 'No. Series'; + Editable = false; + TableRelation = "No. Series"; + } + field(33; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + TableRelation = Currency; + + trigger OnLookup() + begin + Currency.Reset(); + + if Currency.Get("Currency Code") then; + Currencies.SetRecord(Currency); + Currencies.LookupMode(true); + if ACTION::LookupOK = Currencies.RunModal() then begin + Currencies.GetRecord(Currency); + Clear(Currencies); + Validate("Currency Code", Currency.Code); + end else + Clear(Currencies); + end; + + trigger OnValidate() + begin + if BankAcc.Get("Bank Account No.") and ("Currency Code" <> BankAcc."Currency Code") + then + TestField("Currency Code", BankAcc."Currency Code"); + + if ("Currency Code" <> xRec."Currency Code") and not BillGrIsEmpty() then + FieldError("Currency Code", + StrSubstNo(Text1100003, TableCaption)); + + if "Currency Code" <> '' then begin + Currency.Reset(); + if "Dealing Type" = "Dealing Type"::Discount then + Currency.SetRange("Bill Groups - Discount", true) + else + Currency.SetRange("Bill Groups - Collection", true); + Currency.Code := "Currency Code"; + if not Currency.Find() then + Error( + Text1100004, + "Currency Code"); + end; + + if "Currency Code" <> xRec."Currency Code" then begin + CheckPrinted(); + ResetPrinted(); + end; + end; + } + field(34; "Amount (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + "Category Code" = field("Category Filter"), + "Due Date" = field("Due Date Filter"), + Type = const(Receivable))); + Caption = 'Amount (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(39; Factoring; Option) + { + Caption = 'Factoring'; + OptionCaption = ' ,Unrisked,Risked'; + OptionMembers = " ",Unrisked,Risked; + + trigger OnValidate() + begin + Doc.Reset(); + Doc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place, "Document Type"); + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); + if Factoring = Factoring::" " then begin + Doc.SetFilter("Document Type", '<>%1', Doc."Document Type"::Bill); + if Doc.FindFirst() then + Error(Text1100005); + end else begin + Doc.SetFilter("Document Type", '%1', Doc."Document Type"::Bill); + if Doc.FindFirst() then + Error(Text1100006); + end; + end; + } + field(1200; "Partner Type"; Enum "Partner Type") + { + Caption = 'Partner Type'; + } + } + + keys + { + key(Key1; "No.") + { + Clustered = true; + } + key(Key2; "Bank Account No.") + { + } + } + + fieldgroups + { + } + + trigger OnDelete() + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No."); + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); + if Doc.FindFirst() then + Error(Text1100002); + + BGPOCommentLine.SetRange("BG/PO No.", "No."); + BGPOCommentLine.DeleteAll(); + end; + + trigger OnInsert() + var + NoSeries: Codeunit "No. Series"; + begin + if "No." = '' then begin + CarteraSetup.Get(); + CarteraSetup.TestField("Bill Group Nos."); + "No. Series" := CarteraSetup."Bill Group Nos."; + if NoSeries.AreRelated("No. Series", xRec."No. Series") then + "No. Series" := xRec."No. Series"; + "No." := NoSeries.GetNextNo("No. Series"); + end; + + if GetFilter("Bank Account No.") <> '' then + if GetRangeMin("Bank Account No.") = GetRangeMax("Bank Account No.") then begin + Option := StrMenu(Text1100000); + case Option of + 0: + Error(Text1100001, TableCaption); + 1: + "Dealing Type" := "Dealing Type"::Collection; + 2: + "Dealing Type" := "Dealing Type"::Discount; + end; + BankAcc.Get(GetRangeMin("Bank Account No.")); + Validate("Currency Code", BankAcc."Currency Code"); + Validate("Bank Account No.", BankAcc."No."); + end; + + CheckNoNotUsed(); + UpdateDescription(); + "Posting Date" := WorkDate(); + end; + + var + Text1100000: Label '&Collection,&Discount'; + Text1100001: Label 'The creation of a new %1 was cancelled by the user'; + Text1100002: Label 'This Bill Group is not empty. Remove all its bills and try again.'; + Text1100003: Label 'can only be changed when the %1 is empty'; + Text1100004: Label 'The operation is not allowed for bill groups using %1. Check your currency setup.'; + Text1100005: Label 'Invoices should be removed.'; + Text1100006: Label 'Bills should be removed.'; + Text1100007: Label 'This bill group has already been printed. Proceed anyway?'; + Text1100008: Label 'The update has been interrupted by the user.'; + Text1100009: Label 'Bill Group'; + Text1100010: Label ' is currently in use in a Posted Bill Group.'; + Text1100011: Label ' is currently in use in a Closed Bill Group.'; + Text1100012: Label 'untitled'; + BillGr: Record "Bill Group"; + PostedBillGr: Record "Posted Bill Group"; + ClosedBillGr: Record "Closed Bill Group"; + Doc: Record "Cartera Doc."; + CarteraSetup: Record "Cartera Setup"; + Currency: Record Currency; + BankAcc: Record "Bank Account"; + BGPOCommentLine: Record "BG/PO Comment Line"; + Currencies: Page Currencies; + CarteraManagement: Codeunit CarteraManagement; + Option: Integer; + SilentDirectDebitFormat: Option " ",Standard,N58; + DirectDebitOptionTxt: Label 'Direct Debit'; + InvoiceDiscountingOptionTxt: Label 'Invoice Discounting'; + InstructionTxt: Label 'Select which format to use.'; + DirectDebitFormatSilentlySelected: Boolean; + + [Scope('OnPrem')] + procedure AssistEdit(OldBillGr: Record "Bill Group"): Boolean + var + NoSeries: Codeunit "No. Series"; + begin + BillGr := Rec; + CarteraSetup.Get(); + CarteraSetup.TestField("Bill Group Nos."); + if NoSeries.LookupRelatedNoSeries(CarteraSetup."Bill Group Nos.", OldBillGr."No. Series", BillGr."No. Series") then begin + BillGr."No." := NoSeries.GetNextNo(BillGr."No. Series"); + Rec := BillGr; + exit(true); + end; + end; + + local procedure CheckPrinted() + begin + if "No. Printed" <> 0 then + if not Confirm(Text1100007) then + Error(Text1100008); + end; + + [Scope('OnPrem')] + procedure ResetPrinted() + begin + "No. Printed" := 0; + end; + + local procedure UpdateDescription() + begin + "Posting Description" := Text1100009 + ' ' + "No."; + end; + + local procedure CheckNoNotUsed() + begin + if PostedBillGr.Get("No.") then + FieldError("No.", PostedBillGr."No." + Text1100010); + if ClosedBillGr.Get("No.") then + FieldError("No.", ClosedBillGr."No." + Text1100011); + end; + + [Scope('OnPrem')] + procedure PrintRecords(ShowRequestForm: Boolean) + var + CarteraReportSelection: Record "Cartera Report Selections"; + begin + BillGr.Copy(Rec); + CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Bill Group"); + CarteraReportSelection.SetFilter("Report ID", '<>0'); + CarteraReportSelection.Find('-'); + repeat + REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, BillGr); + until CarteraReportSelection.Next() = 0; + end; + + local procedure BillGrIsEmpty(): Boolean + begin + Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No."); + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); + exit(not Doc.FindFirst()) + end; + + procedure Caption(): Text + begin + if "No." = '' then + exit(Text1100012); + CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); + end; + + [Scope('OnPrem')] + procedure ExportToFile() + var + DirectDebitCollection: Record "Direct Debit Collection"; + DirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; + BankAccount: Record "Bank Account"; + begin + DirectDebitCollection.CreateRecord("No.", "Bank Account No.", "Partner Type"); + DirectDebitCollection."Source Table ID" := DATABASE::"Bill Group"; + DirectDebitCollection.Modify(); + CheckSEPADirectDebitFormat(DirectDebitCollection); + BankAccount.Get("Bank Account No."); + Commit(); + DirectDebitCollectionEntry.SetRange("Direct Debit Collection No.", DirectDebitCollection."No."); + RunFileExportCodeunit(BankAccount.GetDDExportCodeunitID(), DirectDebitCollection."No.", DirectDebitCollectionEntry); + DeleteDirectDebitCollection(DirectDebitCollection."No."); + end; + + [Scope('OnPrem')] + procedure RunFileExportCodeunit(CodeunitID: Integer; DirectDebitCollectionNo: Integer; var DirectDebitCollectionEntry: Record "Direct Debit Collection Entry") + var + LastError: Text; + begin + if not CODEUNIT.Run(CodeunitID, DirectDebitCollectionEntry) then begin + LastError := GetLastErrorText; + DeleteDirectDebitCollection(DirectDebitCollectionNo); + Commit(); + Error(LastError); + end; + end; + + [Scope('OnPrem')] + procedure DeleteDirectDebitCollection(DirectDebitCollectionNo: Integer) + var + DirectDebitCollection: Record "Direct Debit Collection"; + begin + if DirectDebitCollection.Get(DirectDebitCollectionNo) then + DirectDebitCollection.Delete(true); + end; + + [Scope('OnPrem')] + procedure SelectDirectDebitFormatSilently(NewDirectDebitFormat: Option) + begin + SilentDirectDebitFormat := NewDirectDebitFormat; + DirectDebitFormatSilentlySelected := true; + end; + + local procedure CheckSEPADirectDebitFormat(var DirectDebitCollection: Record "Direct Debit Collection") + var + BankAccount: Record "Bank Account"; + DirectDebitFormat: Option; + Selection: Integer; + begin + BankAccount.Get("Bank Account No."); + if BankAccount.GetDDExportCodeunitID() = CODEUNIT::"SEPA DD-Export File" then begin + if not DirectDebitFormatSilentlySelected then begin + Selection := StrMenu(StrSubstNo('%1,%2', DirectDebitOptionTxt, InvoiceDiscountingOptionTxt), 1, InstructionTxt); + + if Selection = 0 then + exit; + + case Selection of + 1: + DirectDebitFormat := DirectDebitCollection."Direct Debit Format"::Standard; + 2: + DirectDebitFormat := DirectDebitCollection."Direct Debit Format"::N58; + end; + end else + DirectDebitFormat := SilentDirectDebitFormat; + + DirectDebitCollection."Direct Debit Format" := DirectDebitFormat; + DirectDebitCollection.Modify(); + end; + end; +} diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupListing.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupListing.Report.al new file mode 100644 index 00000000000..b5661d75748 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupListing.Report.al @@ -0,0 +1,434 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.Utilities; + +report 7000000 "Bill Group Listing" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Sales/Receivables/BillGroupListing.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'Bill Group Listing'; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(BillGr; "Bill Group") + { + DataItemTableView = sorting("No."); + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + column(BillGr_No_; "No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(BillGr__No__; BillGr."No.") + { + } + column(STRSUBSTNO_Text1100003_CopyText_; StrSubstNo(Text1100003, CopyText)) + { + } + column(CompanyAddr_1_; CompanyAddr[1]) + { + } + column(CompanyAddr_2_; CompanyAddr[2]) + { + } + column(CompanyAddr_3_; CompanyAddr[3]) + { + } + column(CompanyAddr_4_; CompanyAddr[4]) + { + } + column(CompanyAddr_5_; CompanyAddr[5]) + { + } + column(CompanyAddr_6_; CompanyAddr[6]) + { + } + column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") + { + } + column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") + { + } + column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") + { + } + column(BillGr__Posting_Date_; Format(BillGr."Posting Date")) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(BillGr__Currency_Code_; BillGr."Currency Code") + { + } + column(Operation; Operation) + { + } + column(FactoringType; FactoringType) + { + } + column(OutputNo; OutputNo) + { + } + column(PrintAmountsInLCY; PrintAmountsInLCY) + { + } + column(PageLoop_Number; Number) + { + } + column(BillGr__No__Caption; BillGr__No__CaptionLbl) + { + } + column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) + { + } + column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) + { + } + column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) + { + } + column(BillGr__Posting_Date_Caption; BillGr__Posting_Date_CaptionLbl) + { + } + column(BillGr__Currency_Code_Caption; BillGr__Currency_Code_CaptionLbl) + { + } + column(PageCaption; PageCaptionLbl) + { + } + dataitem("Cartera Doc."; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = BillGr; + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Receivable)); + column(BillGrAmount; BillGrAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(BillGrAmount_Control23; BillGrAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Cust_City; Cust.City) + { + } + column(Cust_County; Cust.County) + { + } + column(Cust__Post_Code_; Cust."Post Code") + { + } + column(Cust_Name; Cust.Name) + { + } + column(Cartera_Doc___Account_No__; "Account No.") + { + } + column(Cartera_Doc___Document_No__; "Document No.") + { + } + column(Cartera_Doc___Due_Date_; Format("Due Date")) + { + } + column(Cartera_Doc___Document_Type_; "Document Type") + { + } + column(Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill; "Document Type" <> "Document Type"::Bill) + { + } + column(Cust_Name_Control28; Cust.Name) + { + } + column(Cust_City_Control30; Cust.City) + { + } + column(BillGrAmount_Control31; BillGrAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Cust_County_Control35; Cust.County) + { + } + column(Cartera_Doc___Document_No___Control3; "Document No.") + { + } + column(Cartera_Doc___No__; "No.") + { + } + column(Cust__Post_Code__Control9; Cust."Post Code") + { + } + column(Cartera_Doc___Due_Date__Control8; Format("Due Date")) + { + } + column(Cartera_Doc___Account_No___Control1; "Account No.") + { + } + column(Cartera_Doc___Document_Type__Control66; "Document Type") + { + } + column(Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill; "Document Type" = "Document Type"::Bill) + { + } + column(BillGrAmount_Control36; BillGrAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(BillGrAmount_Control39; BillGrAmount) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(Cartera_Doc__Type; Type) + { + } + column(Cartera_Doc__Entry_No_; "Entry No.") + { + } + column(Cartera_Doc__Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") + { + } + column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) + { + } + column(Cartera_Doc___Account_No___Control1Caption; Cartera_Doc___Account_No___Control1CaptionLbl) + { + } + column(Cust_Name_Control28Caption; Cust_Name_Control28CaptionLbl) + { + } + column(Cust__Post_Code__Control9Caption; Cust__Post_Code__Control9CaptionLbl) + { + } + column(Cust_City_Control30Caption; Cust_City_Control30CaptionLbl) + { + } + column(BillGrAmount_Control31Caption; BillGrAmount_Control31CaptionLbl) + { + } + column(Cust_County_Control35Caption; Cust_County_Control35CaptionLbl) + { + } + column(Cartera_Doc___Due_Date__Control8Caption; Cartera_Doc___Due_Date__Control8CaptionLbl) + { + } + column(Bill_No_Caption; Bill_No_CaptionLbl) + { + } + column(Document_No_Caption; Document_No_CaptionLbl) + { + } + column(Cartera_Doc___Document_Type__Control66Caption; FieldCaption("Document Type")) + { + } + column(ContinuedCaption; ContinuedCaptionLbl) + { + } + column(EmptyStringCaption; EmptyStringCaptionLbl) + { + } + column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + Cust.Get("Account No."); + + if PrintAmountsInLCY then + BillGrAmount := "Remaining Amt. (LCY)" + else + BillGrAmount := "Remaining Amount"; + end; + + trigger OnPreDataItem() + begin + Clear(BillGrAmount); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then + CopyText := Text1100002; + OutputNo := OutputNo + 1; + end; + + trigger OnPreDataItem() + begin + NoOfLoops := Abs(NoOfCopies) + 1; + CopyText := ''; + SetRange(Number, 1, NoOfLoops); + OutputNo := 1; + end; + } + + trigger OnAfterGetRecord() + begin + if "Dealing Type" = "Dealing Type"::Discount then + Operation := Text1100000 + else + Operation := Text1100001; + FactoringType := GetFactoringType(); + + BankAcc.Get(BillGr."Bank Account No."); + FormatAddress.FormatAddr( + BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", + BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); + + if not CurrReport.Preview then + PrintCounter.PrintCounter(DATABASE::"Bill Group", "No."); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + FormatAddress.Company(CompanyAddr, CompanyInfo); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Copies'; + ToolTip = 'Specifies how many copies of the document to print.'; + } + field(PrintAmountsInLCY; PrintAmountsInLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show Amounts in LCY'; + ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + Text1100000: Label 'For Discount'; + Text1100001: Label 'For Collection'; + Text1100002: Label 'COPY'; + Text1100003: Label 'Bill Group %1'; + Text1100005: Label 'Risked Factoring'; + Text1100006: Label 'Unrisked Factoring'; + CompanyInfo: Record "Company Information"; + BankAcc: Record "Bank Account"; + Cust: Record Customer; + FormatAddress: Codeunit "Format Address"; + PrintCounter: Codeunit "BG/PO-Post and Print"; + BankAccAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + Operation: Text[80]; + NoOfLoops: Integer; + NoOfCopies: Integer; + CopyText: Text[30]; + PrintAmountsInLCY: Boolean; + BillGrAmount: Decimal; + FactoringType: Text[30]; + OutputNo: Integer; + BillGr__No__CaptionLbl: Label 'Bill Group No.'; + CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; + CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; + CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; + BillGr__Posting_Date_CaptionLbl: Label 'Date'; + BillGr__Currency_Code_CaptionLbl: Label 'Currency Code'; + PageCaptionLbl: Label 'Page'; + All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; + Cartera_Doc___Account_No___Control1CaptionLbl: Label 'Customer No.'; + Cust_Name_Control28CaptionLbl: Label 'Name'; + Cust__Post_Code__Control9CaptionLbl: Label 'Post Code'; + Cust_City_Control30CaptionLbl: Label 'City /'; + BillGrAmount_Control31CaptionLbl: Label 'Remaining Amount'; + Cust_County_Control35CaptionLbl: Label 'County'; + Cartera_Doc___Due_Date__Control8CaptionLbl: Label 'Due Date'; + Bill_No_CaptionLbl: Label 'Bill No.'; + Document_No_CaptionLbl: Label 'Document No.'; + ContinuedCaptionLbl: Label 'Continued'; + EmptyStringCaptionLbl: Label '/', Locked = true; + ContinuedCaption_Control15Lbl: Label 'Continued'; + TotalCaptionLbl: Label 'Total'; + + [Scope('OnPrem')] + procedure GetCurrencyCode(): Code[10] + begin + if PrintAmountsInLCY then + exit(''); + + exit("Cartera Doc."."Currency Code"); + end; + + [Scope('OnPrem')] + procedure GetFactoringType(): Text[30] + begin + if BillGr.Factoring <> BillGr.Factoring::" " then begin + if BillGr.Factoring = BillGr.Factoring::Risked then + exit(Text1100005); + + exit(Text1100006); + end; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupListing.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupListing.rdlc new file mode 100644 index 00000000000..46f714f4bfb --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupListing.rdlc @@ -0,0 +1,2306 @@ + + + 0 + + + + SQL + + + None + bd53c71a-0fd0-4847-8d06-a3ee23d671d9 + + + + + + + + + + + 17.95cm + + + + + 12.267cm + + + + + + + + + + 1.8cm + + + 1.4cm + + + 1.7cm + + + 0.9cm + + + 2cm + + + 3.5cm + + + 1.65cm + + + 2.8cm + + + 2.2cm + + + + + 0.423cm + + + + + true + + + + + =First(Fields!All_amounts_are_in_LCYCaption.Value) + + + + + + All_amounts_are_in_LCYCaption + 38 + + + 6 + + + + + + + + + + + true + + + + + + + + + + + textbox37 + 37 + + + 3 + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!Cartera_Doc___Due_Date__Control8Caption.Value) + + + + + + + 36 + + + + + + + + true + + + + + =First(Fields!Cartera_Doc___Document_Type__Control66Caption.Value) + + + + + + 35 + + + + + + + + true + + + + + =First(Fields!Document_No_Caption.Value) + + + + + + + 34 + + + + + + + + true + + + + + =First(Fields!Bill_No_Caption.Value) + + + + + + + 33 + + + + + + + + true + + + + + =First(Fields!Cartera_Doc___Account_No___Control1Caption.Value) + + + + + + + 32 + + + + + + + + true + + + + + =First(Fields!Cust_Name_Control28Caption.Value) + + + + + + 31 + + + + + + + + true + + + + + =First(Fields!Cust__Post_Code__Control9Caption.Value) + + + + + + 30 + + + + + + + + true + + + + + =First(Fields!Cust_City_Control30Caption.Value)+ Chr(10) + First(Fields!Cust_County_Control35Caption.Value) + + + + + + 29 + + =iif(Fields!Cust_City_Control30Caption.Value="",true,false) + + NoOutput + + + + + + + + true + + + + + =First(Fields!BillGrAmount_Control31Caption.Value) + + + + + + + 28 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + + textbox6 + 27 + + + 9 + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Cartera_Doc___Due_Date_.Value + + + + + + + 26 + + + + + + + + true + + + + + =Fields!Cartera_Doc___Document_Type_.Value + + + + + + 25 + + + + + + + + true + + + + + =Fields!Cartera_Doc___Document_No__.Value + + + + + + + 24 + + + + + + + + true + + + + + + + + + + + textbox35 + 23 + + + + + + + + true + + + + + =Fields!Cartera_Doc___Account_No__.Value + + + + + + + 22 + + + + + + + + true + + + + + =Fields!Cust_Name.Value + + + + + + 21 + + + + + + + + true + + + + + =Fields!Cust__Post_Code_.Value + + + + + + + 20 + + + + + + + + true + + + + + =Fields!Cust_City.Value + + + + + + 19 + + + + + + + + true + true + + + + + =Fields!BillGrAmount.Value + + + + + + 18 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + 17 + + + 7 + + + + + + + + + + + + true + + + + + =Fields!Cust_County.Value + + + + + + 16 + + + + + + + + true + + + + + + + + + + + 15 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Cartera_Doc___Due_Date_.Value + + + + + + + 14 + + + + + + + + true + + + + + =Fields!Cartera_Doc___Document_Type_.Value + + + + + + 13 + + + + + + + + true + + + + + =Fields!Cartera_Doc___Document_No__.Value + + + + + + + 12 + + + + + + + + true + + + + + =Fields!EmptyStringCaption.Value + " " + Fields!Cartera_Doc___No__.Value + + + + + + + 11 + + + + + + + + true + + + + + =Fields!Cartera_Doc___Account_No__.Value + + + + + + + 10 + + + + + + + + true + + + + + =Fields!Cust_Name.Value + + + + + + 9 + + + + + + + + true + + + + + =Fields!Cust__Post_Code_.Value + + + + + + + 8 + + + + + + + + true + + + + + =Fields!Cust_City.Value + + + + + + 7 + + + + + + + + true + true + + + + + =Fields!BillGrAmount.Value + + + + + + 6 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + 2 + + + 7 + + + + + + + + + + + + true + + + + + =Fields!Cust_County.Value + + + + + + 1 + + + + + + + + true + + + + + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox2 + + + 9 + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =First(Fields!TotalCaption.Value) + + + + + + TotalCaption + 5 + + + 4 + + + + + + + + + true + + + + + + + + + + + textbox9 + 4 + + + 4 + + + + + + + + + true + true + + + + + =Sum(Fields!BillGrAmount.Value) + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + =IIF(Fields!PrintAmountsInLCY.Value,False,True) + + After + true + true + + + After + true + true + + + After + true + true + + + + Detail + + + + + =IIF(Fields!Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill.Value,FALSE,TRUE) + + + + + =IIF(Fields!Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill.Value,FALSE,TRUE) + + + + + =IIF(Fields!Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill.Value,FALSE,TRUE) + + + + + =IIF(Fields!Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill.Value,FALSE,TRUE) + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + + DataSet_Result + 8.037cm + 29 + + + true + + + + + =First(Fields!BankAccAddr_1_.Value) + + + + + + 1.269cm + 0.423cm + 4.5cm + 28 + + + + true + + + + + =Fields!BillGr__No__.Value + + + + + + 5.499cm + 14.6cm + 0.423cm + 2.7cm + 27 + + + + true + + + + + =First(Fields!CompanyAddr_1_.Value) + + + + + + 1.269cm + 11.4cm + 0.423cm + 6.3cm + 26 + + + + true + + + + + =First(Fields!CompanyAddr_2_.Value) + + + + + + 1.692cm + 11.4cm + 0.423cm + 6.3cm + 25 + + + + true + + + + + =First(Fields!CompanyAddr_3_.Value) + + + + + + 2.115cm + 11.4cm + 0.423cm + 6.3cm + 24 + + + + true + + + + + =First(Fields!CompanyAddr_4_.Value) + + + + + + 2.538cm + 11.4cm + 0.423cm + 6.3cm + 23 + + + + true + + + + + =First(Fields!CompanyAddr_5_.Value) + + + + + + 2.961cm + 11.4cm + 0.423cm + 6.3cm + 22 + + + + true + + + + + =First(Fields!CompanyAddr_6_.Value) + + + + + + 3.384cm + 11.4cm + 0.423cm + 6.3cm + 21 + + + + true + + + + + =First(Fields!CompanyInfo__Phone_No__.Value) + + + + + + 3.807cm + 13.5cm + 0.423cm + 4.2cm + 20 + + + + true + + + + + =First(Fields!CompanyInfo__Fax_No__.Value) + + + + + + 4.23cm + 13.5cm + 0.423cm + 4.2cm + 19 + + + + true + + + + + =First(Fields!CompanyInfo__VAT_Registration_No__.Value) + + + + + + 4.653cm + 13.5cm + 0.423cm + 4.2cm + 18 + + + + true + + + + + =First(Fields!BillGr__Posting_Date_.Value) + + + + + + + 7.191cm + 14.6cm + 0.423cm + 2.99048cm + 17 + + + + true + + + + + =First(Fields!BankAccAddr_4_.Value) + + + + + + 2.538cm + 0.423cm + 4.5cm + 16 + + + + true + + + + + =First(Fields!BankAccAddr_5_.Value) + + + + + + 2.961cm + 0.423cm + 4.5cm + 15 + + + + true + + + + + =First(Fields!BankAccAddr_6_.Value) + + + + + + 3.384cm + 0.423cm + 4.5cm + 14 + + + + true + + + + + =First(Fields!BankAccAddr_7_.Value) + + + + + + 3.807cm + 0.423cm + 4.5cm + 13 + + + + true + + + + + =First(Fields!BankAccAddr_3_.Value) + + + + + + 2.115cm + 0.423cm + 4.5cm + 12 + + + + true + + + + + =First(Fields!BankAccAddr_2_.Value) + + + + + + 1.692cm + 0.423cm + 4.5cm + 11 + + + + true + + + + + =First(Fields!BillGr__Currency_Code_.Value) + + + + + + 5.922cm + 14.6cm + 0.423cm + 2.7cm + 10 + + + + true + + + + + =First(Fields!Operation.Value) + + + + + + 6.345cm + 11.4cm + 0.423cm + 6.3cm + 9 + + + + true + + + + + =First(Fields!FactoringType.Value) + + + + + + 6.768cm + 11.4cm + 0.423cm + 6.3cm + 8 + + + + true + + + + + =First(Fields!BillGr__No__Caption.Value) + + + + + + 5.499cm + 11.4cm + 0.423cm + 3cm + 7 + + + + true + + + + + =First(Fields!CompanyInfo__Phone_No__Caption.Value) + + + + + + 3.807cm + 11.4cm + 0.423cm + 1.89cm + 6 + + + + true + + + + + =First(Fields!CompanyInfo__Fax_No__Caption.Value) + + + + + + 4.23cm + 11.4cm + 0.423cm + 1.89cm + 5 + + + + true + + + + + =First(Fields!CompanyInfo__VAT_Registration_No__Caption.Value) + + + + + + 4.653cm + 11.4cm + 0.423cm + 1.89cm + 4 + + + + true + + + + + =First(Fields!BillGr__Posting_Date_Caption.Value) + + + + + + 7.191cm + 11.4cm + 0.423cm + 2.96587cm + 3 + + + + true + + + + + =First(Fields!BillGr__Currency_Code_Caption.Value) + + + + + + 5.922cm + 11.4cm + 0.423cm + 3cm + 2 + + + + true + + + + + =First(Fields!STRSUBSTNO_Text1100003_CopyText_.Value) + + + + + + 11.4cm + 0.423cm + 6.3cm + 1 + + + + true + + + + + + + + + + + + + + + + + + =Fields!BillGr__No__.Value + =Fields!OutputNo.Value + + + Between + + + Output + true + + + + DataSet_Result + + End + + + + 12.267cm + + 17.95cm + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + +Shared offset as Integer +Shared newPage as Object +Shared currentgroup1 as Object +Shared currentgroup2 as Object +Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object + If NewPage + offset = pagenumber - 1 + End If + Return pagenumber - offset +End Function + +Public Function IsNewPage(group1 as Object, group2 as Object) As Boolean +newPage = FALSE +If Not (group1 = currentgroup1) + newPage = TRUE + currentgroup1 = group1 + currentgroup2 = group2 + ELSE + If Not (group2 = currentgroup2) + newPage = TRUE + currentgroup2 = group2 + End If + End If + Return newPage +End Function + + =User!Language + true + Invalid + 59a9809d-9719-4f60-98f9-91748dcfbe4c + + + + + BillGr_No_ + + + BillGr__No__ + + + STRSUBSTNO_Text1100003_CopyText_ + + + CompanyAddr_1_ + + + CompanyAddr_2_ + + + CompanyAddr_3_ + + + CompanyAddr_4_ + + + CompanyAddr_5_ + + + CompanyAddr_6_ + + + CompanyInfo__Phone_No__ + + + CompanyInfo__Fax_No__ + + + CompanyInfo__VAT_Registration_No__ + + + BillGr__Posting_Date_ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + BankAccAddr_3_ + + + BankAccAddr_2_ + + + BankAccAddr_1_ + + + BillGr__Currency_Code_ + + + Operation + + + FactoringType + + + OutputNo + + + PrintAmountsInLCY + + + PageLoop_Number + + + BillGr__No__Caption + + + CompanyInfo__Phone_No__Caption + + + CompanyInfo__Fax_No__Caption + + + CompanyInfo__VAT_Registration_No__Caption + + + BillGr__Posting_Date_Caption + + + BillGr__Currency_Code_Caption + + + PageCaption + + + BillGrAmount + + + BillGrAmountFormat + + + BillGrAmount_Control23 + + + BillGrAmount_Control23Format + + + Cust_City + + + Cust_County + + + Cust__Post_Code_ + + + Cust_Name + + + Cartera_Doc___Account_No__ + + + Cartera_Doc___Document_No__ + + + Cartera_Doc___Due_Date_ + + + Cartera_Doc___Document_Type_ + + + Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill + + + Cust_Name_Control28 + + + Cust_City_Control30 + + + BillGrAmount_Control31 + + + BillGrAmount_Control31Format + + + Cust_County_Control35 + + + Cartera_Doc___Document_No___Control3 + + + Cartera_Doc___No__ + + + Cust__Post_Code__Control9 + + + Cartera_Doc___Due_Date__Control8 + + + Cartera_Doc___Account_No___Control1 + + + Cartera_Doc___Document_Type__Control66 + + + Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill + + + BillGrAmount_Control36 + + + BillGrAmount_Control36Format + + + BillGrAmount_Control39 + + + BillGrAmount_Control39Format + + + Cartera_Doc__Type + + + Cartera_Doc__Entry_No_ + + + Cartera_Doc__Bill_Gr__Pmt__Order_No_ + + + All_amounts_are_in_LCYCaption + + + Cartera_Doc___Account_No___Control1Caption + + + Cust_Name_Control28Caption + + + Cust__Post_Code__Control9Caption + + + Cust_City_Control30Caption + + + BillGrAmount_Control31Caption + + + Cust_County_Control35Caption + + + Cartera_Doc___Due_Date__Control8Caption + + + Bill_No_Caption + + + Document_No_Caption + + + Cartera_Doc___Document_Type__Control66Caption + + + ContinuedCaption + + + EmptyStringCaption + + + ContinuedCaption_Control15 + + + TotalCaption + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupTest.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupTest.Report.al new file mode 100644 index 00000000000..608c620529b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupTest.Report.al @@ -0,0 +1,1088 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Sales.Customer; +using System.Utilities; + +report 7000008 "Bill Group - Test" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Sales/Receivables/BillGroupTest.rdlc'; + Caption = 'Bill Group - Test'; + + dataset + { + dataitem(BillGr; "Bill Group") + { + RequestFilterFields = "No."; + column(BillGr_No_; "No.") + { + } + column(BillGr_Bank_Account_No_; "Bank Account No.") + { + } + column(BillGr_Currency_Code; "Currency Code") + { + } + dataitem(PageCounter; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(USERID; UserId) + { + } + column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) + { + } + column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) + { + } + column(BillGr_TABLECAPTION__________BillGrFilter; BillGr.TableCaption + ':' + BillGrFilter) + { + } + column(BillGr_TABLECAPTION_________BillGr__No__; BillGr.TableCaption + ' ' + BillGr."No.") + { + } + column(BankAccAddr_1_; BankAccAddr[1]) + { + } + column(BankAccAddr_2_; BankAccAddr[2]) + { + } + column(BankAccAddr_3_; BankAccAddr[3]) + { + } + column(BankAccAddr_4_; BankAccAddr[4]) + { + } + column(BankAccAddr_5_; BankAccAddr[5]) + { + } + column(BankAccAddr_6_; BankAccAddr[6]) + { + } + column(BankAccAddr_7_; BankAccAddr[7]) + { + } + column(BillGr__Bank_Account_Name_; BillGr."Bank Account Name") + { + } + column(OperationText; OperationText) + { + } + column(BillGr__Posting_Date_; Format(BillGr."Posting Date")) + { + } + column(BillGr__Posting_Description_; BillGr."Posting Description") + { + } + column(PostingGroup; PostingGroup) + { + } + column(BillGr__Currency_Code_; BillGr."Currency Code") + { + } + column(FactoringType; FactoringType) + { + } + column(PageCounter_Number; Number) + { + } + column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) + { + } + column(Bill_Group___TestCaption; Bill_Group___TestCaptionLbl) + { + } + column(BillGr__Bank_Account_Name_Caption; BillGr__Bank_Account_Name_CaptionLbl) + { + } + column(OperationTextCaption; OperationTextCaptionLbl) + { + } + column(BillGr__Posting_Date_Caption; BillGr__Posting_Date_CaptionLbl) + { + } + column(BillGr__Posting_Description_Caption; BillGr__Posting_Description_CaptionLbl) + { + } + column(PostingGroupCaption; PostingGroupCaptionLbl) + { + } + column(BillGr__Currency_Code_Caption; BillGr__Currency_Code_CaptionLbl) + { + } + dataitem(HeaderErrorCounter; "Integer") + { + DataItemTableView = sorting(Number); + column(ErrorText_Number_; ErrorText[Number]) + { + } + column(HeaderErrorCounter_Number; Number) + { + } + column(ErrorText_Number_Caption; ErrorText_Number_CaptionLbl) + { + } + + trigger OnPostDataItem() + begin + ErrorCounter := 0; + end; + + trigger OnPreDataItem() + begin + SetRange(Number, 1, ErrorCounter); + end; + } + dataitem(Doc; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = BillGr; + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Receivable)); + column(Doc__Entry_No__; "Entry No.") + { + } + column(Doc__Due_Date_; Format("Due Date")) + { + } + column(Doc__Document_No__; "Document No.") + { + } + column(Doc__No__; "No.") + { + } + column(Doc__Account_No__; "Account No.") + { + } + column(Cust_Name; Cust.Name) + { + } + column(Cust__Post_Code_; Cust."Post Code") + { + } + column(Cust_City; Cust.City) + { + } + column(Cust_County; Cust.County) + { + } + column(Doc__Remaining_Amount_; "Remaining Amount") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Doc__Document_Type_; "Document Type") + { + } + column(Doc__Document_Type____Doc__Document_Type___Bill; "Document Type" = "Document Type"::Bill) + { + } + column(Cust_County_Control97; Cust.County) + { + } + column(Cust_Name_Control98; Cust.Name) + { + } + column(Cust__Post_Code__Control99; Cust."Post Code") + { + } + column(Cust_City_Control100; Cust.City) + { + } + column(Doc__Remaining_Amount__Control101; "Remaining Amount") + { + AutoFormatExpression = "Currency Code"; + AutoFormatType = 1; + } + column(Doc__Account_No___Control102; "Account No.") + { + } + column(Doc__Document_No___Control104; "Document No.") + { + } + column(Doc__Due_Date__Control105; Format("Due Date")) + { + } + column(Doc__Document_Type__Control128; "Document Type") + { + } + column(Doc__Document_Type____Doc__Document_Type___Invoice; "Document Type" = "Document Type"::Invoice) + { + } + column(Doc_Type; Type) + { + } + column(Doc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") + { + } + column(Cust_NameCaption; Cust_NameCaptionLbl) + { + } + column(Post_CodeCaption; Post_CodeCaptionLbl) + { + } + column(City__Caption; City__CaptionLbl) + { + } + column(CountyCaption; CountyCaptionLbl) + { + } + column(Doc__Due_Date_Caption; Doc__Due_Date_CaptionLbl) + { + } + column(Doc__Document_No__Caption; FieldCaption("Document No.")) + { + } + column(Doc__No__Caption; Doc__No__CaptionLbl) + { + } + column(Doc__Account_No__Caption; Doc__Account_No__CaptionLbl) + { + } + column(Doc__Remaining_Amount_Caption; FieldCaption("Remaining Amount")) + { + } + column(Doc__Document_Type__Control128Caption; FieldCaption("Document Type")) + { + } + dataitem(LineErrorCounter; "Integer") + { + DataItemTableView = sorting(Number); + column(ErrorText_Number__Control56; ErrorText[Number]) + { + } + column(LineErrorCounter_Number; Number) + { + } + column(ErrorText_Number__Control56Caption; ErrorText_Number__Control56CaptionLbl) + { + } + + trigger OnPostDataItem() + begin + ErrorCounter := 0; + end; + + trigger OnPreDataItem() + begin + SetRange(Number, 1, ErrorCounter); + end; + } + + trigger OnAfterGetRecord() + begin + Cust.Get("Account No."); + + DocCount := DocCount + 1; + + if "Collection Agent" <> "Collection Agent"::Bank then + AddError(StrSubstNo(Text1100010, FieldCaption("Collection Agent"), "Collection Agent"::Bank)); + + if "Currency Code" <> BillGr."Currency Code" then + AddError(StrSubstNo(Text1100010, FieldCaption("Currency Code"), BillGr."Currency Code")); + + if "Remaining Amt. (LCY)" = 0 then + AddError(StrSubstNo(Text1100011, FieldCaption("Remaining Amt. (LCY)"))); + + if Type <> Type::Receivable then + AddError(StrSubstNo(Text1100010, FieldCaption(Type), Type::Receivable)); + + if Accepted = Accepted::No then + AddError(StrSubstNo(Text1100012, FieldCaption(Accepted), false)); + + if (BillGr.Factoring <> BillGr.Factoring::" ") and ("Document Type" = "Document Type"::Bill) then + AddError(StrSubstNo(Text1100012, FieldCaption("Document Type"), "Document Type"::Bill)); + + if (BillGr.Factoring = BillGr.Factoring::" ") and ("Document Type" <> "Document Type"::Bill) then + AddError(StrSubstNo(Text1100010, FieldCaption("Document Type"), "Document Type"::Bill)); + + CustLedgEntry.Get("Entry No."); + CustPostingGr.Get(CustLedgEntry."Customer Posting Group"); + if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then begin + if CustPostingGr."Discted. Bills Acc." = '' then + AddError( + StrSubstNo( + Text1100013, + CustPostingGr.FieldCaption("Discted. Bills Acc."), + CustPostingGr.TableCaption(), + CustPostingGr.Code)); + AccountNo := CustPostingGr."Discted. Bills Acc."; + end else begin + if CustPostingGr."Bills on Collection Acc." = '' then + AddError( + StrSubstNo( + Text1100013, + CustPostingGr.FieldCaption("Bills on Collection Acc."), + CustPostingGr.TableCaption(), + CustPostingGr.Code)); + AccountNo := CustPostingGr."Bills on Collection Acc."; + end; + + NoOfDays := "Due Date" - BillGr."Posting Date"; + if NoOfDays < 0 then begin + NoOfDays := 0; + if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then + AddError( + Text1100014); + end; + + if CalcExpenses then begin + if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and (BillGr.Factoring = BillGr.Factoring::" ") then begin + FeeRange.CalcDiscExpensesAmt( + BankAcc2."Operation Fees Code", + BankAcc2."Currency Code", + "Remaining Amount", + "Entry No."); + FeeRange.CalcDiscInterestsAmt( + BankAcc2."Operation Fees Code", + BankAcc2."Currency Code", + NoOfDays, + "Remaining Amount", + "Entry No."); + end else + if BillGr.Factoring = BillGr.Factoring::" " then + FeeRange.CalcCollExpensesAmt( + BankAcc2."Operation Fees Code", + BankAcc2."Currency Code", + "Remaining Amount", + "Entry No."); + if BillGr.Factoring <> BillGr.Factoring::" " then begin + if BillGr.Factoring = BillGr.Factoring::Risked then + FeeRange.CalcRiskFactExpensesAmt( + BankAcc2."Operation Fees Code", + BankAcc2."Currency Code", + "Remaining Amount", + "Entry No.") + else + FeeRange.CalcUnriskFactExpensesAmt( + BankAcc2."Operation Fees Code", + BankAcc2."Currency Code", + "Remaining Amount", + "Entry No."); + + if (CustRating.Get(BankAcc2."Customer Ratings Code", BankAcc2."Currency Code", "Account No.") and + (CustRating."Risk Percentage" <> 0)) + then begin + if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then + FeeRange.CalcDiscInterestsAmt( + BankAcc2."Operation Fees Code", + BankAcc2."Currency Code", + NoOfDays, + DocPost.FindDisctdAmt("Remaining Amount", "Account No.", BillGr."Bank Account No."), + "Entry No."); + end else + if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then + AddError( + StrSubstNo( + Text1100015, + CustRating.TableCaption(), + BankAcc2.TableCaption(), + BankAcc2."No.", + BankAcc2.FieldCaption("Currency Code"), + BankAcc2."Currency Code", + Cust.TableCaption(), + Cust.FieldCaption("No."), + "Account No.")); + end; + end; + + if CheckOtherBanks then begin + if DocPostBuffer.Find('+') then; + DocPostBuffer."Entry No." := DocPostBuffer."Entry No." + 1; + DocPostBuffer."No. of Days" := NoOfDays; + DocPostBuffer.Amount := "Remaining Amt. (LCY)"; + DocPostBuffer.Insert(); + end; + + if CustPostingGr."Bills Account" = '' then + AddError( + StrSubstNo( + Text1100013, + CustPostingGr.FieldCaption("Bills Account"), + CustPostingGr.TableCaption(), + CustPostingGr.Code)); + + BalanceAccNo := CustPostingGr."Bills Account"; + if BGPOPostBuffer.Get(AccountNo, BalanceAccNo) then begin + BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; + BGPOPostBuffer.Modify(); + end else begin + BGPOPostBuffer.Account := AccountNo; + BGPOPostBuffer."Balance Account" := BalanceAccNo; + BGPOPostBuffer.Amount := "Remaining Amount"; + BGPOPostBuffer.Insert(); + end; + end; + + trigger OnPostDataItem() + begin + if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and BankAcc2.Find() then begin + if BankAcc2."Bank Acc. Posting Group" = '' then + AddError( + StrSubstNo( + Text1100016, + BankAcc2.FieldCaption("Bank Acc. Posting Group"), + BillGr.TableCaption(), + BillGr."Bank Account No.")); + if BankAccPostingGr.Get(BankAcc2."Bank Acc. Posting Group") then + if BankAccPostingGr."Liabs. for Disc. Bills Acc." = '' then + AddError( + StrSubstNo( + Text1100013, + BankAccPostingGr.FieldCaption("Liabs. for Disc. Bills Acc."), + BankAccPostingGr.TableCaption(), + BankAccPostingGr.Code)); + end; + end; + + trigger OnPreDataItem() + begin + Clear(DocPostBuffer); + + if CalcExpenses then begin + if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and + (BillGr.Factoring = BillGr.Factoring::" ") + then begin + FeeRange.InitDiscExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); + FeeRange.InitDiscInterests(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); + end else + if BillGr.Factoring = BillGr.Factoring::" " then + FeeRange.InitCollExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); + if BillGr.Factoring <> BillGr.Factoring::" " then begin + if BillGr.Factoring = BillGr.Factoring::Risked then + FeeRange.InitRiskFactExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code") + else + FeeRange.InitUnriskFactExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); + if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then begin + FeeRange.InitDiscExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); + FeeRange.InitDiscInterests(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); + end else + FeeRange.InitCollExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); + end; + end; + + DocCount := 0; + end; + } + dataitem(Total; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(DocCount; DocCount) + { + } + column(BillGr_Amount; BillGr.Amount) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(SetLabel; SetLabel()) + { + } + column(Total_Number; Number) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + BillGr.CalcFields(Amount); + end; + } + } + dataitem("Integer"; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(BillGrFactoringInt; BillGrFactoringInt) + { + } + column(BillGrDealingTypeInt; BillGrDealingTypeInt) + { + } + column(SetLabel2; SetLabel2()) + { + } + column(Integer_Number; Number) + { + } + column(FORMAT_CreditLimitExceeded__Control76Caption; FORMAT_CreditLimitExceeded__Control76CaptionLbl) + { + } + column(BankAcc__Credit_Limit_for_Discount_Caption; BankAcc.FieldCaption("Credit Limit for Discount")) + { + } + column(RiskIncGr_Control77Caption; RiskIncGr_Control77CaptionLbl) + { + } + column(BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption; BankAcc.FieldCaption("Posted Receiv. Bills Rmg. Amt.")) + { + } + column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Caption; FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70CaptionLbl) + { + } + column(FeeRange_GetTotalCollExpensesAmt_Control63Caption; FeeRange_GetTotalCollExpensesAmt_Control63CaptionLbl) + { + } + column(FeeRange_GetTotalDiscExpensesAmt_Control61Caption; FeeRange_GetTotalDiscExpensesAmt_Control61CaptionLbl) + { + } + column(FeeRange_GetTotalDiscInterestsAmt_Control60Caption; FeeRange_GetTotalDiscInterestsAmt_Control60CaptionLbl) + { + } + column(BankAcc__No__Caption; BankAcc__No__CaptionLbl) + { + } + column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Caption; FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89CaptionLbl) + { + } + column(FeeRange_GetTotalCollExpensesAmt_Control88Caption; FeeRange_GetTotalCollExpensesAmt_Control88CaptionLbl) + { + } + column(FeeRange_GetTotalDiscExpensesAmt_Control87Caption; FeeRange_GetTotalDiscExpensesAmt_Control87CaptionLbl) + { + } + column(FeeRange_GetTotalDiscInterestsAmt_Control86Caption; FeeRange_GetTotalDiscInterestsAmt_Control86CaptionLbl) + { + } + column(BankAcc__No___Control90Caption; BankAcc__No___Control90CaptionLbl) + { + } + column(BankAcc__No___Control90Caption_Control59; BankAcc__No___Control90Caption_Control59Lbl) + { + } + column(FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106; FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106Lbl) + { + } + column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_114; FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Lbl) + { + } + dataitem(BillGrBankAcc; "Bank Account") + { + DataItemLink = "No." = field("Bank Account No."); + DataItemLinkReference = BillGr; + DataItemTableView = sorting("No."); + column(FORMAT_CreditLimitExceeded_; Format(CreditLimitExceeded)) + { + } + column(BillGrBankAcc__Credit_Limit_for_Discount_; "Credit Limit for Discount") + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(RiskIncGr; RiskIncGr) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__; "Posted Receiv. Bills Rmg. Amt.") + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt; FeeRange.GetTotalCollExpensesAmt() + FeeRange.GetTotalDiscExpensesAmt() + FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalCollExpensesAmt; FeeRange.GetTotalCollExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscExpensesAmt; FeeRange.GetTotalDiscExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscInterestsAmt; FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BillGrBankAcc__No__; "No.") + { + } + column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control91; FeeRange.GetTotalCollExpensesAmt() + FeeRange.GetTotalDiscExpensesAmt() + FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalCollExpensesAmt_Control92; FeeRange.GetTotalCollExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscExpensesAmt_Control93; FeeRange.GetTotalDiscExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscInterestsAmt_Control94; FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BillGrBankAcc__No___Control95; "No.") + { + } + column(BillGrBankAcc__No___Control108; "No.") + { + } + column(FeeRange_GetTotalDiscInterestsAmt_Control109; FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalRiskFactExpensesAmt; FeeRange.GetTotalRiskFactExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt; FeeRange.GetTotalDiscInterestsAmt() + FeeRange.GetTotalRiskFactExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalUnriskFactExpensesAmt; FeeRange.GetTotalUnriskFactExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscInterestsAmt_Control112; FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BillGrBankAcc__No___Control113; "No.") + { + } + column(FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt; FeeRange.GetTotalDiscInterestsAmt() + FeeRange.GetTotalUnriskFactExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + + trigger OnAfterGetRecord() + begin + SetRange("Dealing Type Filter", 1); // Discount + CalcFields("Posted Receiv. Bills Rmg. Amt."); + if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then + RiskIncGr := "Posted Receiv. Bills Rmg. Amt." + BillGr.Amount + else + RiskIncGr := "Posted Receiv. Bills Rmg. Amt."; + CreditLimitExceeded := RiskIncGr > "Credit Limit for Discount"; + + if not CalcExpenses then + CurrReport.Break(); + end; + } + dataitem(BankAcc; "Bank Account") + { + DataItemLink = "Currency Code" = field("Currency Code"); + DataItemLinkReference = BillGr; + DataItemTableView = sorting("No."); + RequestFilterFields = "No."; + column(FeeRange_GetTotalDiscInterestsAmt_Control60; FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscExpensesAmt_Control61; FeeRange.GetTotalDiscExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalCollExpensesAmt_Control63; FeeRange.GetTotalCollExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__No__; "No.") + { + } + column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70; FeeRange.GetTotalCollExpensesAmt() + FeeRange.GetTotalDiscExpensesAmt() + FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FORMAT_CreditLimitExceeded__Control76; Format(CreditLimitExceeded)) + { + } + column(RiskIncGr_Control77; RiskIncGr) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__Posted_Receiv__Bills_Rmg__Amt__; "Posted Receiv. Bills Rmg. Amt.") + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__Credit_Limit_for_Discount_; "Credit Limit for Discount") + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscInterestsAmt_Control86; FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscExpensesAmt_Control87; FeeRange.GetTotalDiscExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalCollExpensesAmt_Control88; FeeRange.GetTotalCollExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89; FeeRange.GetTotalCollExpensesAmt() + FeeRange.GetTotalDiscExpensesAmt() + FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__No___Control90; "No.") + { + } + column(FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt_Control117; FeeRange.GetTotalDiscInterestsAmt() + FeeRange.GetTotalRiskFactExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalRiskFactExpensesAmt_Control118; FeeRange.GetTotalRiskFactExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscInterestsAmt_Control119; FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__No___Control120; "No.") + { + } + column(FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt_Control121; FeeRange.GetTotalDiscInterestsAmt() + FeeRange.GetTotalUnriskFactExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalUnriskFactExpensesAmt_Control122; FeeRange.GetTotalUnriskFactExpensesAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(FeeRange_GetTotalDiscInterestsAmt_Control123; FeeRange.GetTotalDiscInterestsAmt()) + { + AutoFormatExpression = BillGr."Currency Code"; + AutoFormatType = 1; + } + column(BankAcc__No___Control124; "No.") + { + } + column(BankAcc_Currency_Code; "Currency Code") + { + } + + trigger OnAfterGetRecord() + begin + if "No." = BillGr."Bank Account No." then + CurrReport.Skip(); + + SetRange("Dealing Type Filter", 1); // Discount + CalcFields("Posted Receiv. Bills Rmg. Amt."); + if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then + RiskIncGr := "Posted Receiv. Bills Rmg. Amt." + BillGr.Amount + else + RiskIncGr := "Posted Receiv. Bills Rmg. Amt."; + CreditLimitExceeded := RiskIncGr > "Credit Limit for Discount"; + + if not DocPostBuffer.Find('-') then + CurrReport.Skip(); + + Clear(FeeRange); + if not FeeRange.Find('=<>') then + CurrReport.Skip(); + if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then begin + FeeRange.InitDiscExpenses("Operation Fees Code", "Currency Code"); + FeeRange.InitDiscInterests("Operation Fees Code", "Currency Code"); + repeat + FeeRange.CalcDiscExpensesAmt( + "Operation Fees Code", + "Currency Code", + DocPostBuffer.Amount, + DocPostBuffer."Entry No."); + FeeRange.CalcDiscInterestsAmt( + "Operation Fees Code", + "Currency Code", + NoOfDays, + DocPostBuffer.Amount, + DocPostBuffer."Entry No."); + until DocPostBuffer.Next() = 0; + end else begin + FeeRange.InitCollExpenses("Operation Fees Code", "Currency Code"); + repeat + FeeRange.CalcCollExpensesAmt( + "Operation Fees Code", + "Currency Code", + DocPostBuffer.Amount, + DocPostBuffer."Entry No."); + until DocPostBuffer.Next() = 0; + end; + end; + } + } + + trigger OnAfterGetRecord() + begin + if "Dealing Type" = "Dealing Type"::Discount then + OperationText := Text1100000 + else + OperationText := Text1100001; + FactoringType := GetFactoringType(); + + Clear(BankAcc2); + Clear(PostingGroup); + Clear(CalcExpenses); + + if BankAcc2.Get(BillGr."Bank Account No.") then begin + if BankAcc2."Currency Code" <> BillGr."Currency Code" then + AddError( + StrSubstNo( + Text1100002, + BankAcc2.FieldCaption("Currency Code"), + BillGr."Currency Code", + BankAcc2.TableCaption, + BankAcc2."No.")); + if BankAcc2."Operation Fees Code" = '' then + AddError( + StrSubstNo( + Text1100003, + BankAcc2.FieldCaption("Operation Fees Code"), + BankAcc2.TableCaption, + BankAcc2."No.")); + if BankAcc2."Customer Ratings Code" = '' then + AddError( + StrSubstNo( + Text1100003, + BankAcc2.FieldCaption("Customer Ratings Code"), + BankAcc2.TableCaption, + BankAcc2."No.")); + if BillGr."Posting Date" <> 0D then + CalcExpenses := true; + FormatAddress.FormatAddr( + BankAccAddr, BankAcc2.Name, BankAcc2."Name 2", '', BankAcc2.Address, BankAcc2."Address 2", + BankAcc2.City, BankAcc2."Post Code", BankAcc2.County, BankAcc2."Country/Region Code"); + PostingGroup := BankAcc2."Bank Acc. Posting Group"; + CompanyIsBlocked := BankAcc2.Blocked; + BillGr."Bank Account Name" := BankAcc2.Name; + if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and (BillGr.Factoring = BillGr.Factoring::" ") then begin + BankAcc2.SetRange("Dealing Type Filter", 1); + // Discount + BankAcc2.CalcFields("Posted Receiv. Bills Rmg. Amt."); + BillGr.CalcFields(Amount); + if BankAcc2."Posted Receiv. Bills Rmg. Amt." + BillGr.Amount > BankAcc2."Credit Limit for Discount" then + AddError(Text1100004); + end; + end; + + if "Bank Account No." = '' then + AddError(StrSubstNo(Text1100005, FieldCaption("Bank Account No."))) + else + if PostingGroup = '' then + AddError( + StrSubstNo( + Text1100006, + BankAcc2.TableCaption(), + "Bank Account No.", + BankAcc2.FieldCaption("Bank Acc. Posting Group"))); + + if "Posting Date" = 0D then + AddError(StrSubstNo(Text1100005, FieldCaption("Posting Date"))); + + if "No. Printed" = 0 then + AddError(Text1100007); + + if CompanyIsBlocked then + AddError(StrSubstNo(Text1100008, BankAcc2.TableCaption(), "Bank Account No.")); + + Doc.Reset(); + Doc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No."); + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); + if not Doc.Find('-') then + AddError(Text1100009); + + BillGrDealingTypeInt := "Dealing Type".AsInteger(); + BillGrFactoringInt := Factoring + end; + + trigger OnPreDataItem() + begin + if BankAccNoFilter <> '' then begin + SetCurrentKey("Bank Account No."); + SetRange("Bank Account No.", BankAccNoFilter); + end; + end; + } + } + + requestpage + { + + layout + { + } + + actions + { + } + } + + labels + { + } + + trigger OnPreReport() + begin + BillGrFilter := BillGr.GetFilters(); + CheckOtherBanks := BankAcc.GetFilter("No.") <> ''; + BankAccNoFilter := BankAcc.GetFilter("No."); + end; + + var + Text1100000: Label 'For Discount'; + Text1100001: Label 'For Collection'; + Text1100002: Label '%1 must be %2 in %3 %4.'; + Text1100003: Label '%1 must be specified in %2 %3.'; + Text1100004: Label 'The credit limit will be exceeded.'; + Text1100005: Label '%1 must be specified.'; + Text1100006: Label '%1 %2 has no %3.'; + Text1100007: Label 'The bill group has not been printed.'; + Text1100008: Label '%1 %2 is blocked.'; + Text1100009: Label 'The bill group is empty.'; + Text1100010: Label '%1 must be %2.'; + Text1100011: Label '%1 must not be zero.'; + Text1100012: Label '%1 cannot be %2.'; + Text1100013: Label 'Specify %1 in %2 %3.'; + Text1100014: Label 'This Bill is due before the posting date of the bill group. It should not be included in a group for discount.'; + Text1100015: Label 'The %1 for %2 %3 %4 %5 %6 %7 %8 doesn''t exist.'; + Text1100016: Label 'Specify %1 for %2 %3.'; + Text1100017: Label 'Risked Factoring'; + Text1100018: Label 'Unrisked Factoring'; + Text1100019: Label 'No. of invoices'; + Text1100020: Label 'No. of bills'; + Text1100021: Label 'Risked Factoring Expenses'; + Text1100022: Label 'Unrisked Factoring Expenses'; + BankAcc2: Record "Bank Account"; + Cust: Record Customer; + CustLedgEntry: Record "Cust. Ledger Entry"; + CustPostingGr: Record "Customer Posting Group"; + DocPostBuffer: Record "Doc. Post. Buffer" temporary; + BGPOPostBuffer: Record "BG/PO Post. Buffer" temporary; + BankAccPostingGr: Record "Bank Account Posting Group"; + FeeRange: Record "Fee Range"; + CustRating: Record "Customer Rating"; + DocPost: Codeunit "Document-Post"; + FormatAddress: Codeunit "Format Address"; + BillGrFilter: Text[250]; + BankAccAddr: array[8] of Text[100]; + OperationText: Text[80]; + ErrorText: array[99] of Text[250]; + ErrorCounter: Integer; + PostingGroup: Code[20]; + CompanyIsBlocked: Boolean; + DocCount: Integer; + AccountNo: Text[20]; + BalanceAccNo: Text[20]; + CreditLimitExceeded: Boolean; + RiskIncGr: Decimal; + CalcExpenses: Boolean; + CheckOtherBanks: Boolean; + NoOfDays: Integer; + FactoringType: Text[30]; + BankAccNoFilter: Text[20]; + BillGrFactoringInt: Integer; + BillGrDealingTypeInt: Integer; + CurrReport_PAGENOCaptionLbl: Label 'Page'; + Bill_Group___TestCaptionLbl: Label 'Bill Group - Test'; + BillGr__Bank_Account_Name_CaptionLbl: Label 'Bank Account Name'; + OperationTextCaptionLbl: Label 'Operation'; + BillGr__Posting_Date_CaptionLbl: Label 'Posting Date'; + BillGr__Posting_Description_CaptionLbl: Label 'Posting Description'; + PostingGroupCaptionLbl: Label 'Posting Group'; + BillGr__Currency_Code_CaptionLbl: Label 'Currency Code'; + ErrorText_Number_CaptionLbl: Label 'Warning!'; + Cust_NameCaptionLbl: Label 'Name'; + Post_CodeCaptionLbl: Label 'Post Code'; + City__CaptionLbl: Label 'City /'; + CountyCaptionLbl: Label 'County'; + Doc__Due_Date_CaptionLbl: Label 'Due Date'; + Doc__No__CaptionLbl: Label 'Bill No.'; + Doc__Account_No__CaptionLbl: Label 'Customer No.'; + ErrorText_Number__Control56CaptionLbl: Label 'Warning!'; + TotalCaptionLbl: Label 'Total'; + FORMAT_CreditLimitExceeded__Control76CaptionLbl: Label 'Exceeded'; + RiskIncGr_Control77CaptionLbl: Label 'Risk Including this Bill Group'; + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70CaptionLbl: Label 'Total Expenses'; + FeeRange_GetTotalCollExpensesAmt_Control63CaptionLbl: Label 'Collection Expenses'; + FeeRange_GetTotalDiscExpensesAmt_Control61CaptionLbl: Label 'Discount Expenses'; + FeeRange_GetTotalDiscInterestsAmt_Control60CaptionLbl: Label 'Discount Interests'; + BankAcc__No__CaptionLbl: Label 'Bank Account No.'; + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89CaptionLbl: Label 'Total Expenses'; + FeeRange_GetTotalCollExpensesAmt_Control88CaptionLbl: Label 'Collection Expenses'; + FeeRange_GetTotalDiscExpensesAmt_Control87CaptionLbl: Label 'Discount Expenses'; + FeeRange_GetTotalDiscInterestsAmt_Control86CaptionLbl: Label 'Discount Interests'; + BankAcc__No___Control90CaptionLbl: Label 'Bank Account No.'; + BankAcc__No___Control90Caption_Control59Lbl: Label 'Bank Account No.'; + FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106Lbl: Label 'Discount Interests'; + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Lbl: Label 'Total Expenses'; + + local procedure AddError(Text: Text[250]) + begin + ErrorCounter := ErrorCounter + 1; + ErrorText[ErrorCounter] := Text; + end; + + [Scope('OnPrem')] + procedure GetFactoringType(): Text[30] + begin + if BillGr.Factoring <> BillGr.Factoring::" " then begin + if BillGr.Factoring = BillGr.Factoring::Risked then + exit(Text1100017); + + exit(Text1100018); + end; + end; + + [Scope('OnPrem')] + procedure SetLabel(): Text[30] + begin + if BillGr.Factoring <> BillGr.Factoring::" " then + exit(Text1100019); + + exit(Text1100020); + end; + + [Scope('OnPrem')] + procedure SetLabel2(): Text[30] + begin + if BillGr.Factoring <> BillGr.Factoring::" " then begin + if BillGr.Factoring = BillGr.Factoring::Risked then + exit(Text1100021); + + exit(Text1100022); + end; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupTest.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupTest.rdlc new file mode 100644 index 00000000000..d9fb8ff6f80 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupTest.rdlc @@ -0,0 +1,5697 @@ + + + 0 + + + + SQL + + + None + 84343ccd-463d-47c8-9326-35fd629e652f + + + + + + + + + + + 17.47302cm + + + + + 21.38517cm + + + + + + + true + + + + + + + + + + + 0.01cm + 0.1cm + 25 + + =Code.SetData(First(Fields!Bill_Group___TestCaption.Value) + Chr(177) + + First(Fields!COMPANYNAME.Value) + Chr(177) + + First(Fields!FORMAT_TODAY_0_4_.Value) + Chr(177) + + First(Fields!CurrReport_PAGENOCaption.Value) + Chr(177) + + First(Fields!BillGr_TABLECAPTION__________BillGrFilter.Value)) + + + + + + + + 1.575cm + + + 1.95cm + + + 1.95cm + + + 1.95cm + + + 1.95cm + + + 1.95cm + + + 1.95cm + + + 1.95cm + + + 1.875cm + + + + + 0.846cm + + + + + true + + + + + =First(Fields!BankAcc__No__Caption.Value) + + + + + + BankAcc__No__Caption + 76 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalDiscInterestsAmt_Control60Caption.Value) + + + + + + + FeeRange_GetTotalDiscInterestsAmt_Control60Caption + 75 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalDiscExpensesAmt_Control61Caption.Value) + + + + + + + FeeRange_GetTotalDiscExpensesAmt_Control61Caption + 74 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalCollExpensesAmt_Control63Caption.Value) + + + + + + + FeeRange_GetTotalCollExpensesAmt_Control63Caption + 73 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Caption.Value) + + + + + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Caption + 72 + + + + + + + + true + + + + + =First(Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption.Value) + + + + + + + BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption + 71 + + + + + + + + true + + + + + =First(Fields!RiskIncGr_Control77Caption.Value) + + + + + + + RiskIncGr_Control77Caption + 70 + + + + + + + + true + + + + + =First(Fields!BankAcc__Credit_Limit_for_Discount_Caption.Value) + + + + + + + BankAcc__Credit_Limit_for_Discount_Caption + 69 + + + + + + + + true + + + + + =First(Fields!FORMAT_CreditLimitExceeded__Control76Caption.Value) + + + + + + FORMAT_CreditLimitExceeded__Control76Caption + 68 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox49 + 67 + + + 9 + + + + + + + + + + + + + + 0.846cm + + + + + true + + + + + =First(Fields!BankAcc__No___Control90Caption.Value) + + + + + + BankAcc__No___Control90Caption + 66 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalDiscInterestsAmt_Control86Caption.Value) + + + + + + + FeeRange_GetTotalDiscInterestsAmt_Control86Caption + 65 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalDiscExpensesAmt_Control87Caption.Value) + + + + + + + FeeRange_GetTotalDiscExpensesAmt_Control87Caption + 64 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalCollExpensesAmt_Control88Caption.Value) + + + + + + + FeeRange_GetTotalCollExpensesAmt_Control88Caption + 63 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Caption.Value) + + + + + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Caption + 62 + + + + + + + + true + + + + + + + + + + + + textbox99 + 61 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox58 + 60 + + + 9 + + + + + + + + + + + + + + 0.86cm + + + + + true + + + + + =First(Fields!BankAcc__No___Control90Caption_Control59.Value) + + + + + + BankAcc__No___Control90Caption_Control59 + 59 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106.Value) + + + + + + + FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106 + 58 + + + + + + + + true + + + + + =First(Fields!SetLabel2.Value) + + + + + + + SetLabel2 + 57 + + + + + + + + true + + + + + + + + + + + + textbox93 + 56 + + + + + + + + true + + + + + =First(Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_114.Value) + + + + + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_114 + 55 + + + + + + + + true + + + + + + + + + + + + textbox111 + 54 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BillGrBankAcc__No__.Value + + + + + + 53 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt.Value + + + + + + + 52 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscExpensesAmt.Value + + + + + + + FeeRange_GetTotalDiscExpensesAmt + 51 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalCollExpensesAmt.Value + + + + + + + FeeRange_GetTotalCollExpensesAmt + 50 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt.Value + + + + + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt + 49 + + + + + + + + true + true + + + + + =Fields!BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value + + + + + + + BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__ + 48 + + + + + + + + true + true + + + + + =Fields!RiskIncGr.Value + + + + + + + RiskIncGr + 47 + + + + + + + + true + true + + + + + =Fields!BillGrBankAcc__Credit_Limit_for_Discount_.Value + + + + + + + BillGrBankAcc__Credit_Limit_for_Discount_ + 46 + + + + + + + + true + true + + + + + =Fields!FORMAT_CreditLimitExceeded_.Value + + + + + + FORMAT_CreditLimitExceeded_ + 45 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BillGrBankAcc__No__.Value + + + + + + 44 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt.Value + + + + + + + 43 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscExpensesAmt.Value + + + + + + + 42 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalCollExpensesAmt.Value + + + + + + + 41 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt.Value + + + + + + + 40 + + + + + + + + true + + + + + + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BillGrBankAcc__No__.Value + + + + + + 38 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt.Value + + + + + + + 37 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalRiskFactExpensesAmt.Value + + + + + + + 36 + + + + + + + + true + + + + + + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt.Value + + + + + + + 34 + + + + + + + + true + + + + + + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BillGrBankAcc__No__.Value + + + + + + 32 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt.Value + + + + + + + 31 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalUnriskFactExpensesAmt.Value + + + + + + + 30 + + + + + + + + true + + + + + + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt.Value + + + + + + + 28 + + + + + + + + true + + + + + + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__No__.Value + + + + + + BankAcc__No__ + 26 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt_Control60.Value + + + + + + + 25 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscExpensesAmt_Control61.Value + + + + + + + 24 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalCollExpensesAmt_Control63.Value + + + + + + + FeeRange_GetTotalCollExpensesAmt_Control63 + 23 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70.Value + + + + + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70 + 22 + + + + + + + + true + true + + + + + =Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value + + + + + + + BankAcc__Posted_Receiv__Bills_Rmg__Amt__ + 21 + + + + + + + + true + true + + + + + =Fields!RiskIncGr_Control77.Value + + + + + + + RiskIncGr_Control77 + 20 + + + + + + + + true + true + + + + + =Fields!BankAcc__Credit_Limit_for_Discount_.Value + + + + + + + BankAcc__Credit_Limit_for_Discount_ + 19 + + + + + + + + true + true + + + + + =Fields!FORMAT_CreditLimitExceeded__Control76.Value + + + + + + FORMAT_CreditLimitExceeded__Control76 + 18 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__No__.Value + + + + + + 17 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt_Control60.Value + + + + + + + 16 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscExpensesAmt_Control61.Value + + + + + + + 15 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalCollExpensesAmt_Control63.Value + + + + + + + 14 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70.Value + + + + + + + 13 + + + + + + + + true + + + + + + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__No__.Value + + + + + + 11 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt_Control60.Value + + + + + + + 10 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalRiskFactExpensesAmt_Control118.Value + + + + + + + 9 + + + + + + + + true + + + + + + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt_Control117.Value + + + + + + + 7 + + + + + + + + true + + + + + + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!BankAcc__No__.Value + + + + + + 5 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt_Control60.Value + + + + + + + 4 + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalUnriskFactExpensesAmt_Control122.Value + + + + + + + 3 + + + + + + + + true + + + + + + + + + + + + + true + true + + + + + =Fields!FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt_Control121.Value + + + + + + + 1 + + + + + + + + true + + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + =IIF(Fields!BillGrDealingTypeInt.Value=1 AND + (Fields!BillGrFactoringInt.Value=0),FALSE,TRUE) + + After + true + + + + =IIF(Fields!BillGrDealingTypeInt.Value=1 AND + (Fields!BillGrFactoringInt.Value=0),FALSE,TRUE) + + After + true + + + + =IIF(Fields!BillGrDealingTypeInt.Value=0 AND + (Fields!BillGrFactoringInt.Value=0),FALSE,TRUE) + + After + true + + + + =IIF(Fields!BillGrDealingTypeInt.Value=0 AND + (Fields!BillGrFactoringInt.Value=0),FALSE,TRUE) + + After + true + + + + =IIF(Fields!BillGrFactoringInt.Value=0,TRUE,FALSE) + + After + true + + + + Detail + + + + + =IIF(Fields!BillGrDealingTypeInt.Value=1 AND + Fields!BillGrFactoringInt.Value=0 AND + Fields!BillGrBankAcc__No__.Value<>"",FALSE,TRUE) + + + + + =IIF(Fields!BillGrDealingTypeInt.Value=0 AND + Fields!BillGrFactoringInt.Value=0 AND + Fields!BillGrBankAcc__No__.Value<>"",FALSE,TRUE) + + + + + =IIF(Fields!BillGrFactoringInt.Value=2 AND + Fields!BillGrBankAcc__No__.Value<>"",FALSE,TRUE) + + + + + =IIF(Fields!BillGrFactoringInt.Value=1 AND + Fields!BillGrBankAcc__No__.Value<>"",FALSE,TRUE) + + + + + =IIF(Fields!BillGrDealingTypeInt.Value=1 AND + Fields!BillGrFactoringInt.Value=0 AND + Fields!BankAcc__No__.Value<>"",FALSE,TRUE) + + + + + =IIF(Fields!BillGrDealingTypeInt.Value=0 AND + Fields!BillGrFactoringInt.Value=0 AND + Fields!BankAcc__No__.Value<>"",FALSE,TRUE) + + + + + =IIF(Fields!BillGrFactoringInt.Value=2 AND + Fields!BankAcc__No__.Value<>"",FALSE,TRUE) + + + + + =IIF(Fields!BillGrFactoringInt.Value=1 AND + Fields!BankAcc__No__.Value<>"",FALSE,TRUE) + + + + Detail_Collection + Output + true + + + + DataSet_Result + + + =Fields!FORMAT_CreditLimitExceeded__Control76Caption.Value + GreaterThan + + ="" + + + + 14.60317cm + 6.73313in + 24 + + + true + + + + + =First(Fields!PostingGroup.Value) + + + + + + + 6.768cm + 5.1cm + 0.423cm + 5cm + 23 + + + + true + + + + + =First(Fields!BillGr__Currency_Code_.Value) + + + + + + + 7.191cm + 5.1cm + 0.423cm + 5cm + 22 + + + + true + + + + + =First(Fields!PostingGroupCaption.Value) + + + + + + + 6.768cm + 0.423cm + 5cm + 21 + + + + true + + + + + =First(Fields!BillGr__Currency_Code_Caption.Value) + + + + + + + 7.191cm + 0.423cm + 5cm + 20 + + + + + + + 2.47755cm + + + 1.94318cm + + + 10.88181cm + + + 1.79744cm + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox48 + 8 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!TotalCaption.Value + + + + + + TotalCaption + 7 + + + 2 + + + + + + + true + + + + + + + + + + + textbox41 + 6 + + + + + + + + true + true + + + + + =Fields!BillGr_Amount.Value + + + + + + + BillGr_Amount + 5 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox28 + 4 + + + 4 + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!SetLabel.Value + + + + + + SetLabel + 3 + + + + + + + + true + + + + + =Fields!DocCount.Value + + + + + + + DocCount_1 + 2 + + + + + + + + true + + + + + + + + + + + textbox34 + 1 + + + 2 + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox13 + + + 4 + + + + + + + + + + + + + + + + + + + + + + Detail + + + + + + + + + Detail_Collection + Output + true + + + + DataSet_Result + + + =Fields!TotalCaption.Value + GreaterThan + + ="" + + + + 12.38095cm + 2.115cm + 6.73312in + 19 + + + + + + 1.275cm + + + 0.75cm + + + 1.65cm + + + 0.9cm + + + 1.65cm + + + 4.5cm + + + 1.65cm + + + 2.85cm + + + 1.875cm + + + + + 0.846cm + + + + + true + + + + + =First(Fields!Doc__Due_Date_Caption.Value) + + + + + + Doc__Due_Date_Caption + 34 + + + + + + + + true + + + + + =First(Fields!Doc__Document_Type__Control128Caption.Value) + + + + + + Doc__Document_Type__Control128Caption + 33 + + + + + + + + true + + + + + =First(Fields!Doc__Document_No__Caption.Value) + + + + + + Doc__Document_No__Caption + 32 + + + + + + + + true + + + + + =First(Fields!Doc__No__Caption.Value) + + + + + + Doc__No__Caption + 31 + + + + + + + + true + + + + + =First(Fields!Doc__Account_No__Caption.Value) + + + + + + textbox83 + 30 + + + + + + + + true + + + + + =First(Fields!Cust_NameCaption.Value) + + + + + + Cust_NameCaption + 29 + + + + + + + + true + + + + + =First(Fields!Post_CodeCaption.Value) + + + + + + Post_CodeCaption_1 + 28 + + + + + + + + true + + + + + =First(Fields!City__Caption.Value)+Chr(10)+First(Fields!CountyCaption.Value) + + + + + + City__Caption + 27 + + =iif(First(Fields!Post_CodeCaption.Value)="",true,false) + + NoOutput + + + + + + + + true + + + + + =First(Fields!Doc__Remaining_Amount_Caption.Value) + + + + + + + Doc__Remaining_Amount_Caption + 26 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + textbox50 + 25 + + + 9 + + + + + + + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Doc__Due_Date_.Value + + + + + + 24 + + + + + + + + true + + + + + =Fields!Doc__Document_Type_.Value + + + + + + 23 + + + + + + + + true + + + + + =Fields!Doc__Document_No__.Value + + + + + + + 22 + + + + + + + + true + + + + + =Fields!Doc__No__.Value + + + + + + + 21 + + + + + + + + true + + + + + =Fields!Doc__Account_No__.Value + + + + + + + 20 + + + + + + + + true + + + + + =Fields!Cust_Name.Value + + + + + + 19 + + + + + + + + true + + + + + =Fields!Cust__Post_Code_.Value + + + + + + + 18 + + + + + + + + true + + + + + =Fields!Cust_City.Value + + + + + + 17 + + + + + + + + true + true + + + + + =Fields!Doc__Remaining_Amount_.Value + + + + + + + 16 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + 15 + + + 7 + + + + + + + + + + + + true + + + + + =Fields!Cust_County.Value + + + + + + 14 + + + + + + + + true + + + + + + + + + + + 13 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!Doc__Due_Date_.Value + + + + + + 12 + + + + + + + + true + + + + + =Fields!Doc__Document_Type_.Value + + + + + + 11 + + + + + + + + true + + + + + =Fields!Doc__Document_No__.Value + + + + + + + 10 + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!Doc__Account_No__.Value + + + + + + + 8 + + + + + + + + true + + + + + =Fields!Cust_Name.Value + + + + + + 7 + + + + + + + + true + + + + + =Fields!Cust__Post_Code_.Value + + + + + + + 6 + + + + + + + + true + + + + + =Fields!Cust_City.Value + + + + + + 5 + + + + + + + + true + true + + + + + =Fields!Doc__Remaining_Amount_.Value + + + + + + + 4 + + + + + + + + 0.423cm + + + + + true + + + + + + + + + + + 3 + + + 7 + + + + + + + + + + + + true + + + + + =Fields!Cust_County.Value + + + + + + 2 + + + + + + + + true + + + + + + + + + + + 1 + + + + + + + + 0.423cm + + + + + true + + + + + =Fields!ErrorText_Number__Control56Caption.Value + + + + + + ErrorText_Number__Control56Caption + + + 2 + + + + + + + true + + + + + =Fields!ErrorText_Number__Control56.Value + + + + + + textbox47 + + + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + + + After + true + + + + + =Fields!Doc__Entry_No__.Value + + + + + + =IIF(Fields!Doc__Document_Type____Doc__Document_Type___Bill.Value,FALSE,TRUE) + + After + true + + + + =IIF(Fields!Doc__Document_Type____Doc__Document_Type___Bill.Value,FALSE,TRUE) + + After + true + + + + =IIF(Fields!Doc__Document_Type____Doc__Document_Type___Invoice.Value,FALSE,TRUE) + + After + true + + + + =IIF(Fields!Doc__Document_Type____Doc__Document_Type___Invoice.Value,FALSE,TRUE) + + After + true + + + + Detail + + + + + =IIF(Fields!ErrorText_Number__Control56.Value="",TRUE,FALSE) + + + + Detail_Collection + Output + true + + + + + + DataSet_Result + + + =Fields!Doc__Document_No__.Value + GreaterThan + + ="" + + + + =Fields!Doc_Type.Value + GreaterThan + + ="" + + + + 8.883cm + 3.384cm + 6.73313in + 18 + + + + + + 1.6cm + + + 15.8cm + + + + + 0.423cm + + + + + true + + + + + =Fields!ErrorText_Number_Caption.Value + + + + + + ErrorText_Number_Caption + 1 + + + + + + + + true + + + + + =Fields!ErrorText_Number_.Value + + + + + + ErrorText_Number_ + + + + + + + + + + + + + + + + + + + Detail + + + + + =IIF(Fields!ErrorText_Number_.Value="",TRUE,FALSE) + + + + Detail_Collection + Output + true + + + + 8.037cm + 0.423cm + 6.85125in + 17 + + + true + + + + + =First(Fields!BillGr__Posting_Date_.Value) + + + + + + + 5.922cm + 5.1cm + 0.423cm + 5cm + 16 + + + + true + + + + + =First(Fields!BillGr__Posting_Description_.Value) + + + + + + + 6.345cm + 5.1cm + 0.423cm + 5cm + 15 + + + + true + + + + + =First(Fields!OperationText.Value) + + + + + + 5.076cm + 5.1cm + 0.423cm + 5cm + 14 + + + + true + + + + + =First(Fields!BillGr__Bank_Account_Name_.Value) + + + + + + 4.653cm + 5.1cm + 0.423cm + 5cm + 13 + + + + true + + + + + =First(Fields!BillGr__Posting_Date_Caption.Value) + + + + + + + 5.922cm + 0.423cm + 5cm + 12 + + + + true + + + + + =First(Fields!BillGr__Posting_Description_Caption.Value) + + + + + + + 6.345cm + 0.423cm + 5cm + 11 + + + + true + + + + + =First(Fields!FactoringType.Value) + + + + + + + 5.499cm + 0.423cm + 5cm + 10 + + + + true + + + + + =First(Fields!OperationTextCaption.Value) + + + + + + + 5.076cm + 0.423cm + 5cm + 9 + + + + true + + + + + =First(Fields!BillGr__Bank_Account_Name_Caption.Value) + + + + + + + 4.653cm + 0.423cm + 5cm + 8 + + + + true + + + + + =First(Fields!BankAccAddr_4_.Value) + + + + + + + 2.538cm + 0.423cm + 5cm + 7 + + + + true + + + + + =First(Fields!BankAccAddr_5_.Value) + + + + + + + 2.961cm + 0.423cm + 5cm + 6 + + + + true + + + + + =First(Fields!BankAccAddr_6_.Value) + + + + + + + 3.384cm + 0.423cm + 5cm + 5 + + + + true + + + + + =First(Fields!BankAccAddr_7_.Value) + + + + + + + 3.807cm + 0.423cm + 5cm + 4 + + + + true + + + + + =First(Fields!BankAccAddr_3_.Value) + + + + + + + 2.115cm + 0.423cm + 5cm + 3 + + + + true + + + + + =First(Fields!BankAccAddr_2_.Value) + + + + + + + 1.692cm + 0.423cm + 5cm + 2 + + + + true + + + + + =First(Fields!BankAccAddr_1_.Value) + + + + + + + 1.296cm + 0.423cm + 5cm + 1 + + + + true + + + + + =First(Fields!BillGr_TABLECAPTION_________BillGr__No__.Value) + + + + + + + 0.423cm + 0.423cm + 5cm + + + + true + + + + + + + + + + + + + + + + + + =Fields!BillGr_No_.Value + + + Between + + + Output + true + + + + DataSet_Result + + End + + 21.38517cm + 17.47302cm + + + 21.38517cm + + 18.15cm + + + 2.14258cm + true + true + + + true + + + + + =Code.GetData(5) + + + + + + + 1.71958cm + 7 + + + + true + + + + + =Globals!PageNumber + + + + + + + 0.44945cm + 17.7cm + 0.423cm + 5 + + + + true + true + + + + + =User!UserID + + + + + + + 0.87245cm + 15.9cm + 0.423cm + 4 + + + + true + + + + + =Code.GetData(3) + + + + + + + 0.02646cm + 15cm + 0.423cm + 3 + + + + true + + + + + =Code.GetData(2) + + + + + + 0.44945cm + 0.423cm + 7.5cm + 2 + + + + true + + + + + =Code.GetData(4) + + + + + + 0.44945cm + 17.14286cm + 0.423cm + 0.75cm + 1 + + + + true + + + + + =Code.GetData(1) + + + + + + 0.02646cm + 0.423cm + 7.5cm + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 2cm + 2cm + + + + Public Function BlankZero(ByVal Value As Decimal) + if Value = 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankPos(ByVal Value As Decimal) + if Value > 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankZeroAndPos(ByVal Value As Decimal) + if Value >= 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNeg(ByVal Value As Decimal) + if Value < 0 then + Return "" + end if + Return Value +End Function + +Public Function BlankNegAndZero(ByVal Value As Decimal) + if Value <= 0 then + Return "" + end if + Return Value +End Function + +Shared Data as Object + +Public Function SetData(NewData as Object) + If NewData <> "" Then + Data = NewData + End If + Return True +End Function + +Public Function GetData(Num as Integer) as Object + Return Cstr(Choose(Num, Split(Cstr(Data),Chr(177)))) +End Function + =User!Language + true + Invalid + 79def18b-5b55-4313-81a4-7c8cb97c6352 + + + + + BillGr_No_ + + + BillGr_Bank_Account_No_ + + + BillGr_Currency_Code + + + USERID + + + FORMAT_TODAY_0_4_ + + + COMPANYNAME + + + BillGr_TABLECAPTION__________BillGrFilter + + + BillGr_TABLECAPTION_________BillGr__No__ + + + BankAccAddr_1_ + + + BankAccAddr_2_ + + + BankAccAddr_3_ + + + BankAccAddr_4_ + + + BankAccAddr_5_ + + + BankAccAddr_6_ + + + BankAccAddr_7_ + + + BillGr__Bank_Account_Name_ + + + OperationText + + + BillGr__Posting_Date_ + + + BillGr__Posting_Description_ + + + PostingGroup + + + BillGr__Currency_Code_ + + + FactoringType + + + PageCounter_Number + + + CurrReport_PAGENOCaption + + + Bill_Group___TestCaption + + + BillGr__Bank_Account_Name_Caption + + + OperationTextCaption + + + BillGr__Posting_Date_Caption + + + BillGr__Posting_Description_Caption + + + PostingGroupCaption + + + BillGr__Currency_Code_Caption + + + ErrorText_Number_ + + + HeaderErrorCounter_Number + + + ErrorText_Number_Caption + + + Doc__Entry_No__ + + + Doc__Due_Date_ + + + Doc__Document_No__ + + + Doc__No__ + + + Doc__Account_No__ + + + Cust_Name + + + Cust__Post_Code_ + + + Cust_City + + + Cust_County + + + Doc__Remaining_Amount_ + + + Doc__Remaining_Amount_Format + + + Doc__Document_Type_ + + + Doc__Document_Type____Doc__Document_Type___Bill + + + Cust_County_Control97 + + + Cust_Name_Control98 + + + Cust__Post_Code__Control99 + + + Cust_City_Control100 + + + Doc__Remaining_Amount__Control101 + + + Doc__Remaining_Amount__Control101Format + + + Doc__Account_No___Control102 + + + Doc__Document_No___Control104 + + + Doc__Due_Date__Control105 + + + Doc__Document_Type__Control128 + + + Doc__Document_Type____Doc__Document_Type___Invoice + + + Doc_Type + + + Doc_Bill_Gr__Pmt__Order_No_ + + + Cust_NameCaption + + + Post_CodeCaption + + + City__Caption + + + CountyCaption + + + Doc__Due_Date_Caption + + + Doc__Document_No__Caption + + + Doc__No__Caption + + + Doc__Account_No__Caption + + + Doc__Remaining_Amount_Caption + + + Doc__Document_Type__Control128Caption + + + ErrorText_Number__Control56 + + + LineErrorCounter_Number + + + ErrorText_Number__Control56Caption + + + DocCount + + + BillGr_Amount + + + BillGr_AmountFormat + + + SetLabel + + + Total_Number + + + TotalCaption + + + BillGrFactoringInt + + + BillGrDealingTypeInt + + + SetLabel2 + + + Integer_Number + + + FORMAT_CreditLimitExceeded__Control76Caption + + + BankAcc__Credit_Limit_for_Discount_Caption + + + RiskIncGr_Control77Caption + + + BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Caption + + + FeeRange_GetTotalCollExpensesAmt_Control63Caption + + + FeeRange_GetTotalDiscExpensesAmt_Control61Caption + + + FeeRange_GetTotalDiscInterestsAmt_Control60Caption + + + BankAcc__No__Caption + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Caption + + + FeeRange_GetTotalCollExpensesAmt_Control88Caption + + + FeeRange_GetTotalDiscExpensesAmt_Control87Caption + + + FeeRange_GetTotalDiscInterestsAmt_Control86Caption + + + BankAcc__No___Control90Caption + + + BankAcc__No___Control90Caption_Control59 + + + FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106 + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_114 + + + FORMAT_CreditLimitExceeded_ + + + BillGrBankAcc__Credit_Limit_for_Discount_ + + + BillGrBankAcc__Credit_Limit_for_Discount_Format + + + RiskIncGr + + + RiskIncGrFormat + + + BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__ + + + BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__Format + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmtFormat + + + FeeRange_GetTotalCollExpensesAmt + + + FeeRange_GetTotalCollExpensesAmtFormat + + + FeeRange_GetTotalDiscExpensesAmt + + + FeeRange_GetTotalDiscExpensesAmtFormat + + + FeeRange_GetTotalDiscInterestsAmt + + + FeeRange_GetTotalDiscInterestsAmtFormat + + + BillGrBankAcc__No__ + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control91 + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control91Format + + + FeeRange_GetTotalCollExpensesAmt_Control92 + + + FeeRange_GetTotalCollExpensesAmt_Control92Format + + + FeeRange_GetTotalDiscExpensesAmt_Control93 + + + FeeRange_GetTotalDiscExpensesAmt_Control93Format + + + FeeRange_GetTotalDiscInterestsAmt_Control94 + + + FeeRange_GetTotalDiscInterestsAmt_Control94Format + + + BillGrBankAcc__No___Control95 + + + BillGrBankAcc__No___Control108 + + + FeeRange_GetTotalDiscInterestsAmt_Control109 + + + FeeRange_GetTotalDiscInterestsAmt_Control109Format + + + FeeRange_GetTotalRiskFactExpensesAmt + + + FeeRange_GetTotalRiskFactExpensesAmtFormat + + + FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt + + + FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmtFormat + + + FeeRange_GetTotalUnriskFactExpensesAmt + + + FeeRange_GetTotalUnriskFactExpensesAmtFormat + + + FeeRange_GetTotalDiscInterestsAmt_Control112 + + + FeeRange_GetTotalDiscInterestsAmt_Control112Format + + + BillGrBankAcc__No___Control113 + + + FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt + + + FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmtFormat + + + FeeRange_GetTotalDiscInterestsAmt_Control60 + + + FeeRange_GetTotalDiscInterestsAmt_Control60Format + + + FeeRange_GetTotalDiscExpensesAmt_Control61 + + + FeeRange_GetTotalDiscExpensesAmt_Control61Format + + + FeeRange_GetTotalCollExpensesAmt_Control63 + + + FeeRange_GetTotalCollExpensesAmt_Control63Format + + + BankAcc__No__ + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70 + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Format + + + FORMAT_CreditLimitExceeded__Control76 + + + RiskIncGr_Control77 + + + RiskIncGr_Control77Format + + + BankAcc__Posted_Receiv__Bills_Rmg__Amt__ + + + BankAcc__Posted_Receiv__Bills_Rmg__Amt__Format + + + BankAcc__Credit_Limit_for_Discount_ + + + BankAcc__Credit_Limit_for_Discount_Format + + + FeeRange_GetTotalDiscInterestsAmt_Control86 + + + FeeRange_GetTotalDiscInterestsAmt_Control86Format + + + FeeRange_GetTotalDiscExpensesAmt_Control87 + + + FeeRange_GetTotalDiscExpensesAmt_Control87Format + + + FeeRange_GetTotalCollExpensesAmt_Control88 + + + FeeRange_GetTotalCollExpensesAmt_Control88Format + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89 + + + FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Format + + + BankAcc__No___Control90 + + + FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt_Control117 + + + FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt_Control117Format + + + FeeRange_GetTotalRiskFactExpensesAmt_Control118 + + + FeeRange_GetTotalRiskFactExpensesAmt_Control118Format + + + FeeRange_GetTotalDiscInterestsAmt_Control119 + + + FeeRange_GetTotalDiscInterestsAmt_Control119Format + + + BankAcc__No___Control120 + + + FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt_Control121 + + + FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt_Control121Format + + + FeeRange_GetTotalUnriskFactExpensesAmt_Control122 + + + FeeRange_GetTotalUnriskFactExpensesAmt_Control122Format + + + FeeRange_GetTotalDiscInterestsAmt_Control123 + + + FeeRange_GetTotalDiscInterestsAmt_Control123Format + + + BankAcc__No___Control124 + + + BankAcc_Currency_Code + + + + DataSource + + + + + \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroups.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroups.Page.al new file mode 100644 index 00000000000..5c0d5b4372c --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroups.Page.al @@ -0,0 +1,326 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Bank.Payment; +using Microsoft.Finance.ReceivablesPayables; + +page 7000009 "Bill Groups" +{ + Caption = 'Bill Groups'; + DataCaptionExpression = Rec.Caption(); + PageType = Document; + RefreshOnActivate = true; + SourceTable = "Bill Group"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("No."; Rec."No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of this bill group.'; + + trigger OnAssistEdit() + begin + if Rec.AssistEdit(xRec) then + CurrPage.Update(); + end; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank, to which this bill group is being submitted.'; + + trigger OnLookup(var Text: Text): Boolean + begin + BankSel.SetCurrBillGr(Rec); + if ACTION::LookupOK = BankSel.RunModal() then begin + BankSel.GetRecord(BankAcc); + Rec."Dealing Type" := "Cartera Dealing Type".FromInteger(BankSel.IsForDiscount()); + Clear(BankSel); + Rec.Validate("Bank Account No.", BankAcc."No."); + end else + Clear(BankSel); + end; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bank to which this bill group is submitted.'; + } + field("Dealing Type"; Rec."Dealing Type") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the type of payment. Collection: The document will be sent to the bank for processing as a receivable. Discount: The document will be sent to the bank for processing as a prepayment discount. When a document is submitted for discount, the bill group bank advances the amount of the document (or a portion of it, in the case of invoices). Later, the bank is responsible for processing the collection of the document on the due date.'; + } + field("Partner Type"; Rec."Partner Type") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies if the bill group is of type person or company.'; + } + field(Factoring; Rec.Factoring) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the factoring method used for the invoices that make up this bill group.'; + } + field("Posting Date"; Rec."Posting Date") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the posting date when this bill group will be entered.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the bill group.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total of the sums of the documents included in the bill group.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + Importance = Promoted; + ToolTip = 'Specifies the total amount for all of the documents included in the bill group.'; + } + } + part(Docs; "Docs. in BG Subform") + { + ApplicationArea = Basic, Suite; + SubPageLink = Type = const(Receivable), + "Collection Agent" = const(Bank), + "Bill Gr./Pmt. Order No." = field("No."); + SubPageView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place); + } + group(Auditing) + { + Caption = 'Auditing'; + field("Reason Code"; Rec."Reason Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; + } + field("No. Printed"; Rec."No. Printed") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the number of copies that were printed.'; + } + } + } + area(factboxes) + { + part("File Export Errors"; "Payment Journal Errors Part") + { + ApplicationArea = Basic, Suite; + Caption = 'File Export Errors'; + Provider = Docs; + SubPageLink = "Journal Template Name" = filter(''), + "Journal Batch Name" = filter('7000005'), + "Document No." = field("Bill Gr./Pmt. Order No."), + "Journal Line No." = field("Entry No."); + } + part(Control1901421207; "BG Analysis Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433307; "Bank Account Information FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bank Account No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group(BillGroup) + { + Caption = 'Bill &Group'; + Image = VoucherGroup; + action(Comments) + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = Type = filter(Receivable), + "BG/PO No." = field("No."); + ToolTip = 'View or create a comment.'; + } + separator(Action18) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + RunObject = Page "Bill Groups Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action33) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + BillGr.Copy(Rec); + BillGr.SetRecFilter(); + end; + BillGr.PrintRecords(true); + end; + } + } + } + area(processing) + { + group(Posting) + { + Caption = 'P&osting'; + Image = Post; + action(TestReport) + { + ApplicationArea = Basic, Suite; + Caption = 'Test Report'; + Ellipsis = true; + Image = TestReport; + ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; + + trigger OnAction() + begin + if not Rec.Find() then + exit; + BillGr.Reset(); + BillGr := Rec; + BillGr.SetRecFilter(); + REPORT.Run(REPORT::"Bill Group - Test", true, false, BillGr); + end; + } + action(Post) + { + ApplicationArea = Basic, Suite; + Caption = 'P&ost'; + Ellipsis = true; + Image = Post; + ShortCutKey = 'F9'; + ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; + + trigger OnAction() + begin + if Rec.Find() then + PostBGPO.ReceivablePostOnly(Rec); + end; + } + action(PostandPrint) + { + ApplicationArea = Basic, Suite; + Caption = 'Post and &Print'; + Ellipsis = true; + Image = PostPrint; + ShortCutKey = 'Shift+F9'; + ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; + + trigger OnAction() + begin + if Rec.Find() then + PostBGPO.ReceivablePostAndPrint(Rec); + end; + } + action(ExportToFile) + { + ApplicationArea = Basic, Suite; + Caption = 'Export Bill Group to File'; + Image = ExportFile; + ToolTip = 'Export a file with the payment information on the lines.'; + + trigger OnAction() + begin + Rec.ExportToFile(); + end; + } + } + action(BillGroupsMaturity) + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Groups Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Bill Groups Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View matured bill groups.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(Post_Promoted; Post) + { + } + actionref(PostandPrint_Promoted; PostandPrint) + { + } + actionref(ExportToFile_Promoted; ExportToFile) + { + } + actionref(BillGroupsMaturity_Promoted; BillGroupsMaturity) + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + BankAcc: Record "Bank Account"; + BillGr: Record "Bill Group"; + BankSel: Page "Bank Account Selection"; + PostBGPO: Codeunit "BG/PO-Post and Print"; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsAnalysis.Page.al new file mode 100644 index 00000000000..6618248aacc --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsAnalysis.Page.al @@ -0,0 +1,98 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000020 "Bill Groups Analysis" +{ + Caption = 'Bill Groups Analysis'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = Card; + SaveValues = true; + SourceTable = "Bill Group"; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field("Category Filter"; Rec."Category Filter") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies a sort filter for the documents included in this bill group.'; + + trigger OnValidate() + begin + CategoryFilterOnAfterValidate(); + end; + } + } + group(Control3) + { + ShowCaption = false; + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the currency code for the bill group.'; + } + field(DocCount; DocCount) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Documents'; + Editable = false; + ToolTip = 'Specifies the number of documents included.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total of the sums of the documents included in the bill group.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount for all of the documents included in the bill group.'; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateStatistics(); + end; + + var + Doc: Record "Cartera Doc."; + DocCount: Integer; + + local procedure UpdateStatistics() + begin + Doc.SetRange(Type, Doc.Type::Receivable); + Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); + Doc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); + Rec.CopyFilter("Global Dimension 1 Filter", Doc."Global Dimension 1 Code"); + Rec.CopyFilter("Global Dimension 2 Filter", Doc."Global Dimension 2 Code"); + Rec.CopyFilter("Category Filter", Doc."Category Code"); + Rec.CopyFilter("Due Date Filter", Doc."Due Date"); + DocCount := Doc.Count(); + end; + + local procedure CategoryFilterOnAfterValidate() + begin + UpdateStatistics(); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsList.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsList.Page.al new file mode 100644 index 00000000000..b92278a3c66 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsList.Page.al @@ -0,0 +1,235 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000011 "Bill Groups List" +{ + ApplicationArea = Basic, Suite; + Caption = 'Bill Groups'; + CardPageID = "Bill Groups"; + Editable = false; + PageType = List; + SourceTable = "Bill Group"; + UsageCategory = Lists; + + layout + { + area(content) + { + repeater(Control1) + { + ShowCaption = false; + field("No."; Rec."No.") + { + ApplicationArea = All; + ToolTip = 'Specifies the number of this bill group.'; + } + field("Bank Account No."; Rec."Bank Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number or code of the bank, to which this bill group is being submitted.'; + } + field("Bank Account Name"; Rec."Bank Account Name") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the number of the bank to which this bill group is submitted.'; + } + field("Currency Code"; Rec."Currency Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the currency code for the bill group.'; + } + field(Amount; Rec.Amount) + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total of the sums of the documents included in the bill group.'; + } + field("Amount (LCY)"; Rec."Amount (LCY)") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the total amount for all of the documents included in the bill group.'; + } + } + } + area(factboxes) + { + part(Control1901421207; "BG Analysis Fact Box") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("No."); + Visible = true; + } + part(Control1903433307; "Bank Account Information FB") + { + ApplicationArea = Basic, Suite; + SubPageLink = "No." = field("Bank Account No."); + Visible = true; + } + systempart(Control1905767507; Notes) + { + ApplicationArea = Notes; + Visible = true; + } + } + } + + actions + { + area(navigation) + { + group("Bill &Group") + { + Caption = 'Bill &Group'; + Image = VoucherGroup; + action(Comments) + { + ApplicationArea = Basic, Suite; + Caption = 'Co&mments'; + Image = ViewComments; + RunObject = Page "BG/PO Comment Sheet"; + RunPageLink = Type = filter(Receivable), + "BG/PO No." = field("No."); + ToolTip = 'View or create a comment.'; + } + separator(Action21) + { + } + action(Analysis) + { + ApplicationArea = Basic, Suite; + Caption = 'Analysis'; + Image = "Report"; + RunObject = Page "Bill Groups Analysis"; + RunPageLink = "No." = field("No."), + "Due Date Filter" = field("Due Date Filter"), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; + } + separator(Action24) + { + } + action(Listing) + { + ApplicationArea = Basic, Suite; + Caption = 'Listing'; + Ellipsis = true; + Image = List; + ToolTip = 'View detailed information about the posted bill group or payment order.'; + + trigger OnAction() + begin + if Rec.Find() then begin + BillGr.Copy(Rec); + BillGr.SetRecFilter(); + end; + BillGr.PrintRecords(true); + end; + } + } + } + area(processing) + { + group("P&osting") + { + Caption = 'P&osting'; + Image = Post; + action(TestReport) + { + ApplicationArea = Basic, Suite; + Caption = 'Test Report'; + Ellipsis = true; + Image = TestReport; + ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; + + trigger OnAction() + begin + if not Rec.Find() then + exit; + BillGr.Reset(); + BillGr := Rec; + BillGr.SetRecFilter(); + REPORT.Run(REPORT::"Bill Group - Test", true, false, BillGr); + end; + } + action(Post) + { + ApplicationArea = Basic, Suite; + Caption = 'P&ost'; + Ellipsis = true; + Image = Post; + ShortCutKey = 'F9'; + ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; + + trigger OnAction() + begin + if Rec.Find() then + PostBillGr.ReceivablePostOnly(Rec); + end; + } + action("Post and &Print") + { + ApplicationArea = Basic, Suite; + Caption = 'Post and &Print'; + Ellipsis = true; + Image = PostPrint; + ShortCutKey = 'Shift+F9'; + ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; + + trigger OnAction() + begin + if Rec.Find() then + PostBillGr.ReceivablePostAndPrint(Rec); + end; + } + } + action(GeneralBillGroupsMaturity) + { + ApplicationArea = Basic, Suite; + Caption = 'Bill Groups Maturity'; + Image = DocumentsMaturity; + RunObject = Page "Bill Groups Maturity"; + RunPageLink = "No." = field("No."), + "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), + "Category Filter" = field("Category Filter"); + ToolTip = 'View matured bill groups.'; + } + } + area(Promoted) + { + group(Category_Process) + { + Caption = 'Process'; + + actionref(Post_Promoted; Post) + { + } + actionref("Post and &Print_Promoted"; "Post and &Print") + { + } + actionref(GeneralBillGroupsMaturity_Promoted; GeneralBillGroupsMaturity) + { + } + } + group(Category_Report) + { + Caption = 'Reports'; + + actionref(Listing_Promoted; Listing) + { + } + } + } + } + + var + BillGr: Record "Bill Group"; + PostBillGr: Codeunit "BG/PO-Post and Print"; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsMaturity.Page.al new file mode 100644 index 00000000000..df00b0e30ac --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillGroupsMaturity.Page.al @@ -0,0 +1,97 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Finance.ReceivablesPayables; + +page 7000031 "Bill Groups Maturity" +{ + Caption = 'Bill Groups Maturity'; + DataCaptionExpression = Rec.Caption(); + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + PageType = List; + SaveValues = true; + SourceTable = "Bill Group"; + + layout + { + area(content) + { + group(General) + { + Caption = 'General'; + field("Category Filter"; Rec."Category Filter") + { + ApplicationArea = Basic, Suite; + Caption = 'Category Filter'; + ToolTip = 'Specifies the categories that the data is included for.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + } + group(Options) + { + Caption = 'Options'; + field(PeriodType; PeriodType) + { + ApplicationArea = Basic, Suite; + Caption = 'View by'; + OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; + ToolTip = 'Specifies by which period amounts are displayed.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + field(AmountType; AmountType) + { + ApplicationArea = Basic, Suite; + Caption = 'View as'; + OptionCaption = 'Net Change,Balance at Date'; + ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; + + trigger OnValidate() + begin + UpdateSubForm(); + end; + } + } + part(MaturityLines; "BG/PO Maturity Lines") + { + ApplicationArea = Basic, Suite; + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateSubForm(); + end; + + trigger OnOpenPage() + begin + UpdateSubForm(); + end; + + var + PeriodType: Option Day,Week,Month,Quarter,Year,Period; + AmountType: Option "Net Change","Balance at Date"; + + local procedure UpdateSubForm() + begin + CurrPage.MaturityLines.PAGE.SetReceivable(Rec, PeriodType, AmountType); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN19.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN19.Codeunit.al new file mode 100644 index 00000000000..6200f208d45 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN19.Codeunit.al @@ -0,0 +1,31 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.DirectDebit; + +codeunit 7000092 "Bill group - Export N19" +{ + TableNo = "Direct Debit Collection Entry"; + + trigger OnRun() + var + BillGroup: Record "Bill Group"; + DirectDebitCollection: Record "Direct Debit Collection"; + BillGroupNo: Code[20]; + begin + DirectDebitCollection.Get(Rec.GetRangeMin("Direct Debit Collection No.")); + BillGroupNo := DirectDebitCollection.Identifier; + DirectDebitCollection.Delete(); + if not BillGroup.Get(BillGroupNo) then + Error(ExportDirectDebitErr); + Commit(); + REPORT.Run(REPORT::"Bill group - Export N19", true, false, BillGroup); + end; + + var + ExportDirectDebitErr: Label 'You cannot export the direct debit with the selected SEPA Direct Debit Exp. Format in To Bank Account No.'; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN19.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN19.Report.al new file mode 100644 index 00000000000..edadaeef763 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN19.Report.al @@ -0,0 +1,483 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.IO; + +report 7000092 "Bill group - Export N19" +{ + Caption = 'Bill group - Export N19'; + Permissions = TableData "Bill Group" = m; + ProcessingOnly = true; + + dataset + { + dataitem("Bill Group"; "Bill Group") + { + DataItemTableView = sorting("No.") where(Factoring = const(" ")); + RequestFilterFields = "No."; + dataitem("Cartera Doc."; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where(Type = const(Receivable)); + + trigger OnAfterGetRecord() + begin + DocType := DocMisc.DocType("Payment Method Code"); + + CustLedgEntry.Get("Entry No."); + + Customer.Get(CustLedgEntry."Customer No."); + if not CustBankAcc.Get(CustLedgEntry."Customer No.", "Cust./Vendor Bank Acc. Code") then + Error(Text1100007, + CustBankAcc.TableCaption(), + "Cust./Vendor Bank Acc. Code", + Customer.TableCaption(), + CustLedgEntry."Customer No."); + + CustCCCBankCode := CustBankAcc."CCC Bank No."; + CustCCCBankBranchNo := CustBankAcc."CCC Bank Branch No."; + CustCCCControlDigits := CustBankAcc."CCC Control Digits"; + CustCCCAccNo := CustBankAcc."CCC Bank Account No."; + + if CheckErrors then begin + DocMisc.CheckControlDigit(CustCCCControlDigits, CustCCCBankCode, CustCCCAccNo, CustCCCBankBranchNo); + if (CustBankAcc."CCC Control Digits" <> CustCCCControlDigits) and + (CustCCCControlDigits <> '**') + then begin + CustBankAcc."CCC Control Digits" := CustCCCControlDigits; + CustBankAcc.Modify(); + end; + end; + + if (CustCCCBankCode = '') or (CustCCCBankBranchNo = '') or + (CustCCCControlDigits = '') or (CustCCCAccNo = '') + then begin + CustCCCBankCode := '0000'; + CustCCCBankBranchNo := '0000'; + CustCCCControlDigits := '00'; + CustCCCAccNo := '0000000000'; + end; + + CustAddress[1] := CopyStr(Customer.Name, 1, 30); + CustAddress[2] := CopyStr(Customer.Address, 1, 30); + CustAddress[3] := CopyStr(Customer.City, 1, 30); + CustAddress[4] := CopyStr(Customer."Post Code", 1, 30); + CustNoNIF := Customer."VAT Registration No."; + AdditionalInfo := Text1100008 + "Document No." + '/' + "No."; + AdditionalInfo2 := "Document No." + '/' + "No."; + + if Accepted = Accepted::Yes then + IsAccepted := '1' + else + IsAccepted := '0'; + + TotalDocs := TotalDocs + 1; + TotalDocsCust := TotalDocsCust + 1; + TotalPrintedCust := TotalPrintedCust + 1; + TotalPosted := TotalPosted + 3; + + case true of + LCY = LCY::Euro: + if IsEuro then + DocAmount := EuroAmount("Remaining Amt. (LCY)") + else + DocAmount := ConvertStr(Format("Remaining Amount", 10, Text1100009), ' ', '0'); + LCY = LCY::Other: + if IsEuro then + DocAmount := EuroAmount("Remaining Amount") + else + DocAmount := ConvertStr(Format("Remaining Amount", 10, Text1100009), ' ', '0'); + end; + + RegisterCode2 := RegisterCode + 6; + DLDACurrency(); + + Clear(OutText); + OutText := + RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + PadStr(Format(CustNoNIF), 12, ' ') + PadStr(Format(Customer.Name), 40, ' ') + + ConvertStr(PadStr(CustCCCBankCode, 4, ' '), ' ', '0') + ConvertStr(PadStr(CustCCCBankBranchNo, 4, ' '), ' ', '0') + + PadStr(CustCCCControlDigits, 2, ' ') + ConvertStr(PadStr(CustCCCAccNo, 10, ' '), ' ', '0') + + DocAmount + Text1100010 + PadStr(AdditionalInfo2, 10, ' ') + PadStr(AdditionalInfo, 40, ' ') + PadStr('', 8, ' '); + + OutFile.Write(OutText); + end; + + trigger OnPostDataItem() + begin + Clear(OutText); + TotalPrintedCust := TotalPrintedCust + 1; + + case true of + LCY = LCY::Euro: + if IsEuro then begin + "Bill Group".CalcFields("Amount (LCY)"); + TotalAmount := "Bill Group"."Amount (LCY)" + TotalAmount; + BillGrAmount := EuroAmount("Bill Group"."Amount (LCY)") + end else begin + "Bill Group".CalcFields(Amount); + TotalAmount := "Bill Group".Amount + TotalAmount; + BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100006), ' ', '0') + end; + LCY = LCY::Other: + if IsEuro then begin + "Bill Group".CalcFields(Amount); + TotalAmount := "Bill Group".Amount + TotalAmount; + BillGrAmount := EuroAmount("Bill Group".Amount) + end else begin + "Bill Group".CalcFields(Amount); + TotalAmount := "Bill Group".Amount + TotalAmount; + BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100006), ' ', '0') + end; + end; + + RegisterCode2 := RegisterCode + 8; + DLDACurrency(); + + OutText := + RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + PadStr('', 12, ' ') + + PadStr('', 40, ' ') + PadStr('', 20, ' ') + BillGrAmount + PadStr('', 6, ' ') + + ConvertStr(Format(TotalDocsCust, 10, Text1100006), ' ', '0') + ConvertStr(Format(TotalPrintedCust, 10, Text1100006), ' ', '0') + + PadStr('', 20, ' ') + PadStr('', 18, ' '); + OutFile.Write(OutText); + + TotalDocsCust := 0; + TotalPrinted := TotalPrinted + TotalPrintedCust; + TotalPrintedCust := 0; + end; + } + + trigger OnAfterGetRecord() + begin + BillGrNo := CopyStr("No.", 7, 3); + + CCCBankNo := BankAcc."CCC Bank No."; + CCCBankBranchNo := BankAcc."CCC Bank Branch No."; + CCCControlDigits := BankAcc."CCC Control Digits"; + CCCAccNo := BankAcc."CCC Bank Account No."; + + if (CCCBankNo = '') or (CCCBankBranchNo = '') or + (CCCControlDigits = '') or (CCCAccNo = '') + then + Error(Text1100005, BankAcc."No."); + + RegisterCode2 := RegisterCode + 3; + DLDACurrency(); + + Clear(OutText); + if ChargDate <> 0D then + OutText := + RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + Format(WorkDate(), 6, 5) + Format(ChargDate, 6, 5) + PadStr(CompanyInfo.Name, 40, ' ') + + ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + + ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0') + + PadStr('', 8, ' ') + '01' + PadStr('', 10, ' ') + PadStr('', 40, ' ') + PadStr('', 14, ' ') + else begin + DateMaxEfe := DateMax(); + OutText := + RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + Format(WorkDate(), 6, 5) + Format(DateMaxEfe, 6, 5) + PadStr(CompanyInfo.Name, 40, ' ') + + ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + + ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0') + + PadStr('', 8, ' ') + '01' + PadStr('', 10, ' ') + PadStr('', 40, ' ') + PadStr('', 14, ' '); + end; + OutFile.Write(OutText); + + TotalPrintedCust := TotalPrintedCust + 1; + end; + + trigger OnPostDataItem() + var + FileMgt: Codeunit "File Management"; + begin + "No. Printed" := "No. Printed" + 1; + TotalPrinted := TotalPrinted + 2; + + RegisterCode2 := RegisterCode + 9; + DLDACurrency(); + + if IsEuro then + GeneralTotal := EuroAmount(TotalAmount) + else + GeneralTotal := ConvertStr(Format(TotalAmount, 10, Text1100006), ' ', '0'); + + OutText := + RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + PadStr('', 12, ' ') + + PadStr('', 40, ' ') + '0001' + PadStr('', 16, ' ') + GeneralTotal + PadStr('', 6, ' ') + + ConvertStr(Format(TotalDocs, 10, Text1100006), ' ', '0') + ConvertStr(Format(TotalPrinted, 10, Text1100006), ' ', '0') + + PadStr('', 20, ' ') + PadStr('', 18, ' '); + OutFile.Write(OutText); + OutFile.Close(); + if not SilentMode then + Download(ExternalFile, '', 'C:', Text10701, ToFile) + else + FileMgt.CopyServerFile(ExternalFile, SilentFile, true); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + + Find('-'); + BankAcc.Get("Bank Account No."); + + if BankSuffix = '' then + Error(Text1100000); + + if BankSuffixBankAcc = '' then begin + Suffix.SetRange(Suffix, BankSuffix); + if Suffix.FindFirst() then + BankSuffixBankAcc := Suffix."Bank Acc. Code"; + end; + + if not DocMisc.CheckBankSuffix(BankSuffixBankAcc, "Bank Account No.") then + if not Confirm(Text1100001 + + Text1100002, + false, + FieldCaption("Bank Account No."), + TableCaption) + then + Error(Text1100003); + + IsEuro := DocMisc.GetRegisterCode("Currency Code", RegisterCode, RegisterString); + + RegisterCode2 := RegisterCode + 1; + DLDACurrency(); + + Clear(OutText); + OutText := + RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + Format(WorkDate(), 6, 5) + PadStr('', 6, ' ') + + PadStr(CompanyInfo.Name, 40, ' ') + PadStr('', 20, ' ') + ConvertStr(BankAcc."CCC Bank No.", ' ', '0') + + ConvertStr(BankAcc."CCC Bank Branch No.", ' ', '0') + PadStr('', 12, ' ') + PadStr('', 40, ' ') + PadStr('', 14, ' '); + OutFile.Write(OutText); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(ChargDate; ChargDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Charging Date'; + ToolTip = 'Specifies the date you want the bank to make the charge.'; + } + field(CheckErrors; CheckErrors) + { + ApplicationArea = Basic, Suite; + Caption = 'Check Errors'; + ToolTip = 'Specifies if you want error messages when sending the norms to magnetic media.'; + } + field(BankSuffix; BankSuffix) + { + ApplicationArea = Basic, Suite; + Caption = 'Bank Suffix'; + TableRelation = Suffix.Suffix; + ToolTip = 'Specifies the suffix assigned by the bank to manage bill groups. Usually, each bank assigns the company a different suffix for managing bill groups, depending on whether they are receivable or discount management operations.'; + + trigger OnLookup(var Text: Text): Boolean + var + Suffix: Record Suffix; + Suffixes: Page Suffixes; + begin + Suffixes.SetTableView(Suffix); + Suffixes.SetRecord(Suffix); + Suffixes.LookupMode(true); + Suffixes.Editable(false); + if Suffixes.RunModal() = ACTION::LookupOK then begin + Suffixes.GetRecord(Suffix); + BankSuffixBankAcc := Suffix."Bank Acc. Code"; + BankSuffix := Suffix.Suffix; + end; + end; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + if ExternalFile = '' then + ExternalFile := 'C:\' + Text10702; + end; + } + + labels + { + } + + trigger OnInitReport() + begin + CompanyInfo.Get(); + VATRegNo := CopyStr(DelChr(CompanyInfo."VAT Registration No.", '=', ' .-/'), 1, 9); + SilentMode := false; + end; + + trigger OnPreReport() + var + FileMgt: Codeunit "File Management"; + begin + // IF ChargDate = 0D THEN + // ChargDate:=; + + if WithExpenses then + Expenses := '1' + else + Expenses := '0'; + + if PrintedDocs then + PrintedDocs2 := '0' + else + PrintedDocs2 := '1'; + + OutFile.TextMode := true; + OutFile.WriteMode := true; + ExternalFile := FileMgt.ServerTempFileName(''); + ToFile := Text10702; + OutFile.Create(ExternalFile); + end; + + var + Text1100000: Label 'Bank Suffix cannot be blank.'; + Text1100001: Label 'The Bank Suffix selected belongs to a %1 different than the %2. \'; + Text1100002: Label 'Do you want to continue?.'; + Text1100003: Label 'Process cancelled by request of user.'; + Text1100005: Label 'Some data for Bank Account %1 are missing.'; + Text1100006: Label '', Locked = true; + Text1100007: Label 'There is not %1 %2 for %3 %4.'; + Text1100008: Label 'Bill'; + Text1100009: Label '', Locked = true; + Text1100010: Label 'DEVOL.'; + CompanyInfo: Record "Company Information"; + Customer: Record Customer; + CustLedgEntry: Record "Cust. Ledger Entry"; + BankAcc: Record "Bank Account"; + CustBankAcc: Record "Customer Bank Account"; + DocMisc: Codeunit "Document-Misc"; + OutFile: File; + ExternalFile: Text[1024]; + WithExpenses: Boolean; + PrintedDocs: Boolean; + CheckErrors: Boolean; + VATRegNo: Text[9]; + CCCBankNo: Text[4]; + CustCCCBankCode: Text[4]; + CCCBankBranchNo: Text[4]; + CustCCCBankBranchNo: Text[4]; + CCCControlDigits: Text[2]; + CustCCCControlDigits: Text[2]; + CCCAccNo: Text[10]; + CustCCCAccNo: Text[10]; + BillGrNo: Code[4]; + DocType: Code[1]; + AdditionalInfo: Text[30]; + AdditionalInfo2: Text[30]; + CustAddress: array[4] of Text[50]; + TotalPosted: Decimal; + TotalDocs: Decimal; + TotalDocsCust: Decimal; + TotalPrintedCust: Decimal; + TotalPrinted: Decimal; + TotalAmount: Decimal; + Expenses: Code[1]; + IsAccepted: Code[1]; + PrintedDocs2: Code[1]; + OutText: Text[162]; + ChargDate: Date; + RegisterCode: Integer; + RegisterCode2: Integer; + RegisterString: Text[2]; + DocAmount: Text[10]; + BillGrAmount: Text[10]; + GeneralTotal: Text[10]; + CustNoNIF: Text[30]; + Doc2: Record "Cartera Doc."; + DateMaxEfe: Date; + IsEuro: Boolean; + LCY: Option Euro,Other; + BankSuffix: Code[3]; + BankSuffixBankAcc: Code[20]; + Suffix: Record Suffix; + ToFile: Text[1024]; + Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; + Text10702: Label 'EFECTOS.ASC'; + SilentMode: Boolean; + SilentFile: Text; + + [Scope('OnPrem')] + procedure DLDACurrency() + begin + if StrLen(Format(RegisterCode)) = 1 then + RegisterString := '0' + Format(RegisterCode2) + else + RegisterString := Format(RegisterCode2); + end; + + [Scope('OnPrem')] + procedure EuroAmount(Amount: Decimal): Text[10] + var + TextAmount: Text[15]; + begin + TextAmount := ConvertStr(Format(Amount), ' ', '0'); + if StrPos(TextAmount, ',') = 0 then + TextAmount := TextAmount + '00' + else begin + if StrLen(CopyStr(TextAmount, StrPos(TextAmount, ','), StrLen(TextAmount))) = 2 then + TextAmount := TextAmount + '0'; + TextAmount := DelChr(TextAmount, '=', ','); + end; + if StrPos(TextAmount, '.') = 0 then + TextAmount := TextAmount + else + TextAmount := DelChr(TextAmount, '=', '.'); + + while StrLen(TextAmount) < 10 do + TextAmount := '0' + TextAmount; + + exit(TextAmount); + end; + + [Scope('OnPrem')] + procedure DateMax() Datemax: Date + begin + Doc2.SetRange(Type, 0); + Doc2.SetRange("Bill Gr./Pmt. Order No.", "Bill Group"."No."); + Doc2.Find('-'); + Datemax := Doc2."Due Date"; + repeat + if Datemax < Doc2."Due Date" then + Datemax := Doc2."Due Date"; + until Doc2.Next() = 0; + Doc2.Reset(); + exit(Datemax); + end; + + [Scope('OnPrem')] + procedure EnableSilentMode(FileName: Text) + begin + SilentMode := true; + SilentFile := FileName; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN32.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN32.Codeunit.al new file mode 100644 index 00000000000..d73e58b2555 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN32.Codeunit.al @@ -0,0 +1,31 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.DirectDebit; + +codeunit 7000093 "Bill group - Export N32" +{ + TableNo = "Direct Debit Collection Entry"; + + trigger OnRun() + var + BillGroup: Record "Bill Group"; + DirectDebitCollection: Record "Direct Debit Collection"; + BillGroupNo: Code[20]; + begin + DirectDebitCollection.Get(Rec.GetRangeMin("Direct Debit Collection No.")); + BillGroupNo := DirectDebitCollection.Identifier; + DirectDebitCollection.Delete(); + if not BillGroup.Get(BillGroupNo) then + Error(ExportDirectDebitErr); + Commit(); + REPORT.Run(REPORT::"Bill group - Export N32", true, false, BillGroup); + end; + + var + ExportDirectDebitErr: Label 'You cannot export the direct debit with the selected SEPA Direct Debit Exp. Format in To Bank Account No.'; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN32.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN32.Report.al new file mode 100644 index 00000000000..65e103d1b4c --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN32.Report.al @@ -0,0 +1,440 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.IO; + +report 7000093 "Bill group - Export N32" +{ + Caption = 'Bill group - Export N32'; + Permissions = TableData "Bill Group" = m; + ProcessingOnly = true; + + dataset + { + dataitem("Bill Group"; "Bill Group") + { + DataItemTableView = sorting("No.") where(Factoring = const(" ")); + RequestFilterFields = "No."; + dataitem(Doc; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Receivable)); + + trigger OnAfterGetRecord() + begin + DocNo := CopyStr("Document No.", 1, 10) + '/' + "No."; + + DocType := DocMisc.DocType("Payment Method Code"); + + CustLedgEntry.Get("Entry No."); + + Customer.Get(CustLedgEntry."Customer No."); + if not CustBankAcc.Get(CustLedgEntry."Customer No.", "Cust./Vendor Bank Acc. Code") then + Error(Text1100007); + + Customer2 := CustBankAcc."CCC Bank No."; + CustCCCBankBranchNo := CustBankAcc."CCC Bank Branch No."; + CustCCCControlDigits := CustBankAcc."CCC Control Digits"; + CustCCCAccNo := CustBankAcc."CCC Bank Account No."; + + if (Customer2 = '') or (CustCCCBankBranchNo = '') or + (CustCCCControlDigits = '') or (CustCCCAccNo = '') + then + Error(Text1100008, CustBankAcc."Customer No."); + + CustAddress[1] := Customer.Name; + CustAddress[2] := Customer.Address; + CustAddress[3] := Customer.City; + CustAddress[4] := Customer."Post Code"; + + AdditionalInfo := Text1100009 + "Document No." + '/' + "No."; + + if Accepted = Accepted::Yes then + IsAccepted := '1' + else + IsAccepted := '2'; + + TotalDocs := TotalDocs + 1; + TotalPosted := TotalPosted + 3; + + case true of + LCY = LCY::Euro: + if IsEuro then begin + DocAmount := DelStr(EuroAmount("Remaining Amt. (LCY)"), 1, 1); + TotalAmount := TotalAmount + "Remaining Amt. (LCY)"; + end else begin + DocAmount := ConvertStr(Format("Remaining Amount", 9, Text1100010), ' ', '0'); + TotalAmount := TotalAmount + "Remaining Amount"; + end; + LCY = LCY::Other: + begin + if IsEuro then + DocAmount := DelStr(EuroAmount("Remaining Amount"), 1, 1) + else + DocAmount := ConvertStr(Format("Remaining Amount", 9, Text1100010), ' ', '0'); + TotalAmount := TotalAmount + "Remaining Amount"; + end; + end; + + Clear(OutText); + OutText := + '25' + RegisterString + ' ' + PadStr(DocNo, 15, ' ') + Format(WorkDate(), 6, 5) + PadStr(BillGrNo, 4, '0') + + PadStr(CopyStr(CompanyInfo."Post Code", 1, 2), 2, '0') + PadStr('', 9, ' ') + PadStr(CompanyInfo.City, 20, ' ') + + PadStr('', 25, ' ') + DocAmount + + PadStr('', 15, ' ') + Format("Due Date", 6, 5); + OutFile.Write(OutText); + + Clear(OutText); + OutText := + '26' + RegisterString + ' ' + PadStr(DocNo, 15, ' ') + PadStr('', 2, ' ') + DocType + Format("Bill Group"."Posting Date", 6, 5) + + IsAccepted + Expenses + Customer2 + CustCCCBankBranchNo + CustCCCControlDigits + CustCCCAccNo + + PadStr(CompanyInfo.Name, 34, ' ') + PadStr(CustAddress[1], 34, ' ') + PadStr(AdditionalInfo, 3, ' '); + OutFile.Write(OutText); + + Clear(OutText); + OutText := + '27' + RegisterString + ' ' + PadStr(DocNo, 15, ' ') + PadStr('', 2, ' ') + PadStr(CustAddress[2], 34, ' ') + + PadStr(CustAddress[4], 5, ' ') + PadStr(CustAddress[3], 20, ' ') + PadStr(CustAddress[4], 2, ' '); + OutFile.Write(OutText); + end; + + trigger OnPostDataItem() + begin + case true of + LCY = LCY::Euro: + if IsEuro then begin + "Bill Group".CalcFields("Amount (LCY)"); + BillGrAmount := EuroAmount("Bill Group"."Amount (LCY)") + end else begin + "Bill Group".CalcFields(Amount); + BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100006), ' ', '0') + end; + LCY = LCY::Other: + if IsEuro then begin + "Bill Group".CalcFields(Amount); + BillGrAmount := EuroAmount("Bill Group".Amount) + end else begin + "Bill Group".CalcFields(Amount); + BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100006), ' ', '0') + end; + end; + + TotalPosted := TotalPosted + 2; + Clear(OutText); + OutText := + '71' + RegisterString + ' ' + Format(WorkDate(), 6, 5) + PadStr(BillGrNo, 4, '0') + PadStr('', 59, ' ') + + BillGrAmount + PadStr('', 46, ' ') + + ConvertStr(Format(TotalPosted, 7, Text1100006), ' ', '0') + + ConvertStr(Format(TotalDocs, 6, Text1100006), ' ', '0'); + OutFile.Write(OutText); + + DiskTotalPosted := DiskTotalPosted + TotalPosted; + DiskTotalDocs := DiskTotalDocs + TotalDocs; + end; + + trigger OnPreDataItem() + begin + TotalDocs := 0; + TotalPosted := 0; + end; + } + + trigger OnAfterGetRecord() + begin + if StrLen("No.") <= 4 then + BillGrNo := PadStr("No.", 4, '0') + else + BillGrNo := CopyStr("No.", StrLen("No.") - 3, 4); + + Clear(OutText); + OutText := + '11' + RegisterString + ' ' + Format(WorkDate(), 6, 5) + PadStr(ConvertStr(BillGrNo, ' ', '0'), 4, '0') + + PadStr('', 12, ' ') + PadStr(VATRegNo, 9, ' ') + PadStr(BankSuffix, 6, ' ') + PrintedDocs2 + PadStr('', 21, ' ') + + ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + + ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0') + + ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + + ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0') + + ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + + ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0'); + OutFile.Write(OutText); + end; + + trigger OnPostDataItem() + var + FileMgt: Codeunit "File Management"; + begin + "No. Printed" := "No. Printed" + 1; + Clear(OutText); + + if IsEuro then + OutText := + '98' + RegisterString + ' ' + PadStr('', 69, ' ') + EuroAmount(TotalAmount) + + PadStr('', 41, ' ') + ConvertStr(Format(TotalBillGr, 5, Text1100006), ' ', '0') + + ConvertStr(Format(DiskTotalPosted + 2, 7, Text1100006), ' ', '0') + + ConvertStr(Format(DiskTotalDocs, 6, Text1100006), ' ', '0') + else + OutText := + '98' + RegisterString + ' ' + PadStr('', 69, ' ') + ConvertStr(Format(TotalAmount, 10, Text1100006), ' ', '0') + + PadStr('', 41, ' ') + ConvertStr(Format(TotalBillGr, 5, Text1100006), ' ', '0') + + ConvertStr(Format(DiskTotalPosted + 2, 7, Text1100006), ' ', '0') + + ConvertStr(Format(DiskTotalDocs, 6, Text1100006), ' ', '0'); + + OutFile.Write(OutText); + OutFile.Close(); + + if SilentMode then + FileMgt.CopyServerFile(ExternalFile, SilentModeFileName, true) + else + Download(ExternalFile, '', 'C:', Text10701, ToFile); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + + Find('-'); + + if BankSuffix = '' then + Error(Text1100000); + + if BankSuffixBankAcc = '' then begin + Suffix.SetRange(Suffix, BankSuffix); + if Suffix.FindFirst() then + BankSuffixBankAcc := Suffix."Bank Acc. Code"; + end; + + IsEuro := DocMisc.GetRegisterCode("Currency Code", TotalBillGr, RegisterString); + + if not DocMisc.CheckBankSuffix(BankSuffixBankAcc, "Bank Account No.") then + if not Confirm(Text1100002 + + Text1100003, + false, + FieldCaption("Bank Account No."), + TableCaption) + then + Error(Text1100004); + + TotalBillGr := Count; + + if StrLen("No.") <= 4 then + DiskNo := PadStr("No.", 4, '0') + else + DiskNo := CopyStr("No.", StrLen("No.") - 3, 4); + + BankAcc.Get("Bank Account No."); + CCCBankNo := BankAcc."CCC Bank No."; + CCCBankBranchNo := BankAcc."CCC Bank Branch No."; + CCCControlDigits := BankAcc."CCC Control Digits"; + CCCAccNo := BankAcc."CCC Bank Account No."; + + if (CCCBankNo = '') or (CCCBankBranchNo = '') or + (CCCControlDigits = '') or (CCCAccNo = '') + then + Error(Text1100005, BankAcc."No."); + + Clear(OutText); + OutText := + '02' + RegisterString + ' ' + Format(WorkDate(), 6, 5) + PadStr(ConvertStr(DiskNo, ' ', '0'), 4, '0') + + PadStr('', 35, ' ') + PadStr(ConvertStr(CCCBankNo, ' ', '0'), 4, '0') + + PadStr(ConvertStr(CCCBankBranchNo, ' ', '0'), 4, '0'); + OutFile.Write(OutText); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(WithExpenses; WithExpenses) + { + ApplicationArea = Basic, Suite; + Caption = 'With Expenses'; + ToolTip = 'Specifies if you want the bills included in the bill group to show expenses. Deselect the check box (default option) when the bills included will be without expenses.'; + } + field(PrintedDocs; PrintedDocs) + { + ApplicationArea = Basic, Suite; + Caption = 'Printed Bills Attached'; + ToolTip = 'Specifies if the printed bill will be attached to the export.'; + } + field(BankSuffix; BankSuffix) + { + ApplicationArea = Basic, Suite; + Caption = 'Bank Suffix'; + TableRelation = Suffix.Suffix; + ToolTip = 'Specifies the suffix assigned by the bank to manage bill groups. Usually, each bank assigns the company a different suffix for managing bill groups, depending on whether they are receivable or discount management operations.'; + + trigger OnLookup(var Text: Text): Boolean + var + Suffix: Record Suffix; + Suffixes: Page Suffixes; + begin + Suffixes.SetTableView(Suffix); + Suffixes.SetRecord(Suffix); + Suffixes.LookupMode(true); + Suffixes.Editable(false); + if Suffixes.RunModal() = ACTION::LookupOK then begin + Suffixes.GetRecord(Suffix); + BankSuffixBankAcc := Suffix."Bank Acc. Code"; + BankSuffix := Suffix.Suffix; + end; + end; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + if ExternalFile = '' then + ExternalFile := 'C:\' + Text10702; + end; + } + + labels + { + } + + trigger OnInitReport() + begin + CompanyInfo.Get(); + VATRegNo := CopyStr(DelChr(CompanyInfo."VAT Registration No.", '=', ' .-/'), 1, 9); + end; + + trigger OnPreReport() + var + FileMgt: Codeunit "File Management"; + begin + if WithExpenses then + Expenses := '1' + else + Expenses := '0'; + + if PrintedDocs then + PrintedDocs2 := '0' + else + PrintedDocs2 := '1'; + + OutFile.TextMode := true; + OutFile.WriteMode := true; + ExternalFile := FileMgt.ServerTempFileName(''); + ToFile := Text10702; + OutFile.Create(ExternalFile); + + TotalAmount := 0; + DiskTotalPosted := 0; + DiskTotalDocs := 0; + end; + + var + Text1100000: Label 'Bank Suffix cannot be blank.'; + Text1100002: Label 'The Bank Suffix selected belongs to a %1 different than the %2. \'; + Text1100003: Label 'Do you want to continue?.'; + Text1100004: Label 'Process cancelled by request of user.'; + Text1100005: Label 'Some data for Bank Account %1 are missing.'; + Text1100006: Label '', Locked = true; + Text1100007: Label 'There is no bank account information for Customer %1.'; + Text1100008: Label 'Some data from the Bank Account of Customer %1 are missing.'; + Text1100009: Label 'Bill'; + Text1100010: Label '', Locked = true; + CompanyInfo: Record "Company Information"; + Customer: Record Customer; + CustLedgEntry: Record "Cust. Ledger Entry"; + BankAcc: Record "Bank Account"; + CustBankAcc: Record "Customer Bank Account"; + DocMisc: Codeunit "Document-Misc"; + OutFile: File; + ExternalFile: Text[1024]; + WithExpenses: Boolean; + PrintedDocs: Boolean; + VATRegNo: Text[9]; + CCCBankNo: Text[4]; + Customer2: Text[4]; + CCCBankBranchNo: Text[4]; + CustCCCBankBranchNo: Text[4]; + CCCControlDigits: Text[2]; + CustCCCControlDigits: Text[2]; + CCCAccNo: Text[10]; + CustCCCAccNo: Text[10]; + DiskNo: Code[4]; + BillGrNo: Code[4]; + DocNo: Code[15]; + DocType: Code[1]; + AdditionalInfo: Text[30]; + CustAddress: array[4] of Text[100]; + TotalBillGr: Integer; + TotalPosted: Integer; + TotalDocs: Integer; + DiskTotalPosted: Integer; + DiskTotalDocs: Integer; + TotalAmount: Decimal; + DocAmount: Text[10]; + BillGrAmount: Text[10]; + Expenses: Code[1]; + IsAccepted: Code[1]; + PrintedDocs2: Code[1]; + OutText: Text[150]; + RegisterString: Text[2]; + IsEuro: Boolean; + LCY: Option Euro,Other; + BankSuffix: Code[3]; + BankSuffixBankAcc: Code[20]; + Suffix: Record Suffix; + ToFile: Text[1024]; + Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; + Text10702: Label 'EFECTOS.ASC'; + SilentMode: Boolean; + SilentModeFileName: Text; + + [Scope('OnPrem')] + procedure EuroAmount(Amount: Decimal): Text[10] + var + TextAmount: Text[15]; + begin + TextAmount := ConvertStr(Format(Amount), ' ', '0'); + if StrPos(TextAmount, ',') = 0 then + TextAmount := TextAmount + '00' + else begin + if StrLen(CopyStr(TextAmount, StrPos(TextAmount, ','), StrLen(TextAmount))) = 2 then + TextAmount := TextAmount + '0'; + TextAmount := DelChr(TextAmount, '=', ','); + end; + + if StrPos(TextAmount, '.') = 0 then + TextAmount := TextAmount + else + TextAmount := DelChr(TextAmount, '=', '.'); + + while StrLen(TextAmount) < 10 do + TextAmount := '0' + TextAmount; + + exit(TextAmount); + end; + + [Scope('OnPrem')] + procedure EnableSilentMode(FileName: Text) + begin + SilentMode := true; + SilentModeFileName := FileName; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN58.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN58.Codeunit.al new file mode 100644 index 00000000000..8f2c69f87c4 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN58.Codeunit.al @@ -0,0 +1,31 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.DirectDebit; + +codeunit 7000091 "Bill group - Export N58" +{ + TableNo = "Direct Debit Collection Entry"; + + trigger OnRun() + var + BillGroup: Record "Bill Group"; + DirectDebitCollection: Record "Direct Debit Collection"; + BillGroupNo: Code[20]; + begin + DirectDebitCollection.Get(Rec.GetRangeMin("Direct Debit Collection No.")); + BillGroupNo := DirectDebitCollection.Identifier; + DirectDebitCollection.Delete(); + if not BillGroup.Get(BillGroupNo) then + Error(ExportDirectDebitErr); + Commit(); + REPORT.Run(REPORT::"Bill group - Export N58", true, false, BillGroup); + end; + + var + ExportDirectDebitErr: Label 'You cannot export the direct debit with the selected SEPA Direct Debit Exp. Format in To Bank Account No.'; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN58.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN58.Report.al new file mode 100644 index 00000000000..a97cdca99a0 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportN58.Report.al @@ -0,0 +1,470 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.IO; + +report 7000091 "Bill group - Export N58" +{ + Caption = 'Bill group - Export N58'; + Permissions = TableData "Bill Group" = m; + ProcessingOnly = true; + + dataset + { + dataitem("Bill Group"; "Bill Group") + { + DataItemTableView = sorting("No.") where(Factoring = const(" ")); + RequestFilterFields = "No."; + dataitem(Doc; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where(Type = const(Receivable)); + + trigger OnAfterGetRecord() + begin + DocType := DocMisc.DocType("Payment Method Code"); + + CustLedgEntry.Get("Entry No."); + + Customer.Get(CustLedgEntry."Customer No."); + if not CustBankAcc.Get(CustLedgEntry."Customer No.", "Cust./Vendor Bank Acc. Code") then begin + CustCCCBankCode := '0000'; + CustCCCBankBranchNo := '0000'; + CustCCCControlDigits := '00'; + CustCCCAccNo := '0000000000'; + NotDom := true; + end else begin + CustCCCBankCode := CustBankAcc."CCC Bank No."; + CustCCCBankBranchNo := CustBankAcc."CCC Bank Branch No."; + CustCCCControlDigits := CustBankAcc."CCC Control Digits"; + CustCCCAccNo := CustBankAcc."CCC Bank Account No."; + NotDom := false; + if Checkerrors then begin + DocMisc.CheckControlDigit(CustCCCControlDigits, CustCCCBankCode, CustCCCAccNo, CustCCCBankBranchNo); + if (CustBankAcc."CCC Control Digits" <> CustCCCControlDigits) and (CustCCCControlDigits <> '**') then begin + CustBankAcc."CCC Control Digits" := CustCCCControlDigits; + CustBankAcc.Modify(); + end; + end; + end; + + if (CustCCCBankCode = '') or (CustCCCBankBranchNo = '') or + (CustCCCControlDigits = '') or (CustCCCAccNo = '') + then begin + CustCCCBankCode := '0000'; + CustCCCBankBranchNo := '0000'; + CustCCCControlDigits := '00'; + CustCCCAccNo := '0000000000'; + NotDom := true; + end; + + CustAddress[1] := Customer.Name; + CustAddress[2] := Customer.Address; + CustAddress[3] := Customer.City; + CustAddress[4] := Customer."Post Code"; + CustNoNIF := Customer."VAT Registration No."; + AdditionalInfo := Text1100008 + "Document No." + '/' + "No."; + AdditionalInfo2 := "Document No." + '/' + "No."; + + if Accepted = Accepted::Yes then + IsAccepted := '1' + else + IsAccepted := '0'; + + TotalDoc := TotalDoc + 1; + TotalDocsCust := TotalDocsCust + 1; + TotalPrintedCust := TotalPrintedCust + 1; + TotalPosted := TotalPosted + 3; + + case true of + LCY = LCY::Euro: + if IsEuro then + DocAmount := EuroAmount("Remaining Amt. (LCY)") + else + DocAmount := ConvertStr(Format("Remaining Amount", 10, Text1100006), ' ', '0'); + LCY = LCY::Other: + if IsEuro then + DocAmount := EuroAmount("Remaining Amount") + else + DocAmount := ConvertStr(Format("Remaining Amount", 10, Text1100006), ' ', '0'); + end; + + RegisterCode2 := RegisterCode + 6; + DLDACurrency(); + + Clear(OutText); + OutText := + RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + PadStr(Format(CustNoNIF), 12, ' ') + + PadStr(Format(Customer.Name), 40, ' ') + ConvertStr(PadStr(CustCCCBankCode, 4, ' '), ' ', '0') + + ConvertStr(PadStr(CustCCCBankBranchNo, 4, ' '), ' ', '0') + PadStr(CustCCCControlDigits, 2, ' ') + + ConvertStr(PadStr(CustCCCAccNo, 10, ' '), ' ', '0') + DocAmount + + Text1100009 + PadStr(AdditionalInfo2, 10, ' ') + PadStr(AdditionalInfo, 40, ' ') + + Format("Due Date", 6, 5) + PadStr('', 2, ' '); + + OutFile.Write(OutText); + PostalCode.Get(CompanyInfo."Post Code", CompanyInfo.City); + + if NotDom then begin + Clear(OutText); + OutText := + RegisterString + '76' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + PadStr(Format(CustNoNIF), 12, ' ') + PadStr(CustAddress[2], 40, ' ') + + PadStr(CustAddress[3], 35, ' ') + PadStr(CustAddress[4], 8, '0') + + PadStr(CompanyInfo.City, 35, ' ') + CopyStr(PostalCode."County Code", 1, 2) + + Format("Bill Group"."Posting Date", 6, 5) + PadStr('', 8, ' '); + + OutFile.Write(OutText); + TotalPrintedCust := TotalPrintedCust + 1; + end; + end; + + trigger OnPostDataItem() + begin + Clear(OutText); + TotalPrintedCust := TotalPrintedCust + 1; + + case true of + LCY = LCY::Euro: + if IsEuro then begin + "Bill Group".CalcFields("Amount (LCY)"); + TotalAmount := "Bill Group"."Amount (LCY)" + TotalAmount; + BillGrAmount := EuroAmount("Bill Group"."Amount (LCY)") + end else begin + "Bill Group".CalcFields(Amount); + TotalAmount := "Bill Group".Amount + TotalAmount; + BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100007), ' ', '0') + end; + LCY = LCY::Other: + if IsEuro then begin + "Bill Group".CalcFields(Amount); + TotalAmount := "Bill Group".Amount + TotalAmount; + BillGrAmount := EuroAmount("Bill Group".Amount) + end else begin + "Bill Group".CalcFields(Amount); + TotalAmount := "Bill Group".Amount + TotalAmount; + BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100007), ' ', '0') + end; + end; + + RegisterCode2 := RegisterCode + 8; + DLDACurrency(); + + OutText := + RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + PadStr('', 12, ' ') + PadStr('', 40, ' ') + + PadStr('', 20, ' ') + BillGrAmount + PadStr('', 6, ' ') + ConvertStr(Format(TotalDocsCust, 10, Text1100007), ' ', '0') + + ConvertStr(Format(TotalPrintedCust, 10, Text1100007), ' ', '0') + PadStr('', 20, ' ') + PadStr('', 18, ' '); + OutFile.Write(OutText); + + TotalDocsCust := 0; + TotalPrinted := TotalPrinted + TotalPrintedCust; + TotalPrintedCust := 0; + end; + } + + trigger OnAfterGetRecord() + begin + BillGrNo := CopyStr("No.", 7, 3); + + RegisterCode2 := RegisterCode + 3; + DLDACurrency(); + + Clear(OutText); + OutText := + RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + Format(WorkDate(), 6, 5) + PadStr('', 6, ' ') + + PadStr(CompanyInfo.Name, 40, ' ') + ConvertStr(CCCBankNo, ' ', '0') + + ConvertStr(CCCBankBranchNo, ' ', '0') + ConvertStr(CCCControlDigits, ' ', '0') + + ConvertStr(CCCAccNo, ' ', '0') + PadStr('', 8, ' ') + '06' + PadStr('', 10, ' ') + + PadStr('', 40, ' ') + PadStr('', 2, ' ') + '000000000' + PadStr('', 3, ' '); + OutFile.Write(OutText); + + TotalPrintedCust := TotalPrintedCust + 1; + end; + + trigger OnPostDataItem() + var + FileMgt: Codeunit "File Management"; + begin + "No. Printed" := "No. Printed" + 1; + TotalPrinted := TotalPrinted + 2; + + RegisterCode2 := RegisterCode + 9; + DLDACurrency(); + + if IsEuro then + OutText := + RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + PadStr('', 12, ' ') + PadStr('', 40, ' ') + + '0001' + PadStr('', 16, ' ') + EuroAmount(TotalAmount) + PadStr('', 6, ' ') + + ConvertStr(Format(TotalDoc, 10, Text1100006), ' ', '0') + ConvertStr(Format(TotalPrinted, 10, Text1100006), ' ', '0') + + PadStr('', 20, ' ') + PadStr('', 18, ' ') + else + OutText := + RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + PadStr('', 12, ' ') + PadStr('', 40, ' ') + + '0001' + PadStr('', 16, ' ') + ConvertStr(Format(TotalAmount, 10, Text1100007), ' ', '0') + PadStr('', 6, ' ') + + ConvertStr(Format(TotalDoc, 10, Text1100007), ' ', '0') + ConvertStr(Format(TotalPrinted, 10, Text1100007), ' ', '0') + + PadStr('', 20, ' ') + PadStr('', 18, ' '); + + OutFile.Write(OutText); + OutFile.Close(); + + if SilentMode then + FileMgt.CopyServerFile(ExternalFile, SilentModeFileName, true) + else + Download(ExternalFile, '', 'C:', Text10701, ToFile); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + + Find('-'); + + if BankSuffix = '' then + Error(Text1100000); + + if BankSuffixBankAcc = '' then begin + Suffix.SetRange(Suffix, BankSuffix); + if Suffix.FindFirst() then + BankSuffixBankAcc := Suffix."Bank Acc. Code"; + end; + + if not DocMisc.CheckBankSuffix(BankSuffixBankAcc, "Bank Account No.") then + if not Confirm(Text1100001 + + Text1100002, + false, + FieldCaption("Bank Account No."), + TableCaption) + then + Error(Text1100003); + + BankAcc.Get("Bank Account No."); + CCCBankNo := BankAcc."CCC Bank No."; + CCCBankBranchNo := BankAcc."CCC Bank Branch No."; + CCCControlDigits := BankAcc."CCC Control Digits"; + CCCAccNo := BankAcc."CCC Bank Account No."; + + if (CCCBankNo = '') or (CCCBankBranchNo = '') or + (CCCControlDigits = '') or (CCCAccNo = '') + then + Error(Text1100004, BankAcc."No."); + + IsEuro := DocMisc.GetRegisterCode("Currency Code", RegisterCode, RegisterString); + + RegisterCode2 := RegisterCode + 1; + DLDACurrency(); + + Clear(OutText); + OutText := + RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + + Format(WorkDate(), 6, 5) + PadStr('', 6, ' ') + + PadStr(CompanyInfo.Name, 40, ' ') + PadStr('', 20, ' ') + ConvertStr(BankAcc."CCC Bank No.", ' ', '0') + + ConvertStr(BankAcc."CCC Bank Branch No.", ' ', '0') + PadStr('', 12, ' ') + PadStr('', 40, ' ') + PadStr('', 14, ' '); + OutFile.Write(OutText); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CheckErrors; Checkerrors) + { + ApplicationArea = Basic, Suite; + Caption = 'Check Errors'; + ToolTip = 'Specifies if you want error messages when sending the norms to magnetic media.'; + } + field(BankSuffix; BankSuffix) + { + ApplicationArea = Basic, Suite; + Caption = 'Bank Suffix'; + TableRelation = Suffix.Suffix; + ToolTip = 'Specifies the suffix assigned by the bank to manage bill groups. Usually, each bank assigns the company a different suffix for managing bill groups, depending on whether they are receivable or discount management operations.'; + + trigger OnLookup(var Text: Text): Boolean + var + Suffix: Record Suffix; + Suffixes: Page Suffixes; + begin + Suffixes.SetTableView(Suffix); + Suffixes.SetRecord(Suffix); + Suffixes.LookupMode(true); + Suffixes.Editable(false); + if Suffixes.RunModal() = ACTION::LookupOK then begin + Suffixes.GetRecord(Suffix); + BankSuffixBankAcc := Suffix."Bank Acc. Code"; + BankSuffix := Suffix.Suffix; + end; + end; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + if ExternalFile = '' then + ExternalFile := 'C:\' + Text10702; + end; + } + + labels + { + } + + trigger OnInitReport() + begin + CompanyInfo.Get(); + VATRegNo := CopyStr(DelChr(CompanyInfo."VAT Registration No.", '=', ' .-/'), 1, 9); + SilentMode := false; + end; + + trigger OnPreReport() + var + FileMgt: Codeunit "File Management"; + begin + if WithExpenses then + Expenses := '1' + else + Expenses := '0'; + + if PrintedDocs then + PrintedDocs2 := '0' + else + PrintedDocs2 := '1'; + + OutFile.TextMode := true; + OutFile.WriteMode := true; + ExternalFile := FileMgt.ServerTempFileName(''); + ToFile := Text10702; + OutFile.Create(ExternalFile); + end; + + var + Text1100000: Label 'Bank Suffix cannot be blank.'; + Text1100001: Label 'The Bank Suffix selected belongs to a %1 different than the %2. \'; + Text1100002: Label 'Do you want to continue?.'; + Text1100003: Label 'Process cancelled by request of user.'; + Text1100004: Label 'Some data for Bank Account %1 are missing.'; + Text1100006: Label '', Locked = true; + Text1100007: Label '', Locked = true; + Text1100008: Label 'Bill'; + Text1100009: Label 'DEVOL.'; + CompanyInfo: Record "Company Information"; + Customer: Record Customer; + CustLedgEntry: Record "Cust. Ledger Entry"; + BankAcc: Record "Bank Account"; + CustBankAcc: Record "Customer Bank Account"; + PostalCode: Record "Post Code"; + DocMisc: Codeunit "Document-Misc"; + OutFile: File; + ExternalFile: Text[1024]; + WithExpenses: Boolean; + PrintedDocs: Boolean; + Checkerrors: Boolean; + NotDom: Boolean; + VATRegNo: Text[9]; + CCCBankNo: Text[4]; + CustCCCBankCode: Text[4]; + CCCBankBranchNo: Text[4]; + CustCCCBankBranchNo: Text[4]; + CCCControlDigits: Text[2]; + CustCCCControlDigits: Text[2]; + CCCAccNo: Text[10]; + CustCCCAccNo: Text[10]; + BillGrNo: Code[4]; + DocType: Code[1]; + AdditionalInfo: Text[30]; + AdditionalInfo2: Text[30]; + CustAddress: array[4] of Text[100]; + TotalPosted: Decimal; + TotalDoc: Decimal; + TotalDocsCust: Decimal; + TotalPrintedCust: Decimal; + TotalPrinted: Decimal; + TotalAmount: Decimal; + Expenses: Code[1]; + IsAccepted: Code[1]; + PrintedDocs2: Code[1]; + OutText: Text[162]; + RegisterCode: Integer; + RegisterCode2: Integer; + RegisterString: Text[2]; + DocAmount: Text[10]; + BillGrAmount: Text[10]; + CustNoNIF: Text[20]; + IsEuro: Boolean; + LCY: Option Euro,Other; + BankSuffix: Code[3]; + BankSuffixBankAcc: Code[20]; + Suffix: Record Suffix; + ToFile: Text[1024]; + Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; + Text10702: Label 'EFECTOS.ASC'; + SilentMode: Boolean; + SilentModeFileName: Text; + + [Scope('OnPrem')] + procedure DLDACurrency() + begin + if StrLen(Format(RegisterCode)) = 1 then + RegisterString := '0' + Format(RegisterCode2) + else + RegisterString := Format(RegisterCode2); + end; + + [Scope('OnPrem')] + procedure EuroAmount(Amount: Decimal): Text[10] + var + TextAmount: Text[15]; + begin + TextAmount := ConvertStr(Format(Amount), ' ', '0'); + if StrPos(TextAmount, ',') = 0 then + TextAmount := TextAmount + '00' + else begin + if StrLen(CopyStr(TextAmount, StrPos(TextAmount, ','), StrLen(TextAmount))) = 2 then + TextAmount := TextAmount + '0'; + TextAmount := DelChr(TextAmount, '=', ','); + end; + if StrPos(TextAmount, '.') = 0 then + TextAmount := TextAmount + else + TextAmount := DelChr(TextAmount, '=', '.'); + + while StrLen(TextAmount) < 10 do + TextAmount := '0' + TextAmount; + + exit(TextAmount); + end; + + [Scope('OnPrem')] + procedure EnableSilentMode(FileName: Text) + begin + SilentMode := true; + SilentModeFileName := FileName; + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportfactoring.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportfactoring.Codeunit.al new file mode 100644 index 00000000000..d82f9bed4ff --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportfactoring.Codeunit.al @@ -0,0 +1,31 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.DirectDebit; + +codeunit 7000089 "Bill group - Export factoring" +{ + TableNo = "Direct Debit Collection Entry"; + + trigger OnRun() + var + BillGroup: Record "Bill Group"; + DirectDebitCollection: Record "Direct Debit Collection"; + BillGroupNo: Code[20]; + begin + DirectDebitCollection.Get(Rec.GetRangeMin("Direct Debit Collection No.")); + BillGroupNo := DirectDebitCollection.Identifier; + DirectDebitCollection.Delete(); + if not BillGroup.Get(BillGroupNo) then + Error(ExportDirectDebitErr); + Commit(); + REPORT.Run(REPORT::"Bill group - Export factoring", true, false, BillGroup); + end; + + var + ExportDirectDebitErr: Label 'You cannot export the direct debit with the selected SEPA Direct Debit Exp. Format in To Bank Account No.'; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportfactoring.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportfactoring.Report.al new file mode 100644 index 00000000000..209b61768cd --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/BillgroupExportfactoring.Report.al @@ -0,0 +1,303 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.IO; + +report 7000089 "Bill group - Export factoring" +{ + ApplicationArea = Basic, Suite; + Caption = 'Bill group - Export factoring'; + Permissions = TableData "Bill Group" = m; + ProcessingOnly = true; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem("Bill Group"; "Bill Group") + { + RequestFilterFields = "No."; + dataitem("Cartera Doc."; "Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemTableView = sorting(Type, "Bill Gr./Pmt. Order No.", "Collection Agent", "Due Date", "Global Dimension 1 Code", "Global Dimension 2 Code", "Category Code", "Posting Date", "Document No.", Accepted, "Currency Code", "Document Type"); + + trigger OnAfterGetRecord() + begin + TestField("Account No."); + Customer.Get("Account No."); + if "Document Type" = "Document Type"::Invoice then begin + TotalDocCust := TotalDocCust + 1; + if PaymentMethod.Get("Payment Method Code") then + DocType := ' ' + else + case PaymentMethod."Bill Type" of + "ES Bill Type"::"Bill of Exchange": + DocType := Text1100009; + "ES Bill Type"::Receipt: + DocType := Text1100010; + "ES Bill Type"::IOU: + DocType := Text1100011; + "ES Bill Type"::Check: + DocType := Text1100012; + "ES Bill Type"::Transfer: + DocType := Text1100013; + else + DocType := ' '; + end; + + RmgAmount := FormatNumber(Round("Remaining Amount" * 100, 1), 15); + + TotalAmount := TotalAmount + "Remaining Amount"; + CustPostCode := DelStr(Customer."Post Code", 1, StrPos(Customer."Post Code", '-')); + + GetCurrencyCode("Cartera Doc.", CurrCode); + + OutText := '09' + PadStr('', 5, '0') + PadStr(Customer.Name, 30, ' ') + PadStr(Customer."VAT Registration No.", 14, ' ') + + PadStr(Customer.Address, 30, ' ') + PadStr(Customer.City, 30, ' ') + + (PadStr('', 5 - StrLen(CustPostCode), '0') + CustPostCode) + Text1100014 + PadStr("Document No.", 10, ' ') + PadStr('', 10, ' ') + + Format("Posting Date", 0, Text1100007) + + Format("Due Date", 0, Text1100007) + RmgAmount + PadStr('', 2, '0') + PadStr('', 2, '0') + PadStr('', 2, '0') + + CCCBankNo + CCCBankBranchNo + CCCAccNo + DocType + PadStr("Account No.", 15, ' ') + CCCControlDigits + + Text1100015 + CurrCode + PadStr('', 21, ' '); + OutFile.Write(OutText); + end; + end; + } + + trigger OnAfterGetRecord() + begin + if Factoring = Factoring::" " then + Error(Text1100005, "No."); + + TestField("Bank Account No."); + BankAcc.Get("Bank Account No."); + + CCCBankNo := BankAcc."CCC Bank No."; + CCCBankBranchNo := BankAcc."CCC Bank Branch No."; + CCCAccNo := BankAcc."CCC Bank Account No."; + CCCControlDigits := BankAcc."CCC Control Digits"; + + if (CCCBankNo = '') or (CCCBankBranchNo = '') or + (CCCControlDigits = '') or (CCCAccNo = '') + then + Error(Text1100006, BankAcc."No."); + + CCCBankNo := PadStr('', MaxStrLen(CCCBankNo) - StrLen(CCCBankNo), '0') + CCCBankNo; + CCCBankBranchNo := PadStr('', MaxStrLen(CCCBankBranchNo) - StrLen(CCCBankBranchNo), '0') + CCCBankBranchNo; + CCCAccNo := PadStr('', MaxStrLen(CCCAccNo) - StrLen(CCCAccNo), '0') + CCCAccNo; + if CCCControlDigits = '' then + CCCControlDigits := PadStr('', MaxStrLen(CCCControlDigits), ' ') + else + CCCControlDigits := PadStr('', MaxStrLen(CCCControlDigits) - StrLen(CCCControlDigits), '0') + CCCControlDigits; + + NoBillGroup := NoBillGroup + 1; + + OutText := '06' + (PadStr('', 5 - StrLen(Format(NoBillGroup)), '0') + Format(NoBillGroup)) + + Format("Posting Date", 0, Text1100007) + PadStr('', 219, ' '); + OutFile.Write(OutText); + end; + + trigger OnPostDataItem() + var + FileManagement: Codeunit "File Management"; + begin + TotalRmgAmount := FormatNumber(Round(TotalAmount * 100, 1), 15); + + OutText := '66' + (PadStr('', 4 - StrLen(Format(TotalDocCust)), '0') + Format(TotalDocCust)) + + PadStr('', 4, '0') + TotalRmgAmount + PadStr('', 15, '0') + PadStr('', 192, ' '); + OutFile.Write(OutText); + + OutText := '99' + (PadStr('', 4 - StrLen(Format(NoBillGroup)), '0') + Format(NoBillGroup)) + + PadStr('', 226, ' '); + OutFile.Write(OutText); + + OutFile.Close(); + + if SilentMode then + FileManagement.CopyServerFile(ExternalFile, SilentModeFile, true) + else + Download(ExternalFile, '', 'C:', Text10701, ToFile); + end; + + trigger OnPreDataItem() + begin + if BankSuffix = '' then + Error(Text1100000); + + if not DocMisc.CheckBankSuffix(BankSuffixBankAcc, "Bank Account No.") then + if not Confirm(Text1100001 + + Text1100002, + false, + FieldCaption("Bank Account No."), + TableCaption) + then + Error(Text1100003); + + OutText := '03' + PadStr(BankSuffix, 5, '0') + NameCompany + Format(DeliveryDate, 0, Text1100004) + PadStr('', 189, ' '); + OutFile.Write(OutText); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(DeliveryDate; DeliveryDate) + { + ApplicationArea = Basic, Suite; + Caption = 'Delivery date'; + ToolTip = 'Specifies a number to identify the operations declaration.'; + } + field(BankSuffix; BankSuffix) + { + ApplicationArea = Basic, Suite; + Caption = 'Bank Suffix'; + TableRelation = Suffix.Suffix; + ToolTip = 'Specifies the suffix assigned by the bank to manage bill groups. Usually, each bank assigns the company a different suffix for managing bill groups, depending on whether they are receivable or discount management operations.'; + + trigger OnLookup(var Text: Text): Boolean + var + Suffix: Record Suffix; + Suffixes: Page Suffixes; + begin + Suffixes.SetTableView(Suffix); + Suffixes.SetRecord(Suffix); + Suffixes.LookupMode(true); + Suffixes.Editable(false); + if Suffixes.RunModal() = ACTION::LookupOK then begin + Suffixes.GetRecord(Suffix); + BankSuffixBankAcc := Suffix."Bank Acc. Code"; + BankSuffix := Suffix.Suffix; + end; + end; + } + } + } + } + + actions + { + } + + trigger OnOpenPage() + begin + if ExternalFile = '' then + ExternalFile := 'C:\' + Text10702; + if DeliveryDate = 0D then + DeliveryDate := Today; + "Bill Group".SetFilter(Factoring, '<>%1', "Bill Group".Factoring::" "); + end; + } + + labels + { + } + + trigger OnInitReport() + begin + CompanyInfo.Get(); + CompanyInfo.TestField("VAT Registration No."); + NameCompany := CompanyInfo.Name; + NameCompany := PadStr(NameCompany, 30, ' '); + end; + + trigger OnPreReport() + var + FileMgt: Codeunit "File Management"; + begin + OutFile.TextMode := true; + OutFile.WriteMode := true; + ExternalFile := FileMgt.ServerTempFileName(''); + ToFile := Text10702; + OutFile.Create(ExternalFile); + end; + + var + Text1100000: Label 'Bank Suffix cannot be blank.'; + Text1100001: Label 'The Bank Suffix selected belongs to a %1 different than the %2. \'; + Text1100002: Label 'Do you want to continue?.'; + Text1100003: Label 'Process cancelled by request of user.'; + Text1100004: Label '', Locked = true; + Text1100005: Label 'Bill Group %1 cannot be sent to factoring'; + Text1100006: Label 'Some data for Bank Account %1 are missing.'; + Text1100007: Label '', Locked = true; + Text1100009: Label 'B'; + Text1100010: Label 'R'; + Text1100011: Label 'I'; + Text1100012: Label 'C'; + Text1100013: Label 'T'; + Text1100014: Label 'F'; + Text1100015: Label 'ES'; + CompanyInfo: Record "Company Information"; + Customer: Record Customer; + BankAcc: Record "Bank Account"; + PaymentMethod: Record "Payment Method"; + GLSetup: Record "General Ledger Setup"; + DocMisc: Codeunit "Document-Misc"; + OutFile: File; + ExternalFile: Text[1024]; + CCCBankNo: Text[4]; + CCCBankBranchNo: Text[4]; + CCCControlDigits: Text[2]; + CCCAccNo: Text[10]; + TotalDocCust: Integer; + TotalAmount: Decimal; + OutText: Text[250]; + DeliveryDate: Date; + DocType: Text[2]; + RmgAmount: Text[15]; + NameCompany: Text[100]; + NoBillGroup: Integer; + TotalRmgAmount: Text[15]; + CustPostCode: Text[5]; + CurrCode: Text[3]; + BankSuffixBankAcc: Code[10]; + BankSuffix: Code[3]; + ToFile: Text[1024]; + Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; + Text10702: Label 'FACTORING.ASC'; + SilentMode: Boolean; + SilentModeFile: Text; + + [Scope('OnPrem')] + procedure GetCurrencyCode(Doc: Record "Cartera Doc."; var "Code": Text[3]) + begin + GLSetup.Get(); + if Doc."Currency Code" = '' then + Code := CopyStr(GLSetup."LCY Code", 1, 3) + else + if StrLen(Doc."Currency Code") > 3 then + Code := CopyStr(Doc."Currency Code", 1, 3) + else + Code := PadStr(Doc."Currency Code", 3, ' '); + end; + + [Scope('OnPrem')] + procedure SetSilentMode(ServerFileName: Text) + begin + SilentMode := true; + SilentModeFile := ServerFileName; + end; + + local procedure FormatNumber(Number: Decimal; Length: Integer): Text[15] + begin + exit(ConvertStr(Format(Number, Length, ''), ' ', '0')); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustLedgerEntry.Codeunit.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustLedgerEntry.Codeunit.al new file mode 100644 index 00000000000..e1d7bb82fb4 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustLedgerEntry.Codeunit.al @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.ReceivablesPayables; + +codeunit 7000088 "CRT Cust. Ledger Entry" +{ + + [EventSubscriber(ObjectType::Table, Database::"Cust. Ledger Entry", OnAfterValidateEvent, 'Due Date', false, false)] + local procedure DueDateOnAfterValidate(var Rec: Record "Cust. Ledger Entry"; var xRec: Record "Cust. Ledger Entry"; CurrFieldNo: Integer) + var + DocumentMisc: Codeunit "Document-Misc"; + begin + if Rec."Document Situation" <> Rec."Document Situation"::" " then + DocumentMisc.UpdateReceivableDueDate(Rec); + end; + + [EventSubscriber(ObjectType::Table, Database::"Cust. Ledger Entry", OnAfterValidateEvent, 'Payment Method Code', false, false)] + local procedure PaymentMethodCodeOnAfterValidate(var Rec: Record "Cust. Ledger Entry"; var xRec: Record "Cust. Ledger Entry"; CurrFieldNo: Integer) + var + CarteraDoc: Record "Cartera Doc."; + begin + if Rec."Payment Method Code" <> xRec."Payment Method Code" then begin + Rec.ValidatePaymentMethod(); + CarteraDoc.UpdatePaymentMethodCode( + Rec."Document No.", Rec."Customer No.", Rec."Bill No.", Rec."Payment Method Code") + end; + end; + + [EventSubscriber(ObjectType::Table, Database::"Cust. Ledger Entry", OnAfterCopyCustLedgerEntryFromGenJnlLine, '', false, false)] + local procedure OnAfterCopyCustLedgerEntryFromGenJnlLine(var CustLedgerEntry: Record "Cust. Ledger Entry"; GenJournalLine: Record "Gen. Journal Line") + begin + CustLedgerEntry."Bill No." := GenJournalLine."Bill No."; + CustLedgerEntry."Applies-to Bill No." := GenJournalLine."Applies-to Bill No."; + end; + + [EventSubscriber(ObjectType::Table, Database::"Cust. Ledger Entry", OnSetApplyToFiltersOnBeforeSetFilters, '', false, false)] + local procedure OnSetApplyToFiltersOnBeforeSetFilters(var Rec: Record "Cust. Ledger Entry") + begin + Rec.SetFilter("Document Situation", '<>%1', Rec."Document Situation"::"Posted BG/PO"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Cust. Ledger Entry", OnAfterSetAppliesToDocFilters, '', false, false)] + local procedure OnAfterSetAppliesToDocFilters(var Rec: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") + begin + Rec.SetRange("Bill No.", GenJnlLine."Applies-to Bill No."); + end; + + [EventSubscriber(ObjectType::Table, Database::"Cust. Ledger Entry", OnAfterClearDocumentFilters, '', false, false)] + local procedure OnAfterClearDocumentFilters(var Rec: Record "Cust. Ledger Entry") + begin + Rec.SetRange("Bill No."); + end; +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustLedgerEntry.TableExt.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustLedgerEntry.TableExt.al new file mode 100644 index 00000000000..ba19959c93c --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CRTCustLedgerEntry.TableExt.al @@ -0,0 +1,157 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; + +tableextension 7000089 "CRT Cust. Ledger Entry" extends "Cust. Ledger Entry" +{ + fields + { + field(7000000; "Bill No."; Code[20]) + { + Caption = 'Bill No.'; + DataClassification = CustomerContent; + } + field(7000001; "Document Situation"; Enum Microsoft."ES Document Situation") + { + Caption = 'Document Situation'; + DataClassification = CustomerContent; + } + field(7000002; "Applies-to Bill No."; Code[20]) + { + Caption = 'Applies-to Bill No.'; + DataClassification = CustomerContent; + } + field(7000003; "Document Status"; Enum "ES Document Status") + { + Caption = 'Document Status'; + DataClassification = CustomerContent; + } + field(7000005; "Remaining Amount (LCY) stats."; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Remaining Amount (LCY) stats.'; + DataClassification = CustomerContent; + } + field(7000006; "Amount (LCY) stats."; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Amount (LCY) stats.'; + DataClassification = CustomerContent; + } + } + + keys + { + key(Key7000000; "Bill No.") + { + } + key(Key7000001; "Document Situation", "Document Status") + { + SumIndexFields = "Remaining Amount (LCY) stats.", "Amount (LCY) stats."; + } + } + + var + CannotChangePmtMethodErr: Label 'For Cartera-based bills and invoices, you cannot change the Payment Method Code to this value.'; + CheckBillSituationGroupErr: Label '%1 cannot be applied because it is included in a bill group. To apply the document, remove it from the bill group and try again.', Comment = '%1 - document type and number'; + CheckBillSituationPostedErr: Label '%1 cannot be applied because it is included in a posted bill group.', Comment = '%1 - document type and number'; + +#if not CLEAN27 + [Obsolete('Replaced by W1 version of procedure', '27.0')] + procedure SetApplyToFilters(CustomerNo: Code[20]; ApplyDocType: Option; ApplyDocNo: Code[20]; ApplyBillNo: Code[20]; ApplyAmount: Decimal) + begin + SetCurrentKey("Customer No.", Open, Positive, "Due Date"); + SetRange("Customer No.", CustomerNo); + SetRange(Open, true); + SetFilter("Document Situation", '<>%1', "Document Situation"::"Posted BG/PO"); + if ApplyDocNo <> '' then begin + SetRange("Document Type", ApplyDocType); + SetRange("Document No.", ApplyDocNo); + if ApplyBillNo <> '' then + SetRange("Bill No.", ApplyBillNo); + if FindFirst() then; + SetRange("Document Type"); + SetRange("Document No."); + SetRange("Bill No."); + end else + if ApplyDocType <> 0 then begin + SetRange("Document Type", ApplyDocType); + if FindFirst() then; + SetRange("Document Type"); + end else + if ApplyAmount <> 0 then begin + SetRange(Positive, ApplyAmount < 0); + if FindFirst() then; + SetRange(Positive); + end; + end; +#endif + +#if not CLEAN27 + [Obsolete('Replaced by W1 version of procedure', '27.0')] + procedure SetAmountToApply(AppliesToDocNo: Code[20]; CustomerNo: Code[20]; var AppliesToBillNo: Code[20]) + begin + SetAmountToApply(AppliesToDocNo, CustomerNo); + AppliesToBillNo := "Bill No."; + end; +#endif + + procedure ValidatePaymentMethod() + var + PaymentMethod: Record "Payment Method"; + begin + PaymentMethod.Get("Payment Method Code"); + if (("Document Type" = "Document Type"::Bill) and not PaymentMethod."Create Bills") or + (("Document Type" = "Document Type"::Invoice) and + ("Document Situation" <> "Document Situation"::" ") and + not PaymentMethod."Invoices to Cartera") + then + Error(CannotChangePmtMethodErr); + end; + + [Scope('OnPrem')] + procedure PrintBill(ShowRequestForm: Boolean) + var + CarteraReportSelection: Record "Cartera Report Selections"; + CustLedgEntry: Record "Cust. Ledger Entry"; + begin + CustLedgEntry.Copy(Rec); + CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::Bill); + CarteraReportSelection.SetFilter("Report ID", '<>0'); + CarteraReportSelection.Find('-'); + repeat + REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, CustLedgEntry); + until CarteraReportSelection.Next() = 0; + end; + + [Scope('OnPrem')] + procedure CheckBillSituation() + var + CarteraDoc: Record "Cartera Doc."; + PostedCarteraDoc: Record "Posted Cartera Doc."; + begin + OnBeforeCheckBillSituation(Rec); + + case true of + CarteraDoc.Get(CarteraDoc.Type::Receivable, "Entry No."): + if CarteraDoc."Bill Gr./Pmt. Order No." <> '' then + Error(CheckBillSituationGroupErr, Description); + PostedCarteraDoc.Get(PostedCarteraDoc.Type::Receivable, "Entry No."): + if PostedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then + Error(CheckBillSituationPostedErr, Description); + end; + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeCheckBillSituation(var CustLedgerEntry: Record "Cust. Ledger Entry") + begin + end; + +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CarteraReceivStatisticsFB.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CarteraReceivStatisticsFB.Page.al new file mode 100644 index 00000000000..fafeb1594bc --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CarteraReceivStatisticsFB.Page.al @@ -0,0 +1,435 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Sales.Customer; + +page 35304 "Cartera Receiv. Statistics FB" +{ + Caption = 'Cartera Receiv. Statistics FB'; + Editable = false; + PageType = CardPart; + SourceTable = Customer; + + layout + { + area(content) + { + group("No. of Bills") + { + Caption = 'No. of Bills'; + field("NoOpen[1]"; NoOpen[1]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Bills'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoOpen[2]"; NoOpen[2]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Bills in Bill Gr.'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoOpen[3]"; NoOpen[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Open Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + } + field("NoHonored[3]"; NoHonored[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Hon. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + } + field("NoRejected[3]"; NoRejected[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Rej. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies rejected payments.'; + } + field("NoRedrawn[3]"; NoRedrawn[3]) + { + ApplicationArea = Basic, Suite; + Caption = 'Redr. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies recirculated payments.'; + } + field("NoHonored[4]"; NoHonored[4]) + { + ApplicationArea = Basic, Suite; + Caption = 'Hon. Closed Bills'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + } + field("NoRejected[4]"; NoRejected[4]) + { + ApplicationArea = Basic, Suite; + Caption = 'Rej. Closed Bills'; + Editable = false; + ToolTip = 'Specifies rejected payments.'; + } + } + group("Remaining Amt. (LCY)") + { + Caption = 'Remaining Amt. (LCY)'; + field("OpenRemainingAmtLCY[1]"; OpenRemainingAmtLCY[1]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open Bills'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + + trigger OnDrillDown() + begin + DrillDownOpen(4, 1); // Cartera + end; + } + field("OpenRemainingAmtLCY[2]"; OpenRemainingAmtLCY[2]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open Bills in Bill Gr.'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + + trigger OnDrillDown() + begin + DrillDownOpen(3, 1); // Bill Group; + end; + } + field("OpenRemainingAmtLCY[3]"; OpenRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Open Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies non-processed payments.'; + + trigger OnDrillDown() + begin + DrillDownOpen(1, 1); // Posted Bill Group + end; + } + field("HonoredRemainingAmtLCY[3]"; HonoredRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Hon. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + + trigger OnDrillDown() + begin + DrillDownHonored(1, 1); // Posted Bill Group + end; + } + field("RejectedRemainingAmtLCY[3]"; RejectedRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rej. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies rejected payments.'; + + trigger OnDrillDown() + begin + DrillDownRejected(1, 1); // Posted Bill Group + end; + } + field("RedrawnRemainingAmtLCY[3]"; RedrawnRemainingAmtLCY[3]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Redr. Bills in Post. Bill Gr.'; + Editable = false; + ToolTip = 'Specifies recirculated payments.'; + + trigger OnDrillDown() + begin + DrillDownRedrawn(1, 1); // Posted Bill Group + end; + } + field("HonoredRemainingAmtLCY[4]"; HonoredRemainingAmtLCY[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Hon. Closed Bills'; + Editable = false; + ToolTip = 'Specifies settled payments.'; + + trigger OnDrillDown() + begin + DrillDownHonored(5, 1); // Closed Bills + end; + } + field("RejectedRemainingAmtLCY[4]"; RejectedRemainingAmtLCY[4]) + { + ApplicationArea = Basic, Suite; + AutoFormatType = 1; + AutoFormatExpression = ''; + Caption = 'Rej. Closed Bills'; + Editable = false; + ToolTip = 'Specifies rejected payments.'; + + trigger OnDrillDown() + begin + DrillDownRejected(5, 1); // Closed Bills + end; + } + } + } + } + + actions + { + } + + trigger OnAfterGetRecord() + begin + UpdateDocStatistics(); + end; + + var + DocumentSituationFilter: array[3] of Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; + NoOpen: array[5] of Integer; + NoHonored: array[5] of Integer; + NoRejected: array[5] of Integer; + NoRedrawn: array[5] of Integer; + OpenAmtLCY: array[5] of Decimal; + HonoredAmtLCY: array[5] of Decimal; + RejectedAmtLCY: array[5] of Decimal; + RedrawnAmtLCY: array[5] of Decimal; + OpenRemainingAmtLCY: array[5] of Decimal; + RejectedRemainingAmtLCY: array[5] of Decimal; + HonoredRemainingAmtLCY: array[5] of Decimal; + RedrawnRemainingAmtLCY: array[5] of Decimal; + j: Integer; + + [Scope('OnPrem')] + procedure UpdateDocStatistics() + var + CustLedgEntry: Record "Cust. Ledger Entry"; + begin + DocumentSituationFilter[1] := DocumentSituationFilter::Cartera; + DocumentSituationFilter[2] := DocumentSituationFilter::"BG/PO"; + DocumentSituationFilter[3] := DocumentSituationFilter::"Posted BG/PO"; + + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + for j := 1 to 5 do begin + case j of + 4: + // Closed Bill Group and Closed Documents + begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + end; + 5: + // Invoices + begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + else begin + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + CustLedgEntry.SetRange("Document Situation", DocumentSituationFilter[j]); + end; + end; + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + OpenAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + OpenRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoOpen[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + HonoredAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + HonoredRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoHonored[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + RejectedAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + RejectedRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoRejected[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Redrawn); + CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); + RedrawnAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; + RedrawnRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; + NoRedrawn[j] := CustLedgEntry.Count; + CustLedgEntry.SetRange("Document Status"); + + CustLedgEntry.SetRange("Document Situation"); + end; + end; + + [Scope('OnPrem')] + procedure DrillDownOpen(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; + + [Scope('OnPrem')] + procedure DrillDownHonored(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; + + [Scope('OnPrem')] + procedure DrillDownRejected(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; + + [Scope('OnPrem')] + procedure DrillDownRedrawn(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) + var + CustLedgEntry: Record "Cust. Ledger Entry"; + CustLedgEntriesForm: Page "Customer Ledger Entries"; + begin + CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); + CustLedgEntry.SetRange("Customer No.", Rec."No."); + case Situation of + Situation::Cartera: + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); + Situation::"BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); + Situation::"Posted BG/PO": + CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); + Situation::"Closed BG/PO", Situation::"Closed Documents": + CustLedgEntry.SetFilter("Document Situation", '%1|%2', + CustLedgEntry."Document Situation"::"Closed BG/PO", + CustLedgEntry."Document Situation"::"Closed Documents"); + else + CustLedgEntry.SetFilter("Document Situation", '<>0'); + end; + case DocType of + DocType::Invoice: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); + DocType::Bill: + CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); + end; + CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Redrawn); + CustLedgEntriesForm.SetTableView(CustLedgEntry); + CustLedgEntriesForm.SetRecord(CustLedgEntry); + CustLedgEntriesForm.RunModal(); + CustLedgEntry.SetRange("Document Status"); + CustLedgEntry.SetRange("Document Situation"); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CategorizeDocuments.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CategorizeDocuments.Report.al new file mode 100644 index 00000000000..04d864e87e5 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CategorizeDocuments.Report.al @@ -0,0 +1,63 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +report 7000095 "Categorize Documents" +{ + Caption = 'Categorize Documents'; + Permissions = TableData "Cartera Doc." = m; + ProcessingOnly = true; + + dataset + { + dataitem("Cartera Doc."; "Cartera Doc.") + { + DataItemTableView = sorting(Type, "Entry No."); + + trigger OnPreDataItem() + begin + ModifyAll("Category Code", CategoryCode); + CurrReport.Break(); + end; + } + } + + requestpage + { + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryCode; CategoryCode) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Code'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the category.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + CategoryCode: Code[10]; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CategorizePostedDocuments.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CategorizePostedDocuments.Report.al new file mode 100644 index 00000000000..1e51ebcc036 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/CategorizePostedDocuments.Report.al @@ -0,0 +1,63 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +report 7000094 "Categorize Posted Documents" +{ + Caption = 'Categorize Posted Documents'; + Permissions = TableData "Posted Cartera Doc." = m; + ProcessingOnly = true; + + dataset + { + dataitem("Posted Cartera Doc."; "Posted Cartera Doc.") + { + DataItemTableView = sorting(Type, "Entry No."); + + trigger OnPreDataItem() + begin + ModifyAll("Category Code", CategoryCode); + CurrReport.Break(); + end; + } + } + + requestpage + { + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(CategoryCode; CategoryCode) + { + ApplicationArea = Basic, Suite; + Caption = 'Category Code'; + TableRelation = "Category Code"; + ToolTip = 'Specifies the category.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + CategoryCode: Code[10]; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroup.Table.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroup.Table.al new file mode 100644 index 00000000000..18809c31bdb --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroup.Table.al @@ -0,0 +1,217 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.Currency; +using Microsoft.Finance.Dimension; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.AuditCodes; + +table 7000007 "Closed Bill Group" +{ + Caption = 'Closed Bill Group'; + DrillDownPageID = "Closed Bill Groups List"; + LookupPageID = "Closed Bill Groups List"; + DataClassification = CustomerContent; + + fields + { + field(2; "No."; Code[20]) + { + Caption = 'No.'; + } + field(3; "Bank Account No."; Code[20]) + { + Caption = 'Bank Account No.'; + TableRelation = "Bank Account"; + } + field(4; "Bank Account Name"; Text[100]) + { + CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); + Caption = 'Bank Account Name'; + Editable = false; + FieldClass = FlowField; + } + field(5; "Posting Description"; Text[100]) + { + Caption = 'Posting Description'; + } + field(6; "Dealing Type"; Enum "Cartera Dealing Type") + { + Caption = 'Dealing Type'; + Editable = false; + } + field(8; "Reason Code"; Code[10]) + { + Caption = 'Reason Code'; + TableRelation = "Reason Code"; + } + field(9; "No. Printed"; Integer) + { + Caption = 'No. Printed'; + } + field(10; "Posting Date"; Date) + { + Caption = 'Posting Date'; + } + field(11; Comment; Boolean) + { + CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), + Type = filter(Receivable))); + Caption = 'Comment'; + Editable = false; + FieldClass = FlowField; + } + field(14; "Global Dimension 1 Filter"; Code[20]) + { + CaptionClass = '1,3,1'; + Caption = 'Global Dimension 1 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); + } + field(15; "Global Dimension 2 Filter"; Code[20]) + { + CaptionClass = '1,3,2'; + Caption = 'Global Dimension 2 Filter'; + FieldClass = FlowFilter; + TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); + } + field(16; "Amount Grouped"; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + Type = const(Receivable))); + Caption = 'Amount Grouped'; + Editable = false; + FieldClass = FlowField; + } + field(18; "Status Filter"; Enum "Cartera Document Status") + { + Caption = 'Status Filter'; + Editable = false; + FieldClass = FlowFilter; + } + field(20; "Closing Date"; Date) + { + Caption = 'Closing Date'; + } + field(29; "Collection Expenses Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Collection Expenses Amt.'; + } + field(30; "Discount Expenses Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Discount Expenses Amt.'; + } + field(31; "Discount Interests Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Discount Interests Amt.'; + } + field(32; "Rejection Expenses Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Rejection Expenses Amt.'; + } + field(33; "Currency Code"; Code[10]) + { + Caption = 'Currency Code'; + Editable = false; + TableRelation = Currency; + } + field(35; "Amount Grouped (LCY)"; Decimal) + { + AutoFormatType = 1; + AutoFormatExpression = ''; + CalcFormula = sum("Closed Cartera Doc."."Amt. for Collection (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), + "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), + "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), + Status = field("Status Filter"), + Type = const(Receivable))); + Caption = 'Amount Grouped (LCY)'; + Editable = false; + FieldClass = FlowField; + } + field(37; "Risked Factoring Exp. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Risked Factoring Exp. Amt.'; + } + field(38; "Unrisked Factoring Exp. Amt."; Decimal) + { + AutoFormatExpression = Rec."Currency Code"; + AutoFormatType = 1; + Caption = 'Unrisked Factoring Exp. Amt.'; + } + field(39; Factoring; Option) + { + Caption = 'Factoring'; + Editable = false; + OptionCaption = ' ,Unrisked,Risked'; + OptionMembers = " ",Unrisked,Risked; + } + field(1200; "Partner Type"; Option) + { + Caption = 'Partner Type'; + OptionCaption = ' ,Company,Person'; + OptionMembers = " ",Company,Person; + } + } + + keys + { + key(Key1; "No.") + { + Clustered = true; + } + key(Key2; "Bank Account No.", "Posting Date") + { + SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; + } + key(Key3; "Bank Account No.", "Posting Date", Factoring) + { + SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; + } + } + + fieldgroups + { + } + + trigger OnDelete() + begin + ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", "No."); + ClosedDoc.DeleteAll(); + + BGPOCommentLine.SetRange("BG/PO No.", "No."); + BGPOCommentLine.DeleteAll(); + end; + + var + Text1100000: Label 'untitled'; + ClosedDoc: Record "Closed Cartera Doc."; + BGPOCommentLine: Record "BG/PO Comment Line"; + + procedure Caption(): Text + begin + if "No." = '' then + exit(Text1100000); + CalcFields("Bank Account Name"); + exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupListing.Report.al b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupListing.Report.al new file mode 100644 index 00000000000..d8d3b117d9b --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupListing.Report.al @@ -0,0 +1,388 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Sales.Receivables; + +using Microsoft.Bank.BankAccount; +using Microsoft.Finance.ReceivablesPayables; +using Microsoft.Foundation.Address; +using Microsoft.Foundation.Company; +using Microsoft.Sales.Customer; +using System.Utilities; + +report 7000002 "Closed Bill Group Listing" +{ + DefaultLayout = RDLC; + RDLCLayout = './Local/Cartera/Sales/Receivables/ClosedBillGroupListing.rdlc'; + ApplicationArea = Basic, Suite; + Caption = 'Closed Bill Group Listing'; + UsageCategory = ReportsAndAnalysis; + + dataset + { + dataitem(ClosedBillGr; "Closed Bill Group") + { + DataItemTableView = sorting("No."); + PrintOnlyIfDetail = true; + RequestFilterFields = "No."; + column(No_ClosedBillGr; "No.") + { + } + dataitem(CopyLoop; "Integer") + { + DataItemTableView = sorting(Number); + dataitem(PageLoop; "Integer") + { + DataItemTableView = sorting(Number) where(Number = const(1)); + column(Operation; Operation) + { + } + column(CopyText; StrSubstNo(Text1100003, CopyText)) + { + } + column(CompanyAddr1; CompanyAddr[1]) + { + } + column(CompanyAddr2; CompanyAddr[2]) + { + } + column(CompanyAddr3; CompanyAddr[3]) + { + } + column(CompanyAddr4; CompanyAddr[4]) + { + } + column(CompanyAddr5; CompanyAddr[5]) + { + } + column(CompanyAddr6; CompanyAddr[6]) + { + } + column(CompanyInfoPhoneNo; CompanyInfo."Phone No.") + { + } + column(CompanyInfoFaxNo; CompanyInfo."Fax No.") + { + } + column(CompanyInfoVATRegNo; CompanyInfo."VAT Registration No.") + { + } + column(ClosedBillGrPostingDate; Format(ClosedBillGr."Posting Date")) + { + } + column(BankAccAddr4; BankAccAddr[4]) + { + } + column(BankAccAddr5; BankAccAddr[5]) + { + } + column(BankAccAddr6; BankAccAddr[6]) + { + } + column(BankAccAddr7; BankAccAddr[7]) + { + } + column(BankAccAddr3; BankAccAddr[3]) + { + } + column(BankAccAddr2; BankAccAddr[2]) + { + } + column(BankAccAddr1; BankAccAddr[1]) + { + } + column(ClosedBillGrCurrencyCode; ClosedBillGr."Currency Code") + { + } + column(FactoringType; FactoringType) + { + } + column(OutputNo; OutputNo) + { + } + column(PrintAmountsInLCY; PrintAmountsInLCY) + { + } + column(BillGroupNoCaption; BillGroupNoCaptionLbl) + { + } + column(PhoneNoCaption; PhoneNoCaptionLbl) + { + } + column(FaxNoCaption; FaxNoCaptionLbl) + { + } + column(VATRegistrationNoCaption; VATRegistrationNoCaptionLbl) + { + } + column(DateCaption; DateCaptionLbl) + { + } + column(CurrencyCodeCaption; CurrencyCodeCaptionLbl) + { + } + column(PageCaption; PageCaptionLbl) + { + } + dataitem(ClosedDoc; "Closed Cartera Doc.") + { + DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); + DataItemLinkReference = ClosedBillGr; + DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Receivable)); + column(AmtForCollection; AmtForCollection) + { + AutoFormatExpression = GetCurrencyCode(); + AutoFormatType = 1; + } + column(CustomerCity; Customer.City) + { + } + column(CustomerCounty; Customer.County) + { + } + column(CustomerPostCode; Customer."Post Code") + { + } + column(CustomerName; Customer.Name) + { + } + column(AccountNo_ClosedDoc; "Account No.") + { + } + column(HonoredRejtdatDate_ClosedDoc; Format("Honored/Rejtd. at Date")) + { + } + column(Status_ClosedDoc; Status) + { + } + column(DocumentNo_ClosedDoc; "Document No.") + { + } + column(DocumentType_ClosedDoc; "Document Type") + { + } + column(DueDate_ClosedDoc; Format("Due Date")) + { + } + column(ClosedDocDocTypeNotBill; ClosedDoc."Document Type" <> ClosedDoc."Document Type"::Bill) + { + } + column(No_ClosedDoc; "No.") + { + } + column(ClosedDocDocTypeBill; ClosedDoc."Document Type" = ClosedDoc."Document Type"::Bill) + { + } + column(Type_ClosedDoc; Type) + { + } + column(EntryNo_ClosedDoc; "Entry No.") + { + } + column(BillGrPmtOrderNo_ClosedDoc; "Bill Gr./Pmt. Order No.") + { + } + column(AllAmtareinLCYCaption; AllAmtareinLCYCaptionLbl) + { + } + column(DocumentNoCaption; DocumentNoCaptionLbl) + { + } + column(BillNoCaption; BillNoCaptionLbl) + { + } + column(NameCaption; NameCaptionLbl) + { + } + column(PostCodeCaption; PostCodeCaptionLbl) + { + } + column(CityCaption; CityCaptionLbl) + { + } + column(AmtForCollectioCaption; AmtForCollectioCaptionLbl) + { + } + column(CountyCaption; CountyCaptionLbl) + { + } + column(StatusCaption_ClosedDoc; FieldCaption(Status)) + { + } + column(HonoredRejtdatDateCaption; HonoredRejtdatDateCaptionLbl) + { + } + column(DueDateCaption; DueDateCaptionLbl) + { + } + column(CustomerNoCaption; CustomerNoCaptionLbl) + { + } + column(DocTypeCaption_ClosedDoc; FieldCaption("Document Type")) + { + } + column(EmptyStringCaption; EmptyStringCaptionLbl) + { + } + column(TotalCaption; TotalCaptionLbl) + { + } + + trigger OnAfterGetRecord() + begin + Customer.Get("Account No."); + if PrintAmountsInLCY then + AmtForCollection := "Amt. for Collection (LCY)" + else + AmtForCollection := "Amount for Collection"; + end; + + trigger OnPreDataItem() + begin + Clear(AmtForCollection); + end; + } + } + + trigger OnAfterGetRecord() + begin + if Number > 1 then begin + CopyText := Text1100002; + OutputNo := OutputNo + 1; + end; + end; + + trigger OnPreDataItem() + begin + NoOfLoops := Abs(NoOfCopies) + 1; + CopyText := ''; + SetRange(Number, 1, NoOfLoops); + OutputNo := 1; + end; + } + + trigger OnAfterGetRecord() + begin + if "Dealing Type" = "Dealing Type"::Discount then + Operation := Text1100000 + else + Operation := Text1100001; + FactoringType := GetFactoringType(); + + BankAcc.Get(ClosedBillGr."Bank Account No."); + FormatAddress.FormatAddr( + BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", + BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); + + if not CurrReport.Preview then + PrintCounter.PrintCounter(DATABASE::"Closed Bill Group", "No."); + end; + + trigger OnPreDataItem() + begin + CompanyInfo.Get(); + FormatAddress.Company(CompanyAddr, CompanyInfo); + end; + } + } + + requestpage + { + SaveValues = true; + + layout + { + area(content) + { + group(Options) + { + Caption = 'Options'; + field(NoOfCopies; NoOfCopies) + { + ApplicationArea = Basic, Suite; + Caption = 'No. of Copies'; + ToolTip = 'Specifies how many copies of the document to print.'; + } + field(PrintAmountsInLCY; PrintAmountsInLCY) + { + ApplicationArea = Basic, Suite; + Caption = 'Show amounts in LCY'; + ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; + } + } + } + } + + actions + { + } + } + + labels + { + } + + var + Text1100000: Label 'For Discount'; + Text1100001: Label 'For Collection'; + Text1100002: Label 'COPY'; + Text1100003: Label 'Bill Group %1'; + Text1100005: Label 'Risked Factoring'; + Text1100006: Label 'Unrisked Factoring'; + CompanyInfo: Record "Company Information"; + BankAcc: Record "Bank Account"; + Customer: Record Customer; + FormatAddress: Codeunit "Format Address"; + PrintCounter: Codeunit "BG/PO-Post and Print"; + BankAccAddr: array[8] of Text[100]; + CompanyAddr: array[8] of Text[100]; + Operation: Text[80]; + NoOfLoops: Integer; + NoOfCopies: Integer; + CopyText: Text[30]; + PrintAmountsInLCY: Boolean; + AmtForCollection: Decimal; + FactoringType: Text[30]; + OutputNo: Integer; + BillGroupNoCaptionLbl: Label 'Bill Group No.'; + PhoneNoCaptionLbl: Label 'Phone No.'; + FaxNoCaptionLbl: Label 'Fax No.'; + VATRegistrationNoCaptionLbl: Label 'VAT Reg. No.'; + DateCaptionLbl: Label 'Date'; + CurrencyCodeCaptionLbl: Label 'Currency Code'; + PageCaptionLbl: Label 'Page'; + AllAmtareinLCYCaptionLbl: Label 'All amounts are in LCY'; + DocumentNoCaptionLbl: Label 'Document No.'; + BillNoCaptionLbl: Label 'Bill No.'; + NameCaptionLbl: Label 'Name'; + PostCodeCaptionLbl: Label 'Post Code'; + CityCaptionLbl: Label 'City /'; + AmtForCollectioCaptionLbl: Label 'Amount for Collection'; + CountyCaptionLbl: Label 'County'; + HonoredRejtdatDateCaptionLbl: Label 'Honored/Rejtd. at Date'; + DueDateCaptionLbl: Label 'Due Date'; + CustomerNoCaptionLbl: Label 'Customer No.'; + EmptyStringCaptionLbl: Label '/', Locked = true; + TotalCaptionLbl: Label 'Total'; + + [Scope('OnPrem')] + procedure GetCurrencyCode(): Code[10] + begin + if PrintAmountsInLCY then + exit('') + else + exit(ClosedDoc."Currency Code"); + end; + + [Scope('OnPrem')] + procedure GetFactoringType(): Text[30] + begin + if ClosedBillGr.Factoring <> ClosedBillGr.Factoring::" " then + if ClosedBillGr.Factoring = ClosedBillGr.Factoring::Risked then + exit(Text1100005) + else + exit(Text1100006); + end; +} + diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupListing.rdlc b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupListing.rdlc new file mode 100644 index 00000000000..850a714ff91 --- /dev/null +++ b/src/Layers/ES/BaseApp/Local/Cartera/Sales/Receivables/ClosedBillGroupListing.rdlc @@ -0,0 +1,2943 @@ + + + 0 + + + + SQL + + + None + 3adfdb31-f2ef-4b66-9ee5-737e1091e6c6 + + + + + + + + + + + 7.47047in + + + + + 4.53464in + + + + + + + true + + + + + =Fields!CurrencyCodeCaption.Value + + + + + + + true + + + + + =Fields!DateCaption.Value + + + + + + + true + + + + + =Fields!BillGroupNoCaption.Value + + + + + + + true + + + + + =Fields!FactoringType.Value + + + + + + + true + + + + + =Fields!Operation.Value + + + + + + + true + + + + + =Fields!ClosedBillGrCurrencyCode.Value + + + + + + + true + + + + + =Fields!ClosedBillGrPostingDate.Value + + + + + + + true + + + + + =Fields!No_ClosedBillGr.Value + + + + + + + true + + + + + =Fields!BankAccAddr2.Value + + + + + + + true + + + + + =Fields!BankAccAddr3.Value + + + + + + + true + + + + + =Fields!BankAccAddr7.Value + + + + + + + true + + + + + =Fields!BankAccAddr6.Value + + + + + + + true + + + + + =Fields!BankAccAddr5.Value + + + + + + + true + + + + + =Fields!BankAccAddr4.Value + + + + + + + true + + + + + =Fields!CompanyAddr1.Value + + + + + + + true + + + + + =Fields!VATRegistrationNoCaption.Value + + + + + + + true + + + + + =Fields!FaxNoCaption.Value + + + + + + + true + + + + + =Fields!PhoneNoCaption.Value + + + + + + + true + + + + + =Fields!CompanyInfoVATRegNo.Value + + + + + + + true + + + + + =Fields!CompanyInfoFaxNo.Value + + + + + + + true + + + + + =Fields!CompanyInfoPhoneNo.Value + + + + + + + true + + + + + =Fields!CompanyAddr6.Value + + + + + + + true + + + + + =Fields!CompanyAddr5.Value + + + + + + + true + + + + + =Fields!CompanyAddr4.Value + + + + + + + true + + + + + =Fields!CompanyAddr3.Value + + + + + + + true + + + + + =Fields!CompanyAddr2.Value + + + + + + + true + + + + + =Fields!BankAccAddr1.Value + + + + + + + + + + 0.56102in + + + 0.55118in + + + 0.5315in + + + 0.35433in + + + 0.17717in + + + 0.70866in + + + 0.64961in + + + 1.35827in + + + 0.64961in + + + 1.12205in + + + 0.7874in + + + + + 0.16654in + + + + + true + + + + + =First(Fields!AllAmtareinLCYCaption.Value) + + + + + + 7 + + + + + + + + + + + + true + + + + + + + + 2 + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + 0.33307in + + + + + true + + + + + =First(Fields!DueDateCaption.Value) + + + + + + + 42 + + + + + + + + true + + + + + =First(Fields!DocTypeCaption_ClosedDoc.Value) + + + + + + + + + + + true + + + + + =First(Fields!DocumentNoCaption.Value) + + + + + + + 40 + + + + + + + + true + + + + + =First(Fields!BillNoCaption.Value) + + + + + + + 39 + + + + + + + + true + + + + + =First(Fields!StatusCaption_ClosedDoc.Value) + + + + + + + + + + + true + + + + + =first(Fields!HonoredRejtdatDateCaption.Value) + + + + + + + 37 + + + + + + + + true + + + + + =First(Fields!CustomerNoCaption.Value) + + + + + + + 36 + + + + + + + + true + + + + + =First(Fields!NameCaption.Value) + + + + + + + + + + + true + + + + + =First(Fields!PostCodeCaption.Value) + + + + + + + + + + + true + + + + + =First(Fields!CityCaption.Value)+ Chr(10) + First(Fields!CountyCaption.Value) + + + + + + + + + + + true + + + + + =First(Fields!AmtForCollectioCaption.Value) + + + + + + + 32 + + + + + + + + 0.16654in + + + + + true + + + + + + + + 11 + + + + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + =Fields!DueDate_ClosedDoc.Value + + + + + + + + + + 29 + + + + + + + + true + + + + + =Fields!DocumentNo_ClosedDoc.Value + + + + + + + 28 + + + + + + + + true + + + + + + + + + + + + + true + + + + + =Fields!Status_ClosedDoc.Value + + + + + + + + + + + + + + true + + + + + =Fields!AccountNo_ClosedDoc.Value + + + + + + + 24 + + + + + + + + true + + + + + =Fields!CustomerName.Value + + + + + + + + + + + true + + + + + =Fields!CustomerPostCode.Value + + + + + + + 22 + + + + + + + + true + + + + + =Fields!CustomerCity.Value + + + + + + + + + + + true + + + + + =Fields!AmtForCollection.Value + + + + + + + + + + + 0.16732in + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + 0.16732in + + + + + true + + + + + =Fields!DueDate_ClosedDoc.Value + + + + + + + + + + 15 + + + + + + + + true + + + + + =Fields!DocumentNo_ClosedDoc.Value + + + + + + + 14 + + + + + + + + true + + + + + =Fields!EmptyStringCaption.Value + Fields!No_ClosedDoc.Value + + + + + + + 13 + + + + + + + + true + + + + + =Fields!Status_ClosedDoc.Value + + + + + + + + + + + + + + true + + + + + =Fields!AccountNo_ClosedDoc.Value + + + + + + + 10 + + + + + + + + true + + + + + =Fields!CustomerName.Value + + + + + + + + + + + true + + + + + =Fields!CustomerPostCode.Value + + + + + + + 8 + + + + + + + + true + + + + + =Fields!CustomerCity.Value + + + + + + + + + + + true + + + + + =Fields!AmtForCollection.Value + + + + + + + + + + + 0.16732in + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + 0.16654in + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + 0.16654in + + + + + true + + + + + =First(Fields!TotalCaption.Value) + + + + + + 2 + + + + + + + true + + + + + =Sum(Fields!AmtForCollection.Value) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =IIF(Fields!PrintAmountsInLCY.Value,False,True) + + After + true + true + + + After + true + true + + + After + true + true + + + + + No_ClosedBillGr + =Fields!OutputNo.Value + + + + + + + No_ClosedBillGr + =Fields!OutputNo.Value + + + End + + + + + + Detail + + + + + =IIF(Fields!ClosedDocDocTypeNotBill.Value,FALSE,TRUE) + + + + + =IIF(Fields!ClosedDocDocTypeNotBill.Value,FALSE,TRUE) + + + + + =IIF(Fields!ClosedDocDocTypeBill.Value,FALSE,TRUE) + + + + + =IIF(Fields!ClosedDocDocTypeBill.Value,FALSE,TRUE) + + + + Detail_Collection + Output + true + + + Before + true + + + Before + true + + + + + + + + DataSet_Result + 7.27996cm + 1.66851in + 7.4508in + 27 + + + + + + + + + + + true + true + + + + + =Code.IsNewPage(Fields!BillGrPmtOrderNo_ClosedDoc.Value) + + + + + + true + + + + + + + + + + + + + + + + + + + + 0cm + 0cm + 0.6cm + 0.76667cm + 28 + + true + + + + + + + true + + + + + + + true + + + + + =Fields!PageCaption.Value+" "+format(Code.GetGroupPageNumber(ReportItems!Newpage.Value,Globals!PageNumber)) + + + + + + + true + true + + + + + =Code.SetReportName(ReportItems!ReportName.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 11in + 8.5in + 1.5cm + 0cm + 2cm + 2cm + + + + + + + CustLedgEntry__Document_No__ + 0.423cm + 2.1cm + + + + true + + + + + =First(Fields!BillNo_CustLedgEntry.Value) + + + + + + + 2.22222cm + 0.423cm + 0.84cm + 1 + + + + true + + + + + =First(Fields!DrawCity.Value) + + + + + + + true + true + + + + + =Fields!PrintAmt.Value + + + + + + + PrintAmt_1 + 11.74603cm + 0.423cm + 2.7cm + 3 + + + + true + + + + + =First(Fields!CurrencyCode.Value) + + + + + + + true + + + + + =First(Fields!DrawDate.Value) + + + + + + + true + + + + + =First(Fields!StatedAddressCaption.Value) + + + + + + + true + + + + + =First(Fields!WithTheFollowingDetailsCaption.Value) + + + + + + + true + + + + + =First(Fields!CurrencyTxt.Value) + + + + + + + true + + + + + =First(Fields!NumberText1.Value) + + + + + + + true + + + + + =First(Fields!RelatedtoCaption.Value) + + + + + + + true + + + + + =First(Fields!InvoiceNoCaption.Value) + + + + + + + true + + + + + =First(Fields!DocumentNo_CustLedgEntry.Value) + + + + + + + 3.96825cm + 2.53968cm + 0.423cm + 2.1cm + 12 + + + + true + + + + + =First(Fields!IssuedDateCaption.Value) + + + + + + + + + + true + + + + + =First(Fields!PaymentMethod.Value) + + + + + + + true + + + + + =First(Fields!CustBankAccName.Value) + + + + + + + true + + + + + =First(Fields!CustBankAccBankAccNoDetails.Value) + + + + + + + 4.76191cm + 11.13cm + 0.423cm + 4.7cm + 17 + + + + + + + true + + + + + =First(Fields!CustAddr2.Value) + + + + + + + true + + + + + =First(Fields!CustAddr3.Value) + + + + + + + true + + + + + =First(Fields!CustAddr7.Value) + + + + + + + true + + + + + =First(Fields!CustAddr6.Value) + + + + + + + true + + + + + =First(Fields!CustAddr5.Value) + + + + + + + true + + + + + =First(Fields!CustAddr4.Value) + + + + + + + true + + + + + =First(Fields!CustVATRegNo.Value) + + + + + + + true + + + + + =First(Fields!DueDate_CustLedgEntry.Value) + + + + + + + ContentsOnly + 8.88889cm + 6.87414in + + =IIF(Fields!NumberText2.Value="",FALSE,TRUE) + + + + + + + + true + + + + + =Fields!EmptyStringCaption.Value + + + + + + + true + + + + + =First(Fields!BillNo_CustLedgEntry.Value) + + + + + + + true + + + + + =First(Fields!DrawCity.Value) + + + + + + + true + true + + + + + =Fields!PrintAmt.Value + + + + + + + 11.74603cm + 0.423cm + 2.7cm + 4 + + + + true + + + + + =First(Fields!CurrencyCode.Value) + + + + + + + true + + + + + =First(Fields!DrawDate.Value) + + + + + + + true + + + + + =First(Fields!StatedAddressCaption.Value) + + + + + + + true + + + + + =First(Fields!WithTheFollowingDetailsCaption.Value) + + + + + + + true + + + + + =First(Fields!CurrencyTxt.Value) + + + + + + + true + + + + + =First(Fields!NumberText1.Value) + + + + + + + true + + + + + =First(Fields!RelatedtoCaption.Value) + + + + + + + true + + + + + =First(Fields!InvoiceNoCaption.Value) + + + + + + + true + + + + + =First(Fields!DocumentNo_CustLedgEntry.Value) + + + + + + + 4.44444cm + 2.53968cm + 0.423cm + 2.1cm + 13 + + + + true + + + + + =First(Fields!IssuedDateCaption.Value) + + + + + + + + + + true + + + + + =First(Fields!PaymentMethod.Value) + + + + + + + true + + + + + =First(Fields!CustBankAccName.Value) + + + + + + + true + + + + + =First(Fields!CustBankAccBankAccNoDetails.Value) + + + + + + + 5.23809cm + 11.13cm + 0.423cm + 4.7cm + 18 + + + + + + + true + + + + + =First(Fields!CustAddr2.Value) + + + + + + + true + + + + + =First(Fields!CustAddr3.Value) + + + + + + + true + + + + + =First(Fields!CustAddr7.Value) + + + + + + + true + + + + + =First(Fields!CustAddr6.Value) + + + + + + + true + + + + + =First(Fields!CustAddr5.Value) + + + + + + + true + + + + + =First(Fields!CustAddr4.Value) + + + + + + + true + + + + + =First(Fields!CustVATRegNo.Value) + + + + + + + true + + + + + =First(Fields!NumberText2.Value) + + + + + + + true + + + + + =First(Fields!DueDate_CustLedgEntry.Value) + + + + + + + ContentsOnly + 9.10053cm + 3.79119in + 6.87414in + 1 + + =IIF(Fields!NumberText2.Value="",TRUE,FALSE) + + - - - - - 41 - - =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) - - NoOutput - - - 8 - - - - - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!BankAcc_TABLECAPTION__________BankAccTableFilter.Value) - - - - - - 40 - - =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) - - NoOutput - - - 8 - - - - - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!BankAcc__No__Caption.Value) - - - - - - 39 - - - - - - - - true - - - - - =First(Fields!BankAcc_NameCaption.Value) - - - - - - 38 - - - - - - - - true - - - - - =First(Fields!BankAcc__Currency_Code_Caption.Value) - - - - - - 37 - - - - - - - - true - - - - - =First(Fields!BankAcc__Credit_Limit_for_Discount_Caption.Value) - - - - - - - 36 - - - - - - - - true - - - - - =First(Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption.Value) - - - - - - - 35 - - - - - - - - true - - - - - =First(Fields!Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt_____ABS__Credit_Limit_for_Discount_Caption.Value) - - - - - - - 34 - - - - - - - - true - - - - - =First(Fields!NonPostedDiscAmtCaption.Value) - - - - - - - 33 - - - - - - - - true - - - - - =First(Fields!Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt__ABS__Credit_Limit_for_Discount_Caption.Value) - - - - - - - 32 - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__No__.Value - - - - - - 30 - - - - - - - - true - - - - - =Fields!BankAcc_Name.Value - - - - - - 29 - - - - - - - - true - - - - - =Fields!BankAcc__Currency_Code_.Value - - - - - - 28 - - - - - - - - true - true - - - - - =Fields!BankAcc__Credit_Limit_for_Discount_.Value - - - - - - 27 - - - - - - - - true - true - - - - - =Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value - - - - - - 26 - - - - - - - - true - true - - - - - =Fields!Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt.Value - - - - - - 25 - - - - - - - - true - true - - - - - =Fields!NonPostedDiscAmt.Value - - - - - - 24 - - - - - - - - true - true - - - - - =Fields!Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt.Value - - - - - - 23 - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__No__.Value - - - - - - 7 - - - - - - - - true - - - - - =Fields!BankAcc_Name.Value - - - - - - 6 - - - - - - - - true - - - - - =Fields!BankAcc__Currency_Code_.Value - - - - - - 5 - - - - - - - - true - true - - - - - =Fields!CreditLimitForDiscLCY.Value - - - - - - 4 - - - - - - - - true - true - - - - - =Fields!BankAcc__Posted_R_Bills_Rmg__Amt___LCY__.Value - - - - - - 3 - - - - - - - - true - true - - - - - =Fields!CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY_____ABS_CreditLimitForDiscLCY.Value - - - - - - 2 - - - - - - - - true - true - - - - - =Fields!NonPostedDiscAmtLCY.Value - - - - - - 1 - - - - - - - - true - true - - - - - =Fields!CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY.Value - - - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox2 - 8 - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =First(Fields!TotalCaption.Value) - - - - - - 15 - - - - - - - - true - - - - - - - - 2 - - - - - - - true - true - - - - - =Sum(Fields!BankAcc__Credit_Limit_for_Discount_.Value) - - - - - - 13 - - - - - - - - true - true - - - - - =Sum(Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value) - - - - - - 12 - - - - - - - - true - true - - - - - =Code.BlankNeg(Sum(Fields!BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value)) - - - - - - 11 - - - - - - - - true - true - - - - - =Sum(Fields!NonPostedDiscAmt.Value) - - - - - - 10 - - - - - - - - true - true - - - - - =Code.BlankNeg(Sum(Fields!BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt.Value)) - - - - - - 9 - - - - - - - - 0.423cm - - - - - true - - - - - =First(Fields!TotalCaption_Control43.Value) - - - - - - 22 - - - - - - - - true - - - - - - - - 2 - - - - - - - true - true - - - - - =Sum(Fields!CreditLimitForDiscLCY.Value) - - - - - - 20 - - - - - - - - true - true - - - - - =Sum(Fields!BankAcc__Posted_R_Bills_Rmg__Amt___LCY__.Value) - - - - - - 19 - - - - - - - - true - true - - - - - =Code.BlankNeg(Sum(Fields!CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__.Value)) - - - - - - 18 - - - - - - - - true - true - - - - - =Sum(Fields!NonPostedDiscAmtLCY.Value) - - - - - - 17 - - - - - - - - true - true - - - - - =Code.BlankNeg(Sum(Fields!CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY.Value)) - - - - - - 16 - - - - - - - - - - - - - - - - - - - - - - - - - =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) - - After - true - - - - =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) - - After - true - - - After - true - - - After - true - - - - Detail - - - - - =iif(Fields!PrintAmountsInLCY.Value=TRUE,TRUE,FALSE) - - - - - =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) - - - - Detail_Collection - Output - true - - - Before - true - - - - =iif(Fields!PrintAmountsInLCY.Value=TRUE,TRUE,FALSE) - - Before - true - - - - =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) - - Before - true - - - - DataSet_Result - 1.692cm - 6 - - - true - true - - - - - =User!UserID - - - - - - - 0.84656cm - 14.92063cm - 0.423cm - 3.25001cm - 5 - - - - true - - - - - =Fields!FORMAT_TODAY_0_4_.Value - - - - - - - 0.00056cm - 15.02064cm - 0.423cm - 3.15cm - 3 - - - - true - - - - - =Fields!COMPANYNAME.Value - - - - - - 0.423cm - 0.02064cm - 0.423cm - 7.5cm - 2 - - - - true - - - - - =Fields!Bank___RiskCaption.Value - - - - - - 0.02064cm - 0.423cm - 7.5cm - 1 - - - - true - - - - - =Fields!CurrReport_PAGENOCaption.Value - - - - - - 0.42356cm - 16.97064cm - 0.423cm - 0.75cm - - - - 6.345cm - - 18.2cm - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - - =User!Language - true - Invalid - 1bbfd5a8-35df-4e81-9d36-4f096ef3013f - - - - - USERID - - - COMPANYNAME - - - FORMAT_TODAY_0_4_ - - - PrintAmountsInLCY - - - BankAcc_TABLECAPTION__________BankAccTableFilter - - - BankAccTableFilter - - - BankAcc__No__ - - - BankAcc_Name - - - BankAcc__Credit_Limit_for_Discount_ - - - BankAcc__Credit_Limit_for_Discount_Format - - - BankAcc__Posted_Receiv__Bills_Rmg__Amt__ - - - BankAcc__Posted_Receiv__Bills_Rmg__Amt__Format - - - NonPostedDiscAmt - - - NonPostedDiscAmtFormat - - - Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt - - - Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__AmtFormat - - - Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt - - - Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmtFormat - - - BankAcc__Currency_Code_ - - - CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY - - - CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCYFormat - - - NonPostedDiscAmtLCY - - - NonPostedDiscAmtLCYFormat - - - CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY_____ABS_CreditLimitForDiscLCY - - - CreditLimitForDiscLCY__Posted_R_Bills_Rmg__Amt___LCY_____ABS_CreditLimitForDiscLCYFormat - - - BankAcc__Posted_R_Bills_Rmg__Amt___LCY__ - - - BankAcc__Posted_R_Bills_Rmg__Amt___LCY__Format - - - CreditLimitForDiscLCY - - - CreditLimitForDiscLCYFormat - - - BankAcc__Currency_Code__Control35 - - - BankAcc_Name_Control36 - - - BankAcc__No___Control37 - - - BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt - - - BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmtFormat - - - NonPostedDiscAmt_Control24 - - - NonPostedDiscAmt_Control24Format - - - BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt__ - - - BankAcc__Credit_Limit_for_Discount__BankAcc__Posted_Receiv__Bills_Rmg__Amt__Format - - - BankAcc_BankAcc__Posted_Receiv__Bills_Rmg__Amt__ - - - BankAcc_BankAcc__Posted_Receiv__Bills_Rmg__Amt__Format - - - BankAcc_BankAcc__Credit_Limit_for_Discount_ - - - BankAcc_BankAcc__Credit_Limit_for_Discount_Format - - - CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCY - - - CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY___NonPostedDiscAmtLCYFormat - - - NonPostedDiscAmtLCY_Control39 - - - NonPostedDiscAmtLCY_Control39Format - - - CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__ - - - CreditLimitForDiscLCY_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__Format - - - BankAcc_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__ - - - BankAcc_BankAcc__Posted_R_Bills_Rmg__Amt___LCY__Format - - - CreditLimitForDiscLCY_Control42 - - - CreditLimitForDiscLCY_Control42Format - - - Bank___RiskCaption - - - CurrReport_PAGENOCaption - - - All_amounts_are_in_LCYCaption - - - BankAcc__No__Caption - - - BankAcc_NameCaption - - - BankAcc__Credit_Limit_for_Discount_Caption - - - BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption - - - NonPostedDiscAmtCaption - - - Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt_____ABS__Credit_Limit_for_Discount_Caption - - - Credit_Limit_for_Discount___Posted_Receiv__Bills_Rmg__Amt___NonPostedDiscAmt__ABS__Credit_Limit_for_Discount_Caption - - - BankAcc__Currency_Code_Caption - - - TotalCaption - - - TotalCaption_Control43 - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPurchCrMemoUpdate.Page.al b/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPurchCrMemoUpdate.Page.al deleted file mode 100644 index 5a6061c67a6..00000000000 --- a/src/Layers/ES/BaseApp/Local/Cartera/Purchases/History/PostedPurchCrMemoUpdate.Page.al +++ /dev/null @@ -1,96 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -page 10767 "Posted Purch. Cr.Memo - Update" -{ - Caption = 'Posted Purch. Cr.Memo - Update'; - DeleteAllowed = false; - Editable = true; - InsertAllowed = false; - ModifyAllowed = true; - PageType = Card; - ShowFilter = false; - SourceTable = "Purch. Cr. Memo Hdr."; - SourceTableTemporary = true; - - layout - { - area(content) - { - group(General) - { - field("No."; Rec."No.") - { - ApplicationArea = All; - Editable = false; - ToolTip = 'Specifies the posted credit memo number.'; - } - field("Buy-from Vendor Name"; Rec."Buy-from Vendor Name") - { - ApplicationArea = All; - Caption = 'Vendor'; - Editable = false; - ToolTip = 'Specifies the name of the vendor who shipped the items.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the date the credit memo was posted.'; - } - } - group("Cr. Memo Details") - { - Caption = 'Cr. Memo Details'; - field("Posting Description"; Rec."Posting Description") - { - ApplicationArea = Basic, Suite; - Editable = true; - ToolTip = 'Specifies any text that is entered to accompany the posting, for example for information to auditors.'; - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - xPurchCrMemoHdr := Rec; - end; - - trigger OnQueryClosePage(CloseAction: Action): Boolean - begin - if CloseAction = ACTION::LookupOK then - if RecordChanged() then - CODEUNIT.Run(CODEUNIT::"Purch. Cr. Memo Hdr. - Edit", Rec); - end; - - var - xPurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; - - local procedure RecordChanged() IsChanged: Boolean - begin - IsChanged := Rec."Posting Description" <> xPurchCrMemoHdr."Posting Description"; - - OnAfterRecordChanged(Rec, xPurchCrMemoHdr, IsChanged); - end; - - [Scope('OnPrem')] - procedure SetRec(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.") - begin - Rec := PurchCrMemoHdr; - Rec.Insert(); - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterRecordChanged(var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; xPurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var IsChanged: Boolean) - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentLine.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentLine.Table.al deleted file mode 100644 index 6daf9e6335a..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentLine.Table.al +++ /dev/null @@ -1,114 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -table 7000008 "BG/PO Comment Line" -{ - Caption = 'BG/PO Comment Line'; - DrillDownPageID = "BG/PO Comment List"; - LookupPageID = "BG/PO Comment List"; - DataClassification = CustomerContent; - - fields - { - field(2; "BG/PO No."; Code[20]) - { - Caption = 'BG/PO No.'; - NotBlank = true; - } - field(3; "Line No."; Integer) - { - Caption = 'Line No.'; - } - field(4; Date; Date) - { - Caption = 'Date'; - } - field(5; "Code"; Code[10]) - { - Caption = 'Code'; - } - field(6; Comment; Text[80]) - { - Caption = 'Comment'; - } - field(7; Type; Enum "Cartera Document Type") - { - Caption = 'Type'; - } - } - - keys - { - key(Key1; "BG/PO No.", Type, "Line No.") - { - Clustered = true; - } - } - - fieldgroups - { - } - - [Scope('OnPrem')] - procedure SetUpNewLine() - var - BGPOCommentLine: Record "BG/PO Comment Line"; - begin - BGPOCommentLine.SetRange("BG/PO No.", "BG/PO No."); - BGPOCommentLine.SetRange(Type, Type); - if not BGPOCommentLine.FindFirst() then - Date := WorkDate(); - end; - - procedure Caption(): Text - var - BillGr: Record "Bill Group"; - PostedBillGr: Record "Posted Bill Group"; - ClosedBillGr: Record "Closed Bill Group"; - PmtOrd: Record "Payment Order"; - PostedPmtOrd: Record "Posted Payment Order"; - ClosedPmtOrd: Record "Closed Payment Order"; - begin - case true of - BillGr.Get("BG/PO No."): - begin - BillGr.CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', BillGr."No.", BillGr."Bank Account Name")); - end; - PostedBillGr.Get("BG/PO No."): - begin - PostedBillGr.CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', PostedBillGr."No.", PostedBillGr."Bank Account Name")); - end; - ClosedBillGr.Get("BG/PO No."): - begin - ClosedBillGr.CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', ClosedBillGr."No.", ClosedBillGr."Bank Account Name")); - end; - PmtOrd.Get("BG/PO No."): - begin - PmtOrd.CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', PmtOrd."No.", PmtOrd."Bank Account Name")); - end; - PostedPmtOrd.Get("BG/PO No."): - begin - PostedPmtOrd.CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', PostedPmtOrd."No.", PostedPmtOrd."Bank Account Name")); - end; - ClosedPmtOrd.Get("BG/PO No."): - begin - ClosedPmtOrd.CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', ClosedPmtOrd."No.", ClosedPmtOrd."Bank Account Name")); - end; - end; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentList.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentList.Page.al deleted file mode 100644 index 5cc9af9ce48..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentList.Page.al +++ /dev/null @@ -1,45 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 7000024 "BG/PO Comment List" -{ - Caption = 'BG/PO Comment List'; - DataCaptionExpression = Rec.Caption(); - Editable = false; - PageType = List; - SourceTable = "BG/PO Comment Line"; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("BG/PO No."; Rec."BG/PO No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the bill group/payment order in which the comment line is included.'; - } - field(Date; Rec.Date) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date when the comment was entered.'; - } - field(Comment; Rec.Comment) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the comment text to include in the comment line for the bill group/payment order.'; - } - } - } - } - - actions - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentSheet.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentSheet.Page.al deleted file mode 100644 index ed106703634..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOCommentSheet.Page.al +++ /dev/null @@ -1,60 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 7000025 "BG/PO Comment Sheet" -{ - AutoSplitKey = true; - Caption = 'BG/PO Comment Sheet'; - DataCaptionExpression = Rec.Caption(); - MultipleNewLines = true; - PageType = List; - SourceTable = "BG/PO Comment Line"; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field(Date; Rec.Date) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date when the comment was entered.'; - } - field(Comment; Rec.Comment) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the comment text to include in the comment line for the bill group/payment order.'; - } - field("Code"; Rec.Code) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a code identifying this comment line to include in a bill group/payment order.'; - Visible = false; - } - } - } - area(factboxes) - { - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - } - - trigger OnNewRecord(BelowxRec: Boolean) - begin - Rec.SetUpNewLine(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOMaturityLines.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOMaturityLines.Page.al deleted file mode 100644 index 4026b06e0a9..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOMaturityLines.Page.al +++ /dev/null @@ -1,176 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Foundation.Enums; -using Microsoft.Foundation.Period; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.Receivables; -using System.Utilities; - -page 7000032 "BG/PO Maturity Lines" -{ - Caption = 'Lines'; - PageType = ListPart; - SourceTable = Date; - - layout - { - area(content) - { - repeater(Control1) - { - Editable = false; - ShowCaption = false; - field("Period Start"; Rec."Period Start") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the starting date of the period that you want to view.'; - } - field("Period Name"; Rec."Period Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name of the period shown on the line.'; - } - field(DocAmount; DocAmount) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = CurrCode; - AutoFormatType = 1; - Caption = 'Amount'; - DrillDown = true; - ToolTip = 'Specifies the amount for the bill group or payment order for the period.'; - - trigger OnDrillDown() - begin - ShowDocEntries(); - end; - } - field(DocAmountLCY; DocAmountLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amount (LCY)'; - ToolTip = 'Specifies the amount for the bill group or payment order for the period.'; - - trigger OnDrillDown() - begin - ShowDocEntries(); - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - SetDateFilter(); - if Type = Type::Receivable then begin - BillGr.CalcFields(Amount, "Amount (LCY)"); - DocAmount := BillGr.Amount; - DocAmountLCY := BillGr."Amount (LCY)"; - end; - if Type = Type::Payable then begin - PmtOrd.CalcFields(Amount, "Amount (LCY)"); - DocAmount := PmtOrd.Amount; - DocAmountLCY := PmtOrd."Amount (LCY)"; - end; - end; - - trigger OnFindRecord(Which: Text): Boolean - begin - exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); - end; - - trigger OnNextRecord(Steps: Integer): Integer - begin - exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); - end; - - trigger OnOpenPage() - begin - Rec.Reset(); - end; - - var - BillGr: Record "Bill Group"; - PmtOrd: Record "Payment Order"; - Doc: Record "Cartera Doc."; - PeriodPageManagement: Codeunit PeriodPageManagement; - PeriodLength: Enum "Analysis Period Type"; - AmountType: Enum "Analysis Amount Type"; - DocAmount: Decimal; - DocAmountLCY: Decimal; - Type: Option Receivable,Payable; - CurrCode: Code[10]; - - [Scope('OnPrem')] - procedure SetReceivable(var NewBillGr: Record "Bill Group"; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") - begin - BillGr.Copy(NewBillGr); - PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); - AmountType := "Analysis Amount Type".FromInteger(NewAmountType); - Type := Type::Receivable; - CurrCode := BillGr."Currency Code"; - CurrPage.Update(false); - end; - - [Scope('OnPrem')] - procedure SetPayable(var NewPmtOrd: Record "Payment Order"; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") - begin - PmtOrd.Copy(NewPmtOrd); - PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); - AmountType := "Analysis Amount Type".FromInteger(NewAmountType); - Type := Type::Payable; - CurrCode := PmtOrd."Currency Code"; - CurrPage.Update(false); - end; - - [Scope('OnPrem')] - procedure SetDateFilter() - begin - if Type = Type::Receivable then - if AmountType = AmountType::"Net Change" then - BillGr.SetRange("Due Date Filter", Rec."Period Start", Rec."Period End") - else - BillGr.SetRange("Due Date Filter", 0D, Rec."Period End"); - if Type = Type::Payable then - if AmountType = AmountType::"Net Change" then - PmtOrd.SetRange("Due Date Filter", Rec."Period Start", Rec."Period End") - else - PmtOrd.SetRange("Due Date Filter", 0D, Rec."Period End"); - end; - - local procedure ShowDocEntries() - begin - SetDateFilter(); - if Type = Type::Receivable then begin - Doc.SetRange(Type, Type::Receivable); - Doc.SetRange("Bill Gr./Pmt. Order No.", BillGr."No."); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetFilter("Due Date", BillGr.GetFilter("Due Date Filter")); - Doc.SetFilter("Global Dimension 1 Code", BillGr.GetFilter("Global Dimension 1 Filter")); - Doc.SetFilter("Global Dimension 2 Code", BillGr.GetFilter("Global Dimension 2 Filter")); - Doc.SetFilter("Category Code", BillGr.GetFilter("Category Filter")); - end; - if Type = Type::Payable then begin - Doc.SetRange(Type, Type::Payable); - Doc.SetRange("Bill Gr./Pmt. Order No.", PmtOrd."No."); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetFilter("Due Date", PmtOrd.GetFilter("Due Date Filter")); - Doc.SetFilter("Global Dimension 1 Code", PmtOrd.GetFilter("Global Dimension 1 Filter")); - Doc.SetFilter("Global Dimension 2 Code", PmtOrd.GetFilter("Global Dimension 2 Filter")); - Doc.SetFilter("Category Code", PmtOrd.GetFilter("Category Filter")); - end; - - PAGE.RunModal(0, Doc); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOPostBuffer.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOPostBuffer.Table.al deleted file mode 100644 index 51f6d0d2107..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOPostBuffer.Table.al +++ /dev/null @@ -1,75 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.Dimension; - -table 7000012 "BG/PO Post. Buffer" -{ - Caption = 'BG/PO Post. Buffer'; - DataClassification = CustomerContent; - - fields - { - field(1; Account; Code[20]) - { - Caption = 'Account'; - DataClassification = SystemMetadata; - } - field(2; "Balance Account"; Code[20]) - { - Caption = 'Balance Account'; - DataClassification = SystemMetadata; - } - field(3; Amount; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amount'; - DataClassification = SystemMetadata; - } - field(4; "Gain - Loss Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Gain - Loss Amount (LCY)'; - DataClassification = SystemMetadata; - } - field(5; "Global Dimension 1 Code"; Code[20]) - { - Caption = 'Global Dimension 1 Code'; - DataClassification = SystemMetadata; - } - field(6; "Global Dimension 2 Code"; Code[20]) - { - Caption = 'Global Dimension 2 Code'; - DataClassification = SystemMetadata; - } - field(7; "Entry No."; Integer) - { - Caption = 'Entry No.'; - DataClassification = SystemMetadata; - } - field(480; "Dimension Set ID"; Integer) - { - Caption = 'Dimension Set ID'; - DataClassification = SystemMetadata; - TableRelation = "Dimension Set Entry"; - } - } - - keys - { - key(Key1; Account, "Balance Account", "Entry No.") - { - Clustered = true; - } - } - - fieldgroups - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOPostandPrint.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOPostandPrint.Codeunit.al deleted file mode 100644 index 814962588d5..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/BGPOPostandPrint.Codeunit.al +++ /dev/null @@ -1,184 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -codeunit 7000003 "BG/PO-Post and Print" -{ - Permissions = TableData "Bill Group" = rm, - TableData "Posted Bill Group" = rm, - TableData "Closed Bill Group" = rm, - TableData "Payment Order" = rm, - TableData "Posted Payment Order" = rm, - TableData "Closed Payment Order" = rm; - - trigger OnRun() - begin - end; - - var - Text1100000: Label 'This Bill Group has not been printed. Do you want to continue?'; - Text1100001: Label 'The posting process has been cancelled by the user.'; - Text1100002: Label 'Do you want to post the Bill Group?'; - Text1100003: Label 'This Payment Order has not been printed. Do you want to continue?'; - Text1100004: Label 'Do you want to post the Payment Order?'; - CarteraReportSelection: Record "Cartera Report Selections"; - - procedure ReceivablePostOnly(BillGr: Record "Bill Group") - begin - if BillGr."No. Printed" = 0 then begin - if not Confirm(Text1100000) then - Error(Text1100001); - end else - if not Confirm(Text1100002, false) then - Error(Text1100001); - - BillGr.SetRecFilter(); - REPORT.RunModal(REPORT::"Post Bill Group", BillGr."Dealing Type" = BillGr."Dealing Type"::Discount, false, BillGr); - end; - - procedure ReceivablePostAndPrint(BillGr: Record "Bill Group") - var - PostedBillGr: Record "Posted Bill Group"; - begin - BillGr.SetRecFilter(); - REPORT.RunModal(REPORT::"Post Bill Group", BillGr."Dealing Type" = BillGr."Dealing Type"::Discount, false, BillGr); - - Commit(); - - if PostedBillGr.Get(BillGr."No.") then begin - PostedBillGr.SetRecFilter(); - CarteraReportSelection.Reset(); - CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Posted Bill Group"); - CarteraReportSelection.Find('-'); - repeat - CarteraReportSelection.TestField("Report ID"); - REPORT.Run(CarteraReportSelection."Report ID", false, false, PostedBillGr); - until CarteraReportSelection.Next() = 0; - end; - end; - - procedure PayablePostOnly(PmtOrd: Record "Payment Order") - var - IsHandled: Boolean; - begin - OnBeforePayablePostOnly(PmtOrd, IsHandled); - if not IsHandled then - if PmtOrd."No. Printed" = 0 then begin - if not Confirm(Text1100003) then - Error(Text1100001); - end else - if not Confirm(Text1100004, false) then - Error(Text1100001); - - PmtOrd.SetRecFilter(); - REPORT.RunModal(REPORT::"Post Payment Order", false, false, PmtOrd); - - OnAfterPayablePostOnly(PmtOrd); - end; - - procedure PayablePostAndPrint(PmtOrd: Record "Payment Order") - var - PostedPmtOrd: Record "Posted Payment Order"; - IsHandled: Boolean; - begin - IsHandled := false; - OnBeforePayablePostAndPrint(PmtOrd, IsHandled); - if not IsHandled then begin - PmtOrd.SetRecFilter(); - REPORT.RunModal(REPORT::"Post Payment Order", false, false, PmtOrd); - - Commit(); - - if PostedPmtOrd.Get(PmtOrd."No.") then begin - PostedPmtOrd.SetRecFilter(); - CarteraReportSelection.Reset(); - CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Posted Payment Order"); - CarteraReportSelection.Find('-'); - repeat - CarteraReportSelection.TestField("Report ID"); - REPORT.Run(CarteraReportSelection."Report ID", false, false, PostedPmtOrd); - until CarteraReportSelection.Next() = 0; - end; - end; - - OnAfterPayablePostAndPrint(PmtOrd); - end; - - procedure PrintCounter("Table": Integer; Number: Code[20]) - var - PostedBillGr: Record "Posted Bill Group"; - ClosedBillGr: Record "Closed Bill Group"; - PostedPaymentOrder: Record "Posted Payment Order"; - ClosedPaymentOrder: Record "Closed Payment Order"; - BillGr: Record "Bill Group"; - PaymentOrder: Record "Payment Order"; - begin - case true of - Table = DATABASE::"Bill Group": - begin - BillGr.Get(Number); - BillGr."No. Printed" := BillGr."No. Printed" + 1; - BillGr.Modify(); - end; - Table = DATABASE::"Payment Order": - begin - PaymentOrder.Get(Number); - PaymentOrder."No. Printed" := PaymentOrder."No. Printed" + 1; - PaymentOrder.Modify(); - end; - Table = DATABASE::"Posted Bill Group": - begin - PostedBillGr.Get(Number); - PostedBillGr."No. Printed" := PostedBillGr."No. Printed" + 1; - PostedBillGr.Modify(); - end; - Table = DATABASE::"Closed Bill Group": - begin - ClosedBillGr.Get(Number); - ClosedBillGr."No. Printed" := ClosedBillGr."No. Printed" + 1; - ClosedBillGr.Modify(); - end; - Table = DATABASE::"Posted Payment Order": - begin - PostedPaymentOrder.Get(Number); - PostedPaymentOrder."No. Printed" := PostedPaymentOrder."No. Printed" + 1; - PostedPaymentOrder.Modify(); - end; - Table = DATABASE::"Closed Payment Order": - begin - ClosedPaymentOrder.Get(Number); - ClosedPaymentOrder."No. Printed" := ClosedPaymentOrder."No. Printed" + 1; - ClosedPaymentOrder.Modify(); - end; - end; - Commit(); - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterPayablePostOnly(var PaymentOrder: Record "Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterPayablePostAndPrint(var PaymentOrder: Record "Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforePayablePostOnly(var PaymentOrder: Record "Payment Order"; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforePayablePostAndPrint(var PaymentOrder: Record "Payment Order"; var IsHandled: Boolean) - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDealingType.Enum.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDealingType.Enum.al deleted file mode 100644 index 82e5823cba2..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDealingType.Enum.al +++ /dev/null @@ -1,14 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -enum 7000026 "Cartera Dealing Type" -{ - Extensible = true; - AssignmentCompatibility = true; - - value(0; "Collection") { Caption = 'Collection'; } - value(1; "Discount") { Caption = 'Discount'; } -} diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDoc.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDoc.Table.al deleted file mode 100644 index 870ac3a6d7d..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDoc.Table.al +++ /dev/null @@ -1,449 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Bank.DirectDebit; -using Microsoft.EServices.EDocument; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Foundation.PaymentTerms; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Purchases.Vendor; -using Microsoft.Sales.Customer; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -table 7000002 "Cartera Doc." -{ - Caption = 'Cartera Doc.'; - DrillDownPageID = "Cartera Documents"; - LookupPageID = "Cartera Documents"; - Permissions = TableData "Cartera Doc." = rm; - DataClassification = CustomerContent; - - fields - { - field(1; Type; Enum "Cartera Document Type") - { - Caption = 'Type'; - } - field(2; "Entry No."; Integer) - { - Caption = 'Entry No.'; - } - field(3; "No."; Code[20]) - { - Caption = 'No.'; - } - field(4; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(5; "Document No."; Code[20]) - { - Caption = 'Document No.'; - } - field(6; Description; Text[100]) - { - Caption = 'Description'; - } - field(9; "Remaining Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Remaining Amount'; - } - field(10; "Remaining Amt. (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Remaining Amt. (LCY)'; - } - field(11; "Due Date"; Date) - { - Caption = 'Due Date'; - - trigger OnValidate() - var - DocEdit: Codeunit "Document-Edit"; - begin - CheckDueDate(); - DocEdit.EditDueDate(Rec); - - Modify(); - ResetNoPrinted(); - end; - } - field(12; "Payment Method Code"; Code[10]) - { - Caption = 'Payment Method Code'; - TableRelation = "Payment Method"; - } - field(13; Accepted; Option) - { - Caption = 'Accepted'; - OptionCaption = 'Not Required,Yes,No'; - OptionMembers = "Not Required",Yes,No; - } - field(14; Place; Boolean) - { - Caption = 'Place'; - } - field(15; "Collection Agent"; Option) - { - Caption = 'Collection Agent'; - OptionCaption = 'Direct,Bank'; - OptionMembers = Direct,Bank; - } - field(16; "Bill Gr./Pmt. Order No."; Code[20]) - { - Caption = 'Bill Gr./Pmt. Order No.'; - TableRelation = if (Type = const(Receivable)) "Bill Group"."No." - else - if (Type = const(Payable)) "Payment Order"."No."; - } - field(17; "Category Code"; Code[10]) - { - Caption = 'Category Code'; - TableRelation = "Category Code"; - } - field(18; "Account No."; Code[20]) - { - Caption = 'Account No.'; - TableRelation = if (Type = const(Receivable)) Customer - else - if (Type = const(Payable)) Vendor; - } - field(19; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - } - field(20; "Cust./Vendor Bank Acc. Code"; Code[20]) - { - Caption = 'Cust./Vendor Bank Acc. Code'; - TableRelation = if (Type = const(Receivable)) "Customer Bank Account".Code where("Customer No." = field("Account No.")) - else - if (Type = const(Payable)) "Vendor Bank Account".Code where("Vendor No." = field("Account No.")); - - trigger OnValidate() - begin - ResetNoPrinted(); - UpdateDirectDebitMandate(); - end; - } -#if not CLEANSCHEMA25 - field(21; "Pmt. Address Code"; Code[10]) - { - Caption = 'Pmt. Address Code'; - ObsoleteReason = 'Address is taken from the fields Address, City, etc. of Customer/Vendor table.'; - ObsoleteState = Removed; - ObsoleteTag = '25.0'; - } -#endif - field(22; "Global Dimension 1 Code"; Code[20]) - { - CaptionClass = '1,1,1'; - Caption = 'Global Dimension 1 Code'; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(23; "Global Dimension 2 Code"; Code[20]) - { - CaptionClass = '1,1,2'; - Caption = 'Global Dimension 2 Code'; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(29; "Original Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Original Amount'; - } - field(30; "Original Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Original Amount (LCY)'; - } - field(40; "Document Type"; Enum "Cartera Document Doc. Type") - { - Caption = 'Document Type'; - Editable = false; - } - field(45; "On Hold"; Boolean) - { - CalcFormula = exist("Vendor Ledger Entry" where("On Hold" = filter(<> ''), - "Entry No." = field("Entry No."))); - Caption = 'On Hold'; - FieldClass = FlowField; - } - field(46; Adjusted; Boolean) - { - Caption = 'Adjusted'; - } - field(48; "Adjusted Amount"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Adjusted Amount'; - } - field(49; "From Journal"; Boolean) - { - Caption = 'From Journal'; - } - field(50; "Elect. Pmts Exported"; Boolean) - { - Caption = 'Elect. Pmts Exported'; - } - field(51; "Export File Name"; Text[30]) - { - Caption = 'Export File Name'; - } - field(52; "Transfer Type"; Option) - { - Caption = 'Transfer Type'; - OptionCaption = 'National,International,Special'; - OptionMembers = National,International,Special; - } - field(480; "Dimension Set ID"; Integer) - { - Caption = 'Dimension Set ID'; - Editable = false; - TableRelation = "Dimension Set Entry"; - - trigger OnLookup() - begin - Rec.ShowDimensions(); - end; - - trigger OnValidate() - var - DimMgt: Codeunit DimensionManagement; - begin - DimMgt.UpdateGlobalDimFromDimSetID("Dimension Set ID", "Global Dimension 1 Code", "Global Dimension 2 Code"); - end; - } - field(1200; "Direct Debit Mandate ID"; Code[35]) - { - Caption = 'Direct Debit Mandate ID'; - TableRelation = "SEPA Direct Debit Mandate".ID where("Customer No." = field("Account No.")); - - trigger OnValidate() - begin - CODEUNIT.Run(CODEUNIT::"Document-Edit", Rec); - UpdateBankAccountCode(); - Modify(); - ResetNoPrinted(); - end; - } - field(10700; "Original Document No."; Code[20]) - { - Caption = 'Original Document No.'; - } - } - - keys - { - key(Key1; Type, "Entry No.") - { - Clustered = true; - } - key(Key2; Type, "Document No.") - { - } - key(Key3; Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place) - { - SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; - } - key(Key4; Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date") - { - SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; - } - key(Key5; Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Currency Code", Accepted, "Due Date", Place) - { - Enabled = false; - SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; - } - key(Key6; Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Category Code", "Currency Code", Accepted, "Due Date") - { - Enabled = false; - SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; - } - key(Key7; Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", "Account No.", "Due Date", "Document Type") - { - SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; - } - key(Key8; Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Account No.", "Due Date", "Document Type") - { - SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; - } - key(Key9; Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place, "Document Type") - { - SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; - } - key(Key10; Type, "Bill Gr./Pmt. Order No.", "Collection Agent", "Due Date", "Global Dimension 1 Code", "Global Dimension 2 Code", "Category Code", "Posting Date", "Document No.", Accepted, "Currency Code", "Document Type", "Payment Method Code") - { - SumIndexFields = "Remaining Amount", "Remaining Amt. (LCY)"; - } - key(Key11; Type, "Bill Gr./Pmt. Order No.", "Transfer Type") - { - } - key(Key12; Type, "Bill Gr./Pmt. Order No.", "Transfer Type", "Account No.") - { - } - key(Key13; Type, "Original Document No.") - { - } - } - - fieldgroups - { - } - - trigger OnDelete() - var - CarteraManagement: Codeunit CarteraManagement; - begin - TestField("Elect. Pmts Exported", false); - SetRange(Type, Type); - SetRange("Entry No.", "Entry No."); - case Type of - Type::Payable: - CarteraManagement.RemovePayableDocs(Rec); - Type::Receivable: - CarteraManagement.RemoveReceivableDocs(Rec); - end; - end; - - trigger OnInsert() - begin - if Type = Type::Payable then - ElectPmtMgmt.GetTransferType("Account No.", "Remaining Amount", "Transfer Type", false); - end; - - trigger OnModify() - begin - TestField("Elect. Pmts Exported", false); - end; - - trigger OnRename() - begin - TestField("Elect. Pmts Exported", false); - end; - - var - BillGr: Record "Bill Group"; - PmtOrd: Record "Payment Order"; - ElectPmtMgmt: Codeunit "Elect. Pmts Management"; - Text001: Label '%1 is more than the legal limit of %2 days after the document date %3 for the original document'; - - [Scope('OnPrem')] - procedure ResetNoPrinted() - begin - if "Bill Gr./Pmt. Order No." <> '' then - if Type = Type::Receivable then begin - BillGr.Get("Bill Gr./Pmt. Order No."); - BillGr."No. Printed" := 0; - BillGr.Modify(); - end else begin - PmtOrd.Get("Bill Gr./Pmt. Order No."); - PmtOrd."No. Printed" := 0; - PmtOrd.Modify(); - end; - end; - - [Scope('OnPrem')] - procedure ShowDimensions() - var - DimMgt: Codeunit DimensionManagement; - begin - DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo('%1 %2 %3', Type, "Entry No.", "Document No.")); - end; - - [Scope('OnPrem')] - procedure CheckDueDate() - var - InvoiceSplitPayment: Codeunit "Invoice-Split Payment"; - DocumentDate: Date; - MaxNoOfDaysTillDueDate: Integer; - begin - GetDocumentDates(DocumentDate, MaxNoOfDaysTillDueDate); - - if not InvoiceSplitPayment.CheckDueDate("Due Date", DocumentDate, MaxNoOfDaysTillDueDate) then - FieldError("Due Date", StrSubstNo(Text001, "Due Date", MaxNoOfDaysTillDueDate, DocumentDate)); - end; - - local procedure GetDocumentDates(var DocumentDate: Date; var MaxNoOfDaysTillDueDate: Integer) - var - PaymentTerms: Record "Payment Terms"; - SalesInvoiceHeader: Record "Sales Invoice Header"; - PurchInvHeader: Record "Purch. Inv. Header"; - begin - case Type of - Type::Receivable: - if SalesInvoiceHeader.Get("Document No.") then begin - PaymentTerms.Get(SalesInvoiceHeader."Payment Terms Code"); - DocumentDate := SalesInvoiceHeader."Document Date"; - end else - OnGetDocumentDateFromServiceInvoice(Rec."Document No.", DocumentDate); - Type::Payable: - if PurchInvHeader.Get("Document No.") then begin - PaymentTerms.Get(PurchInvHeader."Payment Terms Code"); - DocumentDate := PurchInvHeader."Document Date"; - end; - end; - - MaxNoOfDaysTillDueDate := PaymentTerms."Max. No. of Days till Due Date"; - end; - - [Scope('OnPrem')] - procedure UpdatePaymentMethodCode(DocumentNo: Code[20]; AccountNo: Code[20]; BillNo: Code[20]; PaymentMethodCode: Code[10]) - var - CarteraDoc: Record "Cartera Doc."; - begin - CarteraDoc.SetRange("Document No.", DocumentNo); - CarteraDoc.SetRange("Account No.", AccountNo); - if BillNo <> '' then begin - CarteraDoc.SetRange("Document Type", CarteraDoc."Document Type"::Bill); - CarteraDoc.SetRange("No.", BillNo); - end else - CarteraDoc.SetRange("Document Type", CarteraDoc."Document Type"::Invoice); - if CarteraDoc.FindFirst() and (CarteraDoc."Bill Gr./Pmt. Order No." = '') then begin - CarteraDoc.Validate("Payment Method Code", PaymentMethodCode); - CarteraDoc.Modify(true); - end; - end; - - procedure UpdateDirectDebitMandate() - var - SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate"; - begin - if (Rec."Bill Gr./Pmt. Order No." <> '') or (Rec.Type = Rec.Type::Payable) then - exit; - SEPADirectDebitMandate.SetRange("Customer No.", Rec."Account No."); - SEPADirectDebitMandate.SetRange("Customer Bank Account Code", Rec."Cust./Vendor Bank Acc. Code"); - if SEPADirectDebitMandate.FindFirst() then - Rec.Validate("Direct Debit Mandate ID", SEPADirectDebitMandate.ID); - end; - - procedure UpdateBankAccountCode() - var - SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate"; - begin - if (Rec."Bill Gr./Pmt. Order No." = '') or (Rec.Type = Rec.Type::Payable) then - exit; - if SEPADirectDebitMandate.Get(Rec."Direct Debit Mandate ID") then - Rec.Validate("Cust./Vendor Bank Acc. Code", SEPADirectDebitMandate."Customer Bank Account Code"); - end; - - [IntegrationEvent(false, false)] - local procedure OnGetDocumentDateFromServiceInvoice(DocumentNo: Code[20]; var DocumentDate: Date) - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentDocType.Enum.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentDocType.Enum.al deleted file mode 100644 index 02389b6eac5..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentDocType.Enum.al +++ /dev/null @@ -1,15 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -enum 7000025 "Cartera Document Doc. Type" -{ - Extensible = true; - AssignmentCompatibility = true; - - value(0; "Invoice") { Caption = 'Invoice'; } - value(1; "Credit Memo") { Caption = 'Credit Memo'; } - value(2; "Bill") { Caption = 'Bill'; } -} diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentStatus.Enum.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentStatus.Enum.al deleted file mode 100644 index 0d621f22dac..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentStatus.Enum.al +++ /dev/null @@ -1,15 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -enum 10724 "Cartera Document Status" -{ - Extensible = true; - AssignmentCompatibility = true; - - value(0; "Open") { Caption = 'Open'; } - value(1; "Honored") { Caption = 'Honored'; } - value(2; "Rejected") { Caption = 'Rejected'; } -} diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentType.Enum.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentType.Enum.al deleted file mode 100644 index 593b1eef9b6..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocumentType.Enum.al +++ /dev/null @@ -1,14 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -enum 7000000 "Cartera Document Type" -{ - Extensible = true; - AssignmentCompatibility = true; - - value(0; "Receivable") { Caption = 'Receivable'; } - value(1; "Payable") { Caption = 'Payable'; } -} diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocuments.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocuments.Page.al deleted file mode 100644 index 287f3ad4edd..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraDocuments.Page.al +++ /dev/null @@ -1,442 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.History; -using Microsoft.Sales.Customer; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -page 7000003 "Cartera Documents" -{ - Caption = 'Cartera Documents'; - DeleteAllowed = false; - InsertAllowed = false; - PageType = Worksheet; - Permissions = TableData "Cartera Doc." = m; - SaveValues = true; - SourceTable = "Cartera Doc."; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - } - repeater(Control1) - { - ShowCaption = false; - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field("Collection Agent"; Rec."Collection Agent") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the agent in which this document is settled.'; - } - field(Accepted; Rec.Accepted) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the Acceptance status required for a bill.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the when the creation of this document was posted.'; - Visible = false; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this document.'; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the payment method code defined for the document number.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of the document used to generate this document.'; - } - field("No."; Rec."No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number associated with a specific bill.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the description associated with this document.'; - } - field("Original Amount (LCY)"; Rec."Original Amount (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the initial amount of this document, in LCY.'; - Visible = false; - } - field("Original Amount"; Rec."Original Amount") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the initial amount of this document.'; - Visible = false; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending amount, in order for the document to be settled in full.'; - Visible = false; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending payment amount for the document to be settled in full.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the currency code in which this document was generated.'; - Visible = false; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - Visible = false; - } - field("Category Code"; Rec."Category Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a category code for this document.'; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the account number of the customer/vendor associated with this document.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the ledger entry number associated with the posting of this document.'; - } - field("Direct Debit Mandate ID"; Rec."Direct Debit Mandate ID") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the direct-debit mandate that the customer has signed to allow direct debit collection of payments.'; - } - } - group(Control49) - { - ShowCaption = false; - field(CurrTotalAmount; CurrTotalAmountLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Total Rmg. Amt. (LCY)'; - Editable = false; - ToolTip = 'Specifies the sum of amounts that remain to be paid.'; - Visible = CurrTotalAmountVisible; - } - } - } - } - - actions - { - area(navigation) - { - group("&Docs.") - { - Caption = '&Docs.'; - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - - trigger OnAction() - begin - Doc.Copy(Rec); - PAGE.Run(PAGE::"Documents Analysis", Doc); - end; - } - action(Maturity) - { - ApplicationArea = Basic, Suite; - Caption = 'Maturity'; - Image = Aging; - ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; - - trigger OnAction() - begin - Doc.Copy(Rec); - PAGE.RunModal(PAGE::"Documents Maturity", Doc); - end; - } - separator(Action55) - { - } - action("Dime&nsions") - { - ApplicationArea = Basic, Suite; - Caption = 'Dime&nsions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - separator(Action58) - { - } - action(Categorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Categorize'; - Ellipsis = true; - Image = Category; - ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(Doc); - CarteraManagement.CategorizeDocs(Doc); - end; - } - action(Decategorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Decategorize'; - Image = UndoCategory; - ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(Doc); - CarteraManagement.DecategorizeDocs(Doc); - end; - } - separator(Action37) - { - } - action(Reject) - { - ApplicationArea = Basic, Suite; - Caption = 'Reject'; - Ellipsis = true; - Image = Reject; - ToolTip = 'Post document rejections.'; - - trigger OnAction() - var - Cust: Record Customer; - begin - if Doc.Type = Doc.Type::Receivable then - if Cust.Get(Rec."Account No.") then - Cust.CheckBlockedCustOnJnls(Cust, "Gen. Journal Document Type".FromInteger(Rec."Document Type".AsInteger()), false); - RejectDocs(); - end; - } - separator(Action39) - { - } - action(Print) - { - ApplicationArea = Basic, Suite; - Caption = 'Print'; - Ellipsis = true; - Image = Print; - ToolTip = 'Print the document.'; - - trigger OnAction() - begin - PrintDoc(); - end; - } - } - } - area(processing) - { - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - CarteraManagement.NavigateDoc(Rec); - end; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Navigate_Promoted"; "&Navigate") - { - } - } - } - } - - trigger OnAfterGetCurrRecord() - begin - xRec := Rec; - UpdateStatistics(); - end; - - trigger OnInit() - begin - CurrTotalAmountVisible := true; - end; - - trigger OnModifyRecord(): Boolean - begin - CODEUNIT.Run(CODEUNIT::"Document-Edit", Rec); - exit(false); - end; - - trigger OnOpenPage() - begin - CategoryFilter := Rec.GetFilter("Category Code"); - end; - - var - Text1100000: Label 'Payable Bills cannot be printed.'; - Text1100001: Label 'Only Receivable Bills can be rejected.'; - Text1100002: Label 'Only Bills can be rejected.'; - Doc: Record "Cartera Doc."; - CustLedgEntry: Record "Cust. Ledger Entry"; - SalesInvHeader: Record "Sales Invoice Header"; - PurchInvHeader: Record "Purch. Inv. Header"; - CarteraManagement: Codeunit CarteraManagement; - CategoryFilter: Code[250]; - CurrTotalAmountLCY: Decimal; - ShowCurrent: Boolean; - CurrTotalAmountVisible: Boolean; - - procedure UpdateStatistics() - begin - Doc.Copy(Rec); - CarteraManagement.UpdateStatistics(Doc, CurrTotalAmountLCY, ShowCurrent); - CurrTotalAmountVisible := ShowCurrent; - end; - - procedure GetSelected(var NewDoc: Record "Cartera Doc.") - begin - CurrPage.SetSelectionFilter(NewDoc); - end; - - procedure PrintDoc() - begin - CurrPage.SetSelectionFilter(Doc); - if not Doc.Find('-') then - exit; - - if (Doc.Type <> Doc.Type::Receivable) and (Doc."Document Type" = Doc."Document Type"::Bill) then - Error(Text1100000); - - if Doc.Type = Doc.Type::Receivable then begin - if Doc."Document Type" = Doc."Document Type"::Bill then begin - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(Doc."Entry No."); - CustLedgEntry.Mark(true); - until Doc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - CustLedgEntry.PrintBill(true); - end else begin - SalesInvHeader.Reset(); - repeat - SalesInvHeader.Get(Doc."Document No."); - SalesInvHeader.Mark(true); - until Doc.Next() = 0; - - SalesInvHeader.MarkedOnly(true); - SalesInvHeader.PrintRecords(true); - end; - end else begin - PurchInvHeader.Reset(); - repeat - PurchInvHeader.Get(Doc."Document No."); - PurchInvHeader.Mark(true); - until Doc.Next() = 0; - - PurchInvHeader.MarkedOnly(true); - PurchInvHeader.PrintRecords(true); - end; - end; - - - procedure RejectDocs() - begin - if Doc.Type <> Doc.Type::Receivable then - Error(Text1100001); - if Doc."Document Type" <> Rec."Document Type"::Bill then - Error(Text1100002); - - CurrPage.SetSelectionFilter(Doc); - if not Doc.Find('-') then - exit; - - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(Doc."Entry No."); - CustLedgEntry.Mark(true); - until Doc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Reject Docs.", true, false, CustLedgEntry); - end; - - local procedure CategoryFilterOnAfterValidate() - begin - Rec.SetFilter("Category Code", CategoryFilter); - CurrPage.Update(false); - end; -} diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraFactStatisticsFB.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraFactStatisticsFB.Page.al deleted file mode 100644 index 1d2dfc0c5a3..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraFactStatisticsFB.Page.al +++ /dev/null @@ -1,291 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Sales.Customer; -using Microsoft.Sales.Receivables; - -page 35306 "Cartera Fact. Statistics FB" -{ - Caption = 'Cartera Fact. Statistics FB'; - Editable = false; - PageType = CardPart; - SourceTable = Customer; - - layout - { - area(content) - { - group("No. of Invoices") - { - Caption = 'No. of Invoices'; - field("NoOpen[5]"; NoOpen[5]) - { - ApplicationArea = Basic, Suite; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field("NoHonored[5]"; NoHonored[5]) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field("NoRejected[5]"; NoRejected[5]) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - } - group("Remaining Amt. (LCY)") - { - Caption = 'Remaining Amt. (LCY)'; - field("OpenRemainingAmtLCY[5]"; OpenRemainingAmtLCY[5]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - - trigger OnDrillDown() - begin - DrillDownOpen(0, 0); - end; - } - field("HonoredRemainingAmtLCY[5]"; HonoredRemainingAmtLCY[5]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - - trigger OnDrillDown() - begin - DrillDownHonored(0, 0); - end; - } - field("RejectedRemainingAmtLCY[5]"; RejectedRemainingAmtLCY[5]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - - trigger OnDrillDown() - begin - DrillDownRejected(0, 0); - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateDocStatistics(); - end; - - var - DocumentSituationFilter: array[3] of Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; - NoOpen: array[5] of Integer; - NoHonored: array[5] of Integer; - NoRejected: array[5] of Integer; - NoRedrawn: array[5] of Integer; - OpenAmtLCY: array[5] of Decimal; - HonoredAmtLCY: array[5] of Decimal; - RejectedAmtLCY: array[5] of Decimal; - RedrawnAmtLCY: array[5] of Decimal; - OpenRemainingAmtLCY: array[5] of Decimal; - RejectedRemainingAmtLCY: array[5] of Decimal; - HonoredRemainingAmtLCY: array[5] of Decimal; - RedrawnRemainingAmtLCY: array[5] of Decimal; - j: Integer; - - local procedure UpdateDocStatistics() - var - CustLedgEntry: Record "Cust. Ledger Entry"; - begin - DocumentSituationFilter[1] := DocumentSituationFilter::Cartera; - DocumentSituationFilter[2] := DocumentSituationFilter::"BG/PO"; - DocumentSituationFilter[3] := DocumentSituationFilter::"Posted BG/PO"; - - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - for j := 1 to 5 do begin - case j of - 4: - // Closed Bill Group and Closed Documents - begin - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - end; - 5: - // Invoices - begin - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - else begin - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - CustLedgEntry.SetRange("Document Situation", DocumentSituationFilter[j]); - end; - end; - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); - CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - OpenAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; - OpenRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; - NoOpen[j] := CustLedgEntry.Count; - CustLedgEntry.SetRange("Document Status"); - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); - CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - HonoredAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; - HonoredRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; - NoHonored[j] := CustLedgEntry.Count; - CustLedgEntry.SetRange("Document Status"); - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); - CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - RejectedAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; - RejectedRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; - NoRejected[j] := CustLedgEntry.Count; - CustLedgEntry.SetRange("Document Status"); - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Redrawn); - CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - RedrawnAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; - RedrawnRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; - NoRedrawn[j] := CustLedgEntry.Count; - CustLedgEntry.SetRange("Document Status"); - - CustLedgEntry.SetRange("Document Situation"); - end; - end; - - local procedure DrillDownOpen(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) - var - CustLedgEntry: Record "Cust. Ledger Entry"; - CustLedgEntriesForm: Page "Customer Ledger Entries"; - begin - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - case Situation of - Situation::Cartera: - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); - Situation::"Closed BG/PO": - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - else - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - case DocType of - DocType::Invoice: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - DocType::Bill: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - end; - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); - CustLedgEntriesForm.SetTableView(CustLedgEntry); - CustLedgEntriesForm.SetRecord(CustLedgEntry); - CustLedgEntriesForm.RunModal(); - CustLedgEntry.SetRange("Document Status"); - CustLedgEntry.SetRange("Document Situation"); - end; - - local procedure DrillDownHonored(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) - var - CustLedgEntry: Record "Cust. Ledger Entry"; - CustLedgEntriesForm: Page "Customer Ledger Entries"; - begin - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - case Situation of - Situation::Cartera: - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); - Situation::"Closed BG/PO": - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - else - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - case DocType of - DocType::Invoice: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - DocType::Bill: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - end; - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); - CustLedgEntriesForm.SetTableView(CustLedgEntry); - CustLedgEntriesForm.SetRecord(CustLedgEntry); - CustLedgEntriesForm.RunModal(); - CustLedgEntry.SetRange("Document Status"); - CustLedgEntry.SetRange("Document Situation"); - end; - - local procedure DrillDownRejected(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) - var - CustLedgEntry: Record "Cust. Ledger Entry"; - CustLedgEntriesForm: Page "Customer Ledger Entries"; - begin - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - case Situation of - Situation::Cartera: - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); - Situation::"Closed BG/PO": - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - else - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - case DocType of - DocType::Invoice: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - DocType::Bill: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - end; - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); - CustLedgEntriesForm.SetTableView(CustLedgEntry); - CustLedgEntriesForm.SetRecord(CustLedgEntry); - CustLedgEntriesForm.RunModal(); - CustLedgEntry.SetRange("Document Status"); - CustLedgEntry.SetRange("Document Situation"); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraJournal.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraJournal.Page.al deleted file mode 100644 index e23693cd618..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraJournal.Page.al +++ /dev/null @@ -1,625 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.Currency; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Foundation.Reporting; - -page 7000036 "Cartera Journal" -{ - ApplicationArea = Basic, Suite; - AutoSplitKey = true; - Caption = 'Cartera Journal'; - DataCaptionFields = "Journal Batch Name"; - DelayedInsert = true; - PageType = Worksheet; - SaveValues = true; - SourceTable = "Gen. Journal Line"; - UsageCategory = Tasks; - - layout - { - area(content) - { - field(CurrentJnlBatchName; CurrentJnlBatchName) - { - ApplicationArea = Basic, Suite; - Caption = 'Batch Name'; - Lookup = true; - ToolTip = 'Specifies the name of the journal batch.'; - - trigger OnLookup(var Text: Text): Boolean - begin - CurrPage.SaveRecord(); - GenJnlManagement.LookupName(CurrentJnlBatchName, Rec); - CurrPage.Update(false); - end; - - trigger OnValidate() - begin - GenJnlManagement.CheckName(CurrentJnlBatchName, Rec); - CurrentJnlBatchNameOnAfterVali(); - end; - } - repeater(Control1) - { - ShowCaption = false; - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies when the journal line will be posted. '; - } - field("Transaction No."; Rec."Transaction No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the transaction number for the journal line being processed.'; - } - field("Document Date"; Rec."Document Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date when the document represented by the journal line was created.'; - Visible = false; - } - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the document in a posted bill group/payment order, from which this document was generated.'; - } - field("Bill No."; Rec."Bill No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a number for this bill generated from the journal.'; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies how payment for the document must be submitted, such as bank transfer or check.'; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this document in a posted bill group/payment order.'; - } - field("External Document No."; Rec."External Document No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a document number that refers to the customer''s or vendor''s numbering system.'; - Visible = false; - } - field("Account Type"; Rec."Account Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the account type, such as Customer.'; - - trigger OnValidate() - begin - GenJnlManagement.GetAccounts(Rec, AccName, BalAccName); - end; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the account number of the customer/vendor.'; - - trigger OnValidate() - begin - GenJnlManagement.GetAccounts(Rec, AccName, BalAccName); - end; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a description of the record.'; - } - field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code") - { - ApplicationArea = Dimensions; - ToolTip = 'Specifies the code for Shortcut Dimension 1, which is one of two global dimension codes that you set up in the General Ledger Setup window.'; - Visible = false; - } - field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code") - { - ApplicationArea = Dimensions; - ToolTip = 'Specifies the code for Shortcut Dimension 2, which is one of two global dimension codes that you set up in the General Ledger Setup window.'; - Visible = false; - } - field("Business Unit Code"; Rec."Business Unit Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a code for the business unit, in case the company is part of a group.'; - Visible = false; - } - field("Salespers./Purch. Code"; Rec."Salespers./Purch. Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code for the salesperson or purchaser who is linked to the sale or purchase on the journal line.'; - Visible = false; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code of the currency for the amounts on the journal line.'; - Visible = false; - - trigger OnAssistEdit() - begin - ChangeExchangeRate.SetParameter(Rec."Currency Code", Rec."Currency Factor", Rec."Posting Date"); - if ChangeExchangeRate.RunModal() = ACTION::OK then - Rec.Validate("Currency Factor", ChangeExchangeRate.GetParameter()); - - Clear(ChangeExchangeRate); - end; - } - field("Currency Factor"; Rec."Currency Factor") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the relationship between the additional reporting currency and the local currency. Amounts are recorded in both LCY and the additional reporting currency, using the relevant exchange rate and the currency factor.'; - Visible = false; - } - field("Gen. Posting Type"; Rec."Gen. Posting Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the typical posting type for the historical general ledger account.'; - } - field("Gen. Bus. Posting Group"; Rec."Gen. Bus. Posting Group") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the vendor''s or customer''s trade type to link transactions made for this business partner with the appropriate general ledger account according to the general posting setup.'; - } - field("Gen. Prod. Posting Group"; Rec."Gen. Prod. Posting Group") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the item''s product type to link transactions made for this item with the appropriate general ledger account according to the general posting setup.'; - } - field("Debit Amount"; Rec."Debit Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount (including VAT) that the journal line consists of, if it is a debit amount.'; - } - field("Credit Amount"; Rec."Credit Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount (including VAT) that the journal line consists of, if it is a credit amount.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total on the journal line.'; - Visible = false; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount on the journal line in LCY.'; - } - field("Bal. Account Type"; Rec."Bal. Account Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code for the balancing account type that should be used in this journal line.'; - } - field("Bal. Account No."; Rec."Bal. Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the general ledger, customer, vendor, or bank account to which a balancing entry for the journal line will posted.'; - - trigger OnValidate() - begin - GenJnlManagement.GetAccounts(Rec, AccName, BalAccName); - end; - } - field("Bal. Gen. Posting Type"; Rec."Bal. Gen. Posting Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the general posting type that will be used when you post the entry on the journal line.'; - } - field("Bal. Gen. Bus. Posting Group"; Rec."Bal. Gen. Bus. Posting Group") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code of the general business posting group that will be used when you post the entry on the journal line.'; - } - field("Bal. Gen. Prod. Posting Group"; Rec."Bal. Gen. Prod. Posting Group") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code of the general product posting group that will be used when you post the entry on the journal line.'; - } - field("Payment Terms Code"; Rec."Payment Terms Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code that represents the payments terms that apply to the entry on the journal line.'; - Visible = false; - } - field("Applies-to Doc. Type"; Rec."Applies-to Doc. Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of the posted document that this document or journal line will be applied to when you post, for example to register payment.'; - Visible = false; - } - field("Applies-to Doc. No."; Rec."Applies-to Doc. No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the posted document that this document or journal line will be applied to when you post, for example to register payment.'; - } - field("Applies-to Bill No."; Rec."Applies-to Bill No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the bill to be settled.'; - } - field("Applies-to ID"; Rec."Applies-to ID") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the ID of entries that will be applied to when you choose the Apply Entries action.'; - Visible = false; - } - field("On Hold"; Rec."On Hold") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies that the On Hold check box is selected for this transaction in the Vendor Ledger Entries window. The payable document cannot be included in a payment order nor can it be settled until the check box is deselected on the vendor ledger entry.'; - Visible = false; - } - field("Bank Payment Type"; Rec."Bank Payment Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code for the payment type, for the entry on the payment journal line.'; - Visible = false; - } - field("Reason Code"; Rec."Reason Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; - Visible = false; - } - field("Recipient Bank Account"; Rec."Recipient Bank Account") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the bank account that the amount will be transferred to after it has been exported from the journal.'; - Visible = false; - } - field("Direct Debit Mandate ID"; Rec."Direct Debit Mandate ID") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the direct-debit mandate that the customer has signed to allow direct debit collection of payments.'; - } - } - group(Control30) - { - ShowCaption = false; - fixed(Control1901776101) - { - ShowCaption = false; - group("Account Name") - { - Caption = 'Account Name'; - field(AccName; AccName) - { - ApplicationArea = Basic, Suite; - Caption = 'Account Name'; - Editable = false; - ToolTip = 'Specifies the name of the account that has been entered on the journal line.'; - } - } - group("Bal. Account Name") - { - Caption = 'Bal. Account Name'; - field(BalAccName; BalAccName) - { - ApplicationArea = Basic, Suite; - Caption = 'Bal. Account Name'; - Editable = false; - ToolTip = 'Specifies the name of the balancing account that has been entered on the journal line.'; - } - } - group(Control1902759701) - { - Caption = 'Balance'; - field(Balance; Balance + Rec."Balance (LCY)" - xRec."Balance (LCY)") - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Balance'; - Editable = false; - ToolTip = 'Specifies the balance on the journal line.'; - Visible = BalanceVisible; - } - } - group("Total Balance") - { - Caption = 'Total Balance'; - field(TotalBalance; TotalBalance + Rec."Balance (LCY)" - xRec."Balance (LCY)") - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Total Balance'; - Editable = false; - ToolTip = 'Specifies the sum of balances. '; - Visible = TotalBalanceVisible; - } - } - } - } - } - } - - actions - { - area(navigation) - { - group("&Line") - { - Caption = '&Line'; - Image = Line; - action(Dimensions) - { - ApplicationArea = Basic, Suite; - Caption = 'Dimensions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - } - group("A&ccount") - { - Caption = 'A&ccount'; - Image = ChartOfAccounts; - action(Card) - { - ApplicationArea = Basic, Suite; - Caption = 'Card'; - Image = EditLines; - RunObject = Codeunit "Gen. Jnl.-Show Card"; - ShortCutKey = 'Shift+F7'; - ToolTip = 'View or change detailed information about the record that is being processed on the document or journal line.'; - } - action(LedgerEntries) - { - ApplicationArea = Basic, Suite; - Caption = 'Ledger E&ntries'; - RunObject = Codeunit "Gen. Jnl.-Show Entries"; - ShortCutKey = 'Ctrl+F7'; - ToolTip = 'View the history of transactions that have been posted for the selected record.'; - } - } - } - area(processing) - { - action("&Apply Entries") - { - ApplicationArea = Basic, Suite; - Caption = '&Apply Entries'; - Ellipsis = true; - Image = ApplyEntries; - RunObject = Codeunit "Gen. Jnl.-Apply"; - ShortCutKey = 'Shift+F11'; - ToolTip = 'Select one or more ledger entries that you want to apply this record to so that the related posted documents are closed as paid or refunded.'; - } - group("P&osting") - { - Caption = 'P&osting'; - Image = Post; - action(Reconcile) - { - ApplicationArea = Basic, Suite; - Caption = 'Reconcile'; - Image = Reconcile; - ShortCutKey = 'Ctrl+F11'; - ToolTip = 'View the balances on bank accounts that are marked for reconciliation, usually liquid accounts.'; - - trigger OnAction() - begin - GLReconcile.SetGenJnlLine(Rec); - GLReconcile.Run(); - end; - } - action(TestReport) - { - ApplicationArea = Basic, Suite; - Caption = 'Test Report'; - Ellipsis = true; - Image = TestReport; - ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; - - trigger OnAction() - begin - ReportPrint.PrintGenJnlLine(Rec); - end; - } - action(Post) - { - ApplicationArea = Basic, Suite; - Caption = 'P&ost'; - Image = Post; - ShortCutKey = 'F9'; - ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; - - trigger OnAction() - var - OldLinDiaCar: Record "Gen. Journal Line"; - DocPost: Codeunit "Document-Post"; - begin - Clear(OldLinDiaCar); - OldLinDiaCar.Copy(Rec); - PostOk := false; - DocPost.PostLines(OldLinDiaCar, PostOk, false); - Rec := OldLinDiaCar; - CurrentJnlBatchName := Rec.GetRangeMax("Journal Batch Name"); - if PostOk then begin - Rec.DeleteAll(); - ClosingForbidden := false; - Commit(); - end; - Rec.MarkedOnly(false); - CurrPage.Update(false); - end; - } - action(PostandPrint) - { - ApplicationArea = Basic, Suite; - Caption = 'Post and &Print'; - Image = PostPrint; - ShortCutKey = 'Shift+F9'; - ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; - - trigger OnAction() - var - OldLinDiaCar: Record "Gen. Journal Line"; - DocPost: Codeunit "Document-Post"; - begin - Clear(OldLinDiaCar); - OldLinDiaCar.Copy(Rec); - PostOk := false; - DocPost.PostLines(OldLinDiaCar, PostOk, true); - Rec := OldLinDiaCar; - CurrentJnlBatchName := Rec.GetRangeMax("Journal Batch Name"); - if PostOk then begin - Rec.DeleteAll(); - ClosingForbidden := false; - Commit(); - end; - Rec.MarkedOnly(false); - CurrPage.Update(false); - end; - } - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Apply Entries_Promoted"; "&Apply Entries") - { - } - actionref(Post_Promoted; Post) - { - } - actionref(PostandPrint_Promoted; PostandPrint) - { - } - actionref(Reconcile_Promoted; Reconcile) - { - } - actionref(Dimensions_Promoted; Dimensions) - { - } - } - } - } - - trigger OnAfterGetRecord() - begin - AfterGetCurrentRecord(); - end; - - trigger OnInit() - begin - TotalBalanceVisible := true; - BalanceVisible := true; - end; - - trigger OnNewRecord(BelowxRec: Boolean) - begin - UpdateBalance(); - Rec.SetUpNewLine(xRec, Balance, BelowxRec); - AfterGetCurrentRecord(); - end; - - trigger OnOpenPage() - var - JnlSelected: Boolean; - begin - BalAccName := ''; - if PassedCurrentJnlBatchName <> '' then - CurrentJnlBatchName := PassedCurrentJnlBatchName; - OpenedFromBatch := (Rec."Journal Batch Name" <> '') and (Rec."Journal Template Name" = ''); - if OpenedFromBatch then begin - CurrentJnlBatchName := Rec."Journal Batch Name"; - GenJnlManagement.OpenJnl(CurrentJnlBatchName, Rec); - exit; - end; - GenJnlManagement.TemplateSelection(PAGE::"Cartera Journal", "Gen. Journal Template Type"::Cartera, false, Rec, JnlSelected); - if not JnlSelected then - Error(''); - GenJnlManagement.OpenJnl(CurrentJnlBatchName, Rec); - end; - - trigger OnQueryClosePage(CloseAction: Action): Boolean - var - CarteraJnlForm: Page "Cartera Journal"; - begin - if ClosingForbidden then begin - Message(Text1100000Msg); - CarteraJnlForm.SetJnlBatchName(Rec."Journal Batch Name"); - CarteraJnlForm.SetTableView(Rec); - CarteraJnlForm.SetRecord(Rec); - CarteraJnlForm.AllowClosing(true); - CarteraJnlForm.RunModal(); - end; - end; - - var - GenJnlManagement: Codeunit GenJnlManagement; - ReportPrint: Codeunit "Test Report-Print"; - GLReconcile: Page Reconciliation; - ChangeExchangeRate: Page "Change Exchange Rate"; - CurrentJnlBatchName: Code[10]; - PassedCurrentJnlBatchName: Code[10]; - AccName: Text[100]; - BalAccName: Text[100]; - Balance: Decimal; - TotalBalance: Decimal; - ShowBalance: Boolean; - ShowTotalBalance: Boolean; - ClosingForbidden: Boolean; - PostOk: Boolean; - OpenedFromBatch: Boolean; - BalanceVisible: Boolean; - TotalBalanceVisible: Boolean; - Text1100000Msg: Label 'Please, post the journal lines. Otherwise, inconsistencies can appear in your data.'; - - local procedure UpdateBalance() - begin - GenJnlManagement.CalcBalance(Rec, xRec, Balance, TotalBalance, ShowBalance, ShowTotalBalance); - BalanceVisible := ShowBalance; - TotalBalanceVisible := ShowTotalBalance; - end; - - procedure SetJnlBatchName(NewJnlBatchName: Code[10]) - begin - PassedCurrentJnlBatchName := NewJnlBatchName; - end; - - procedure AllowClosing(FromBatch: Boolean) - begin - ClosingForbidden := FromBatch; - end; - - local procedure CurrentJnlBatchNameOnAfterVali() - begin - CurrPage.SaveRecord(); - GenJnlManagement.SetName(CurrentJnlBatchName, Rec); - CurrPage.Update(false); - end; - - local procedure AfterGetCurrentRecord() - begin - xRec := Rec; - GenJnlManagement.GetAccounts(Rec, AccName, BalAccName); - UpdateBalance(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraManagement.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraManagement.Codeunit.al deleted file mode 100644 index b8c9dc20db4..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraManagement.Codeunit.al +++ /dev/null @@ -1,1321 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Bank.Payment; -using Microsoft.EServices.EDocument; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.VAT.Ledger; -using Microsoft.Finance.VAT.Setup; -using Microsoft.Foundation.Navigate; -using Microsoft.Foundation.PaymentTerms; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Purchases.Vendor; -using Microsoft.Sales.Customer; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -codeunit 7000000 CarteraManagement -{ - Permissions = TableData "Cust. Ledger Entry" = m, - TableData "Vendor Ledger Entry" = m, - TableData "VAT Entry" = imd, - TableData "Cartera Doc." = m, - TableData "Posted Cartera Doc." = m, - TableData "Closed Cartera Doc." = m, - TableData "Bill Group" = m; - - trigger OnRun() - begin - end; - - var - Text1100000: Label 'The Bill Group does not exist.'; - Text1100001: Label 'This Bill Group has already been printed. Proceed anyway?'; - Text1100002: Label 'The process has been interrupted to respect the warning.'; - Text1100003: Label 'The Payment Order does not exist.'; - Text1100004: Label 'This Payment Order has already been printed. Proceed anyway?'; - Text1100005: Label 'The update has been interrupted to respect the warning.'; - Text1100006: Label 'Document settlement %1/%2'; - Text1100007: Label 'Bill %1/%2 settl. rev.'; - Text1100008: Label 'Redrawing a settled bill is only possible for bills in posted or closed bill groups.'; - Text1100009: Label 'Redrawing a settled bill is only possible for bills in posted or closed payment orders.'; - VATPostingSetup: Record "VAT Posting Setup"; - VATEntryNo: Integer; - VATUnrealAcc: Code[20]; - VATAcc: Code[20]; - TotalVATAmount: Decimal; - EntryIsAppliedErr: Label 'The document %1/%2 is marked to apply.'; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - ElectPmtMgmt: Codeunit "Elect. Pmts Management"; - - procedure CategorizeDocs(var Doc: Record "Cartera Doc.") - begin - REPORT.RunModal(REPORT::"Categorize Documents", true, false, Doc); - end; - - procedure DecategorizeDocs(var Doc: Record "Cartera Doc.") - begin - Doc.ModifyAll("Category Code", ''); - end; - - [Scope('OnPrem')] - procedure CategorizePostedDocs(var PostedDoc: Record "Posted Cartera Doc.") - begin - REPORT.RunModal(REPORT::"Categorize Posted Documents", true, false, PostedDoc); - end; - - [Scope('OnPrem')] - procedure DecategorizePostedDocs(var PostedDoc: Record "Posted Cartera Doc.") - begin - PostedDoc.ModifyAll("Category Code", ''); - end; - - [Scope('OnPrem')] - procedure UpdateStatistics(var Doc2: Record "Cartera Doc."; var CurrTotalAmount: Decimal; var ShowCurrent: Boolean) - var - Doc: Record "Cartera Doc."; - begin - Doc.Copy(Doc2); - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Collection Agent", "Due Date", "Global Dimension 1 Code", - "Global Dimension 2 Code", "Category Code", "Posting Date", "Document No.", Accepted, "Currency Code", "Document Type"); - ShowCurrent := Doc.CalcSums("Remaining Amt. (LCY)"); - if ShowCurrent then - CurrTotalAmount := Doc."Remaining Amt. (LCY)" - else - CurrTotalAmount := 0; - end; - - procedure NavigateDoc(var CarteraDoc: Record "Cartera Doc.") - var - Navigate: Page Navigate; - VendLedgEntry: Record "Vendor Ledger Entry"; - CustLedgEntry: Record "Cust. Ledger Entry"; - begin - case CarteraDoc.Type of - CarteraDoc.Type::Receivable: - begin - if not CustLedgEntry.Get(CarteraDoc."Entry No.") then - exit; - Navigate.SetDoc(CustLedgEntry."Posting Date", CustLedgEntry."Document No."); - end; - CarteraDoc.Type::Payable: - begin - if not VendLedgEntry.Get(CarteraDoc."Entry No.") then - exit; - Navigate.SetDoc(VendLedgEntry."Posting Date", VendLedgEntry."Document No."); - end; - end; - Navigate.Run(); - end; - - procedure NavigatePostedDoc(var PostedCarteraDoc: Record "Posted Cartera Doc.") - var - Navigate: Page Navigate; - VendLedgEntry: Record "Vendor Ledger Entry"; - CustLedgEntry: Record "Cust. Ledger Entry"; - begin - case PostedCarteraDoc.Type of - PostedCarteraDoc.Type::Receivable: - begin - if not CustLedgEntry.Get(PostedCarteraDoc."Entry No.") then - exit; - Navigate.SetDoc(CustLedgEntry."Posting Date", CustLedgEntry."Document No."); - end; - PostedCarteraDoc.Type::Payable: - begin - if not VendLedgEntry.Get(PostedCarteraDoc."Entry No.") then - exit; - Navigate.SetDoc(VendLedgEntry."Posting Date", VendLedgEntry."Document No."); - end; - end; - Navigate.Run(); - end; - - procedure NavigateClosedDoc(var ClosedCarteraDoc: Record "Closed Cartera Doc.") - var - Navigate: Page Navigate; - VendLedgEntry: Record "Vendor Ledger Entry"; - CustLedgEntry: Record "Cust. Ledger Entry"; - begin - case ClosedCarteraDoc.Type of - ClosedCarteraDoc.Type::Receivable: - begin - if not CustLedgEntry.Get(ClosedCarteraDoc."Entry No.") then - exit; - Navigate.SetDoc(CustLedgEntry."Posting Date", CustLedgEntry."Document No."); - end; - ClosedCarteraDoc.Type::Payable: - begin - if not VendLedgEntry.Get(ClosedCarteraDoc."Entry No.") then - exit; - Navigate.SetDoc(VendLedgEntry."Posting Date", VendLedgEntry."Document No."); - end; - end; - Navigate.Run(); - end; - - procedure InsertReceivableDocs(var CarteraDoc2: Record "Cartera Doc.") - var - CarteraDoc: Record "Cartera Doc."; - CarteraDocToProcess: Record "Cartera Doc."; - BankAcc: Record "Bank Account"; - BillGr: Record "Bill Group"; - CarteraSetup: Record "Cartera Setup"; - Cust: Record Customer; - CustLedgEntry: Record "Cust. Ledger Entry"; - CarteraDocuments: Page "Cartera Documents"; - CheckDiscCreditLimit: Page "Check Discount Credit Limit"; - SelectedEntryNos: List of [Integer]; - EntryNo: Integer; - SelectedAmount: Decimal; - GroupNo: Code[20]; - CustLedgEntryFound: Boolean; - begin - CarteraDoc2.FilterGroup(2); - CarteraDoc2.SetRange("Bill Gr./Pmt. Order No."); - CarteraDoc2.FilterGroup(0); - GroupNo := CarteraDoc2.GetRangeMin("Bill Gr./Pmt. Order No."); - if not BillGr.Get(GroupNo) then - Error(Text1100000); - - if BillGr."No. Printed" <> 0 then - if not Confirm(Text1100001, false) then - exit; - - CarteraDoc.Reset(); - CarteraDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted); - CarteraDoc.FilterGroup(2); - CarteraDoc.SetRange(Type, CarteraDoc.Type::Receivable); - CarteraDoc.FilterGroup(0); - CarteraDoc.SetRange("Bill Gr./Pmt. Order No.", ''); - CarteraDoc.SetRange("Currency Code", BillGr."Currency Code"); - CarteraDoc.SetFilter(Accepted, '<>%1', CarteraDoc.Accepted::No); - CarteraDoc.SetRange("Collection Agent", CarteraDoc."Collection Agent"::Bank); - if BillGr.Factoring <> BillGr.Factoring::" " then - CarteraDoc.SetFilter("Document Type", '<>%1', CarteraDoc."Document Type"::Bill) - else - CarteraDoc.SetRange("Document Type", CarteraDoc."Document Type"::Bill); - OnInsertReceivableDocsOnAfterSetFilters(CarteraDoc, BillGr); - CarteraDocuments.SetTableView(CarteraDoc); - CarteraDocuments.LookupMode(true); - if CarteraDocuments.RunModal() <> ACTION::LookupOK then - exit; - CarteraDocuments.GetSelected(CarteraDoc); - Clear(CarteraDocuments); - if not CarteraDoc.Find('-') then - exit; - - if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and - BankAcc.Get(BillGr."Bank Account No.") and - (BillGr.Factoring = BillGr.Factoring::" ") - then begin - CarteraSetup.Get(); - if CarteraSetup."Bills Discount Limit Warnings" then begin - SelectedAmount := 0; - repeat - SelectedAmount := SelectedAmount + CarteraDoc."Remaining Amt. (LCY)"; - until CarteraDoc.Next() = 0; - BillGr.CalcFields(Amount); - BankAcc.CalcFields("Posted Receiv. Bills Rmg. Amt."); - if BillGr.Amount + SelectedAmount + BankAcc."Posted Receiv. Bills Rmg. Amt." > BankAcc."Credit Limit for Discount" - then begin - CheckDiscCreditLimit.SetRecord(BankAcc); - CheckDiscCreditLimit.SetValues(BillGr.Amount, SelectedAmount); - if CheckDiscCreditLimit.RunModal() <> ACTION::Yes then - Error(Text1100002); - Clear(CheckDiscCreditLimit); - end; - end; - end; - if not SnapshotSelectedEntryNos(CarteraDoc, CarteraDoc.Type::Receivable, SelectedEntryNos) then - exit; - - CustLedgEntry.SetLoadFields("Applies-to ID", "Document Situation", "Direct Debit Mandate ID"); - foreach EntryNo in SelectedEntryNos do begin - CarteraDocToProcess.Get(CarteraDocToProcess.Type::Receivable, EntryNo); - CustLedgEntryFound := CustLedgEntry.Get(EntryNo); - if CustLedgEntryFound then - if CustLedgEntry."Applies-to ID" <> '' then - Error(EntryIsAppliedErr, CarteraDocToProcess."Document No.", CarteraDocToProcess."No."); - - CarteraDocToProcess.TestField("Bill Gr./Pmt. Order No.", ''); - CarteraDocToProcess.TestField("Currency Code", BillGr."Currency Code"); - if Cust."No." <> CarteraDocToProcess."Account No." then - Cust.Get(CarteraDocToProcess."Account No."); - Cust.CheckBlockedCustOnJnls(Cust, GetDocType(CarteraDocToProcess."Document Type"), false); - if CarteraDocToProcess.Accepted = CarteraDocToProcess.Accepted::No then - CarteraDocToProcess.FieldError(Accepted); - CarteraDocToProcess.TestField("Collection Agent", CarteraDocToProcess."Collection Agent"::Bank); - CarteraDocToProcess."Bill Gr./Pmt. Order No." := GroupNo; - CarteraDocToProcess.Modify(); - if CustLedgEntryFound then begin - CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::"BG/PO"; - CustLedgEntry.Modify(); - CarteraDocToProcess."Direct Debit Mandate ID" := CustLedgEntry."Direct Debit Mandate ID"; - end; - OnAfterInsertReceivableDocs(CarteraDocToProcess, BillGr); - end; - - BillGr."No. Printed" := 0; - BillGr.Modify(); - end; - - procedure InsertPayableDocs(var CarteraDoc2: Record "Cartera Doc.") - var - CarteraDoc: Record "Cartera Doc."; - PmtOrd: Record "Payment Order"; - CarteraSetup: Record "Cartera Setup"; - Vendor: Record Vendor; - CarteraDocuments: Page "Cartera Documents"; - GroupNo: Code[20]; - begin - CarteraDoc2.FilterGroup(2); - CarteraDoc2.SetRange("Bill Gr./Pmt. Order No."); - CarteraDoc2.FilterGroup(0); - GroupNo := CarteraDoc2.GetRangeMin("Bill Gr./Pmt. Order No."); - if not PmtOrd.Get(GroupNo) then - Error(Text1100003); - - if PmtOrd."No. Printed" <> 0 then - if not Confirm(Text1100004, false) then - exit; - - CarteraSetup.Get(); - CarteraDoc.Reset(); - CarteraDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted); - CarteraDoc.FilterGroup(2); - CarteraDoc.SetRange(Type, CarteraDoc.Type::Payable); - CarteraDoc.FilterGroup(0); - CarteraDoc.SetRange("Bill Gr./Pmt. Order No.", ''); - CarteraDoc.SetRange("Currency Code", PmtOrd."Currency Code"); - CarteraDoc.SetFilter(Accepted, '<>%1', CarteraDoc.Accepted::No); - CarteraDoc.SetRange("Collection Agent", CarteraDoc."Collection Agent"::Bank); - CarteraDoc.SetRange("On Hold", false); - if CarteraDoc.FindSet() then - repeat - Vendor.SetLoadFields(Blocked); - if Vendor.Get(CarteraDoc."Account No.") then - if Vendor.Blocked = Vendor.Blocked::" " then - if not (PmtOrd."Export Electronic Payment") then - CarteraDoc.Mark(true) - else - if (CheckUseForElectronicPayments(Vendor."No.")) then - CarteraDoc.Mark(true); - until CarteraDoc.Next() = 0; - CarteraDoc.MarkedOnly(true); - OnInsertPayableDocsOnAfterSetFilters(CarteraDoc, CarteraDoc2); - CarteraDocuments.SetTableView(CarteraDoc); - CarteraDoc.MarkedOnly(false); - CarteraDocuments.LookupMode(true); - if CarteraDocuments.RunModal() <> ACTION::LookupOK then - exit; - CarteraDocuments.GetSelected(CarteraDoc); - Clear(CarteraDocuments); - if not CarteraDoc.Find('-') then - exit; - - ApplySelectedPayableDocsToPaymentOrder(CarteraDoc, PmtOrd, GroupNo); - end; - - /// - /// Applies the user-selected payable cartera documents to the given payment order. - /// Iterates the selection via a snapshot of "Entry No." values to avoid the marked-cursor - /// drop that occurs when Modify is called inside a loop over a page-supplied recordset. - /// - /// The cartera documents selected on the source page (filtered/marked recordset). - /// The target payment order to which the selected documents are assigned. - /// The payment order number assigned to each selected document. - internal procedure ApplySelectedPayableDocsToPaymentOrder(var CarteraDoc: Record "Cartera Doc."; var PmtOrd: Record "Payment Order"; GroupNo: Code[20]) - var - CarteraDocToProcess: Record "Cartera Doc."; - VendLedgEntry: Record "Vendor Ledger Entry"; - GenJournalLine: Record "Gen. Journal Line"; - Vendor: Record Vendor; - SelectedEntryNos: List of [Integer]; - EntryNo: Integer; - VendLedgEntryFound: Boolean; - begin - if not SnapshotSelectedEntryNos(CarteraDoc, CarteraDoc.Type::Payable, SelectedEntryNos) then - exit; - - VendLedgEntry.SetLoadFields("Applies-to ID", "Document No.", "Vendor No.", "Document Situation"); - foreach EntryNo in SelectedEntryNos do begin - CarteraDocToProcess.Get(CarteraDocToProcess.Type::Payable, EntryNo); - VendLedgEntryFound := VendLedgEntry.Get(EntryNo); - if VendLedgEntryFound then begin - if VendLedgEntry."Applies-to ID" <> '' then - Error(EntryIsAppliedErr, CarteraDocToProcess."Document No.", CarteraDocToProcess."No."); - GenJournalLine.Reset(); - GenJournalLine.SetRange("Applies-to Doc. No.", VendLedgEntry."Document No."); - GenJournalLine.SetRange("Account Type", GenJournalLine."Account Type"::Vendor); - GenJournalLine.SetRange("Account No.", VendLedgEntry."Vendor No."); - if not GenJournalLine.IsEmpty() then - Error(EntryIsAppliedErr, CarteraDocToProcess."Document No.", CarteraDocToProcess."No."); - end; - - CarteraDocToProcess.TestField("Bill Gr./Pmt. Order No.", ''); - CarteraDocToProcess.TestField("Currency Code", PmtOrd."Currency Code"); - if Vendor."No." <> CarteraDocToProcess."Account No." then - Vendor.Get(CarteraDocToProcess."Account No."); - - if PmtOrd."Export Electronic Payment" then - ElectPmtMgmt.GetTransferType(CarteraDocToProcess."Account No.", CarteraDocToProcess."Remaining Amount", CarteraDocToProcess."Transfer Type", false); - - Vendor.CheckBlockedVendOnJnls(Vendor, GetDocType(CarteraDocToProcess."Document Type"), false); - if CarteraDocToProcess.Accepted = CarteraDocToProcess.Accepted::No then - CarteraDocToProcess.FieldError(Accepted); - CarteraDocToProcess.TestField("Collection Agent", CarteraDocToProcess."Collection Agent"::Bank); - CarteraDocToProcess."Bill Gr./Pmt. Order No." := GroupNo; - CarteraDocToProcess.Modify(true); - if VendLedgEntryFound then begin - VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::"BG/PO"; - VendLedgEntry.Modify(); - end; - OnAfterInsertPayableDocs(CarteraDocToProcess, PmtOrd); - end; - - PmtOrd."No. Printed" := 0; - PmtOrd.Modify(); - end; - - /// - /// Snapshots the selected entry numbers from a page-supplied Cartera Doc. recordset - /// into a list, so callers can iterate independently of the page-supplied cursor and - /// avoid the marked-cursor drop that occurs when Modify is called on that recordset. - /// - /// The page-supplied selection to snapshot. - /// The Cartera Doc. Type the caller will process; rows of other types are skipped. - /// Output: list of selected entry numbers of the expected Type. - /// True when the resulting list is non-empty; false otherwise. - local procedure SnapshotSelectedEntryNos(var SourceCarteraDoc: Record "Cartera Doc."; ExpectedType: Enum "Cartera Document Type"; var SelectedEntryNos: List of [Integer]): Boolean - var - CarteraDocSnapshot: Record "Cartera Doc."; - begin - CarteraDocSnapshot.Copy(SourceCarteraDoc); - CarteraDocSnapshot.SetLoadFields("Entry No."); - if not CarteraDocSnapshot.FindSet() then - exit(false); - repeat - if CarteraDocSnapshot.Type = ExpectedType then - SelectedEntryNos.Add(CarteraDocSnapshot."Entry No."); - until CarteraDocSnapshot.Next() = 0; - exit(SelectedEntryNos.Count() > 0); - end; - - procedure RemoveReceivableDocs(var CarteraDoc2: Record "Cartera Doc.") - var - BillGr: Record "Bill Group"; - CustLedgEntry: Record "Cust. Ledger Entry"; - begin - if CarteraDoc2.Find('-') then begin - BillGr.Get(CarteraDoc2."Bill Gr./Pmt. Order No."); - if not CheckConfirmBillGroupAlreadyPrinted(BillGr) then - exit; - BillGr."No. Printed" := 0; - repeat - RemoveReceivableError(CarteraDoc2); - CarteraDoc2."Bill Gr./Pmt. Order No." := ''; - CarteraDoc2.Modify(); - if CustLedgEntry.Get(CarteraDoc2."Entry No.") then begin - CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera; - CustLedgEntry.Modify(); - end; - OnAfterRemoveReceivableDocs(CarteraDoc2, BillGr); - until CarteraDoc2.Next() = 0; - BillGr.Modify(); - end; - end; - - local procedure CheckConfirmBillGroupAlreadyPrinted(BillGr: Record "Bill Group") Result: Boolean - var - IsHandled: Boolean; - begin - IsHandled := false; - OnBeforeCheckConfirmBillGroupAlreadyPrinted(BillGr, Result, IsHandled); - if IsHandled then - exit(Result); - - if BillGr."No. Printed" <> 0 then - if not Confirm(Text1100001, false) then - exit(false); - - exit(true); - end; - - procedure RemovePayableDocs(var CarteraDoc2: Record "Cartera Doc.") - var - PaymentOrder: Record "Payment Order"; - VendLedgEntry: Record "Vendor Ledger Entry"; - begin - if CarteraDoc2.Find('-') then begin - PaymentOrder.Get(CarteraDoc2."Bill Gr./Pmt. Order No."); - if not CheckConfirmPaymentOrderAlreadyPrinted(PaymentOrder) then - exit; - PaymentOrder."No. Printed" := 0; - repeat - RemovePayableError(CarteraDoc2); - CarteraDoc2."Bill Gr./Pmt. Order No." := ''; - CarteraDoc2.Modify(); - if VendLedgEntry.Get(CarteraDoc2."Entry No.") then begin - VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera; - VendLedgEntry.Modify(); - end; - OnAfterRemovePayableDocs(CarteraDoc2, PaymentOrder); - until CarteraDoc2.Next() = 0; - PaymentOrder.Modify(); - end; - end; - - local procedure CheckConfirmPaymentOrderAlreadyPrinted(PaymentOrder: Record "Payment Order") Result: Boolean - var - IsHandled: Boolean; - begin - IsHandled := false; - OnBeforeCheckConfirmPaymentOrderAlreadyPrinted(PaymentOrder, Result, IsHandled); - if IsHandled then - exit(Result); - - if PaymentOrder."No. Printed" <> 0 then - if not Confirm(Text1100004, false) then - exit(false); - - exit(true); - end; - - procedure CheckDiscCreditLimit(var BillGr: Record "Bill Group") - var - CarteraSetup: Record "Cartera Setup"; - BankAcc: Record "Bank Account"; - CheckDiscCreditLimit: Page "Check Discount Credit Limit"; - begin - CarteraSetup.Get(); - if not CarteraSetup."Bills Discount Limit Warnings" then - exit; - if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and BankAcc.Get(BillGr."Bank Account No.") then begin - BankAcc.CalcFields("Posted Receiv. Bills Rmg. Amt."); - BillGr.CalcFields(Amount); - if BillGr.Amount + BankAcc."Posted Receiv. Bills Rmg. Amt." > BankAcc."Credit Limit for Discount" then begin - CheckDiscCreditLimit.SetRecord(BankAcc); - CheckDiscCreditLimit.SetValues(BillGr.Amount, 0); - if CheckDiscCreditLimit.RunModal() <> ACTION::Yes then - Error(Text1100005); - Clear(CheckDiscCreditLimit); - end; - end; - end; - - procedure CreateReceivableDocPayment(var GenJnlLine2: Record "Gen. Journal Line"; var CustLedgEntry: Record "Cust. Ledger Entry") - var - PostedDoc: Record "Posted Cartera Doc."; - begin - GenJnlLine2."Account Type" := GenJnlLine2."Account Type"::Customer; - GenJnlLine2.Validate("Account No.", CustLedgEntry."Customer No."); - GenJnlLine2."Document Type" := GenJnlLine2."Document Type"::" "; - GenJnlLine2."Document No." := CustLedgEntry."Document No."; - GenJnlLine2."Bill No." := CustLedgEntry."Bill No."; - GenJnlLine2.Description := StrSubstNo( - Text1100006, - CustLedgEntry."Document No.", - CustLedgEntry."Bill No."); - GenJnlLine2.Validate("Currency Code", CustLedgEntry."Currency Code"); - CustLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - case CustLedgEntry."Document Situation" of - CustLedgEntry."Document Situation"::"Posted BG/PO": - begin - PostedDoc.Get(PostedDoc.Type::Receivable, CustLedgEntry."Entry No."); - GenJnlLine2.Validate(Amount, -PostedDoc."Remaining Amount"); - end; - CustLedgEntry."Document Situation"::"Closed BG/PO", CustLedgEntry."Document Situation"::"Closed Documents": - GenJnlLine2.Validate(Amount, -CustLedgEntry."Remaining Amount"); - end; - GenJnlLine2."Dimension Set ID" := GetCombinedDimSetID(GenJnlLine2, CustLedgEntry."Dimension Set ID"); - GenJnlLine2."System-Created Entry" := true; - GenJnlLine2."Applies-to Doc. Type" := GenJnlLine2."Document Type"::Bill; - GenJnlLine2."Applies-to Doc. No." := CustLedgEntry."Document No."; - GenJnlLine2."Applies-to Bill No." := CustLedgEntry."Bill No."; - - OnAfterCreateReceivableDocPayment(GenJnlLine2, CustLedgEntry); - end; - - [Scope('OnPrem')] - procedure ReverseReceivableDocPayment(var GenJnlLine2: Record "Gen. Journal Line"; var CustLedgEntry: Record "Cust. Ledger Entry") - var - PostedDoc: Record "Posted Cartera Doc."; - ClosedDoc: Record "Closed Cartera Doc."; - PostedBillGr: Record "Posted Bill Group"; - ClosedBillGr: Record "Closed Bill Group"; - begin - GenJnlLine2."Account Type" := GenJnlLine2."Account Type"::"Bank Account"; - GenJnlLine2."Document No." := CustLedgEntry."Document No."; - GenJnlLine2."Bill No." := CustLedgEntry."Bill No."; - GenJnlLine2.Description := StrSubstNo( - Text1100007, - CustLedgEntry."Document No.", - CustLedgEntry."Bill No."); - GenJnlLine2.Validate("Currency Code", CustLedgEntry."Currency Code"); - GenJnlLine2."System-Created Entry" := true; - if PostedDoc.Get(PostedDoc.Type::Receivable, CustLedgEntry."Entry No.") then begin - PostedBillGr.Get(PostedDoc."Bill Gr./Pmt. Order No."); - GenJnlLine2.Validate("Account No.", PostedBillGr."Bank Account No."); - GenJnlLine2.Validate(Amount, -PostedDoc."Amount for Collection"); - PostedDoc.TestField(Redrawn, false); - PostedDoc.Redrawn := true; - PostedDoc.Modify(); - end else - if ClosedDoc.Get(ClosedDoc.Type::Receivable, CustLedgEntry."Entry No.") then begin - if ClosedDoc."Bill Gr./Pmt. Order No." = '' then - Error(Text1100008); - ClosedBillGr.Get(ClosedDoc."Bill Gr./Pmt. Order No."); - GenJnlLine2.Validate("Account No.", ClosedBillGr."Bank Account No."); - GenJnlLine2.Validate(Amount, -ClosedDoc."Amount for Collection"); - ClosedDoc.TestField(Redrawn, false); - ClosedDoc.Redrawn := true; - ClosedDoc.Modify(); - end; - GenJnlLine2."Dimension Set ID" := GetCombinedDimSetID(GenJnlLine2, CustLedgEntry."Dimension Set ID"); - - OnAfterReverseReceivableDocPayment(GenJnlLine2, CustLedgEntry); - end; - - [Scope('OnPrem')] - procedure CreatePayableDocPayment(var GenJnlLine2: Record "Gen. Journal Line"; var VendLedgEntry: Record "Vendor Ledger Entry") - var - PostedDoc: Record "Posted Cartera Doc."; - begin - GenJnlLine2."Account Type" := GenJnlLine2."Account Type"::Vendor; - GenJnlLine2.Validate("Account No.", VendLedgEntry."Vendor No."); - GenJnlLine2."Document Type" := GenJnlLine2."Document Type"::" "; - GenJnlLine2."Document No." := VendLedgEntry."Document No."; - GenJnlLine2."Bill No." := VendLedgEntry."Bill No."; - GenJnlLine2.Description := StrSubstNo( - Text1100006, - VendLedgEntry."Document No.", - VendLedgEntry."Bill No."); - GenJnlLine2.Validate("Currency Code", VendLedgEntry."Currency Code"); - case VendLedgEntry."Document Situation" of - VendLedgEntry."Document Situation"::"Posted BG/PO": - begin - PostedDoc.Get(PostedDoc.Type::Payable, VendLedgEntry."Entry No."); - GenJnlLine2.Validate(Amount, -PostedDoc."Remaining Amount"); - end; - VendLedgEntry."Document Situation"::"Closed BG/PO": - GenJnlLine2.Validate(Amount, -VendLedgEntry."Remaining Amount"); - end; - GenJnlLine2."Dimension Set ID" := GetCombinedDimSetID(GenJnlLine2, VendLedgEntry."Dimension Set ID"); - GenJnlLine2."System-Created Entry" := true; - GenJnlLine2."Applies-to Doc. Type" := GenJnlLine2."Document Type"::Bill; - GenJnlLine2."Applies-to Doc. No." := VendLedgEntry."Document No."; - GenJnlLine2."Applies-to Bill No." := VendLedgEntry."Bill No."; - - OnAfterCreatePayableDocPayment(GenJnlLine2, VendLedgEntry); - end; - - [Scope('OnPrem')] - procedure ReversePayableDocPayment(var GenJnlLine2: Record "Gen. Journal Line"; var VendLedgEntry: Record "Vendor Ledger Entry") - var - PostedDoc: Record "Posted Cartera Doc."; - ClosedDoc: Record "Closed Cartera Doc."; - PostedPmtOrd: Record "Posted Payment Order"; - ClosedPmtOrd: Record "Closed Payment Order"; - begin - GenJnlLine2."Account Type" := GenJnlLine2."Account Type"::"Bank Account"; - GenJnlLine2."Document No." := VendLedgEntry."Document No."; - GenJnlLine2."Bill No." := VendLedgEntry."Bill No."; - GenJnlLine2.Description := StrSubstNo( - Text1100007, - VendLedgEntry."Document No.", - VendLedgEntry."Bill No."); - GenJnlLine2.Validate("Currency Code", VendLedgEntry."Currency Code"); - GenJnlLine2."System-Created Entry" := true; - if PostedDoc.Get(PostedDoc.Type::Payable, VendLedgEntry."Entry No.") then begin - PostedPmtOrd.Get(PostedDoc."Bill Gr./Pmt. Order No."); - GenJnlLine2.Validate("Account No.", PostedPmtOrd."Bank Account No."); - GenJnlLine2.Validate(Amount, PostedDoc."Amount for Collection"); - PostedDoc.TestField(Redrawn, false); - PostedDoc.Redrawn := true; - PostedDoc.Modify(); - end else - if ClosedDoc.Get(ClosedDoc.Type::Payable, VendLedgEntry."Entry No.") then begin - if ClosedDoc."Bill Gr./Pmt. Order No." = '' then - Error(Text1100009); - ClosedPmtOrd.Get(ClosedDoc."Bill Gr./Pmt. Order No."); - GenJnlLine2.Validate("Account No.", ClosedPmtOrd."Bank Account No."); - GenJnlLine2.Validate(Amount, ClosedDoc."Amount for Collection"); - ClosedDoc.TestField(Redrawn, false); - ClosedDoc.Redrawn := true; - ClosedDoc.Modify(); - end; - GenJnlLine2."Dimension Set ID" := GetCombinedDimSetID(GenJnlLine2, VendLedgEntry."Dimension Set ID"); - - OnAfterReversePayableDocPayment(GenJnlLine2, VendLedgEntry); - end; - - procedure CustUnrealizedVAT2(CustLedgEntry2: Record "Cust. Ledger Entry"; AmountLCY: Decimal; GenJnlLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntry: Integer; var LastVATEntry: Integer; var NoRealVATBuffer: Record "BG/PO Post. Buffer"; IsFromJournal: Boolean; PostedDocumentNo: Code[20]) - var - CustLedgEntry3: Record "Cust. Ledger Entry"; - begin - if GenJnlPostLine.CustFindVATSetup(VATPostingSetup, CustLedgEntry2, IsFromJournal) then begin - CustLedgEntry3.SetCurrentKey("Document No.", "Document Type", "Customer No."); - CustLedgEntry3.SetRange("Document Type", CustLedgEntry3."Document Type"::Invoice); - CustLedgEntry3.SetRange("Document No.", CustLedgEntry2."Document No."); - - if CustLedgEntry3.FindFirst() then begin - CustLedgEntry3.Open := true; - CustUnrealizedVAT( - CustLedgEntry3, -AmountLCY, GenJnlLine, ExistVATEntry, FirstVATEntry, LastVATEntry, NoRealVATBuffer, PostedDocumentNo); - end; - end else - exit; - end; - - local procedure CustUnrealizedVAT(var CustLedgEntry2: Record "Cust. Ledger Entry"; SettledAmount: Decimal; GenJnlLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var NoRealVATBuffer: Record "BG/PO Post. Buffer"; PostedDocumentNo: Code[20]) - var - VATEntry: Record "VAT Entry"; - VATEntry2: Record "VAT Entry"; - VATEntry3: Record "VAT Entry"; - VATEntryLast: Record "VAT Entry"; - PaymentTerms: Record "Payment Terms"; - SalesInvHeader: Record "Sales Invoice Header"; - VATPart: Decimal; - VATAmount: Decimal; - VATBase: Decimal; - VATAmountAddCurr: Decimal; - VATBaseAddCurr: Decimal; - CurrencyFactor: Decimal; - SalesVATAccount: Code[20]; - SalesVATUnrealAccount: Code[20]; - LastConnectionNo: Integer; - Test1: Boolean; - Test2: Boolean; - IsLastEntry: Boolean; - PaymentTermsCode: Code[20]; - begin - OnBeforeCustUnrealizedVAT( - CustLedgEntry2, SettledAmount, GenJnlLine, ExistVATEntry, FirstVATEntryNo, LastVATEntryNo, - NoRealVATBuffer, PostedDocumentNo, PaymentTermsCode, VATPostingSetup); - - if PostedDocumentNo <> '' then begin - SalesInvHeader.Get(PostedDocumentNo); - PaymentTermsCode := SalesInvHeader."Payment Terms Code"; - end; - - CustLedgEntry2.CalcFields( - Amount, - "Amount (LCY)", - "Remaining Amount", - "Remaining Amt. (LCY)", - "Original Amt. (LCY)"); - CurrencyFactor := CustLedgEntry2.Amount / CustLedgEntry2."Amount (LCY)"; - VATEntry2.Reset(); - VATEntry2.SetCurrentKey("Transaction No."); - VATEntry2.SetRange("Transaction No.", CustLedgEntry2."Transaction No."); - - VATEntryLast.Copy(VATEntry2); - if VATEntryLast.FindLast() then; - - if VATEntry2.Find('-') then begin - LastConnectionNo := 0; - repeat - if LastConnectionNo <> VATEntry2."Sales Tax Connection No." then - LastConnectionNo := VATEntry2."Sales Tax Connection No."; - - VATEntry3.Reset(); - if VATEntry3.FindLast() then - VATEntryNo := VATEntry3."Entry No." + 1; - - if (VATEntry2.Type <> VATEntry2.Type::" ") and - (VATEntry2.Amount = 0) and - (VATEntry2.Base = 0) - then begin - case VATEntry2."VAT Calculation Type" of - VATEntry2."VAT Calculation Type"::"Normal VAT", - VATEntry2."VAT Calculation Type"::"Reverse Charge VAT", - VATEntry2."VAT Calculation Type"::"Full VAT": - VATPostingSetup.Get( - VATEntry2."VAT Bus. Posting Group", VATEntry2."VAT Prod. Posting Group"); - end; - if (VATPostingSetup."Unrealized VAT Type" > 0) and - ((VATEntry2."Remaining Unrealized Amount" <> 0) or - (VATEntry2."Remaining Unrealized Base" <> 0)) - then begin - if not CustLedgEntry2.Open then - VATPart := 1 - else - if CustLedgEntry2."Currency Code" = '' then - VATPart := -SettledAmount / CustLedgEntry2."Original Amt. (LCY)" - else - VATPart := - -SettledAmount * - (CustLedgEntry2."Original Amt. (LCY)" / CustLedgEntry2.Amount) / CustLedgEntry2."Original Amt. (LCY)"; - OnCustUnrealizedVATOnAfterVATPartCalculated(CustLedgEntry2, VATEntry2, VATPostingSetup, SettledAmount, VATPart); - end; - if VATPart <> 0 then begin - case VATEntry2."VAT Calculation Type" of - VATEntry2."VAT Calculation Type"::"Normal VAT", - VATEntry2."VAT Calculation Type"::"Reverse Charge VAT", - VATEntry2."VAT Calculation Type"::"Full VAT": - begin - VATPostingSetup.TestField("Sales VAT Account"); - VATPostingSetup.TestField("Sales VAT Unreal. Account"); - SalesVATAccount := VATPostingSetup."Sales VAT Account"; - SalesVATUnrealAccount := VATPostingSetup."Sales VAT Unreal. Account"; - end; - end; - PaymentTerms.Get(PaymentTermsCode); - if PaymentTerms."VAT distribution" = PaymentTerms."VAT distribution"::"First Installment" then - VATPart := 1; - - if VATPart = 1 then begin - VATAmount := VATEntry2."Remaining Unrealized Amount"; - VATBase := VATEntry2."Remaining Unrealized Base"; - VATAmountAddCurr := VATEntry2."Add.-Curr. Rem. Unreal. Amount"; - VATBaseAddCurr := VATEntry2."Add.-Curr. Rem. Unreal. Base"; - end else begin - VATAmount := Round(VATEntry2."Unrealized Amount" * VATPart); - VATBase := Round(VATEntry2."Unrealized Base" * VATPart); - end; - - VATUnrealAcc := SalesVATUnrealAccount; - VATAcc := SalesVATAccount; - if CustLedgEntry2."Currency Code" = '' then - TotalVATAmount := VATAmount - else - TotalVATAmount := VATAmount * CurrencyFactor; - - if NoRealVATBuffer.Get(SalesVATUnrealAccount, SalesVATAccount, VATEntry2."Entry No.") then - NoRealVATBuffer.Amount := NoRealVATBuffer.Amount + TotalVATAmount - else begin - NoRealVATBuffer.Init(); - NoRealVATBuffer.Account := SalesVATUnrealAccount; - NoRealVATBuffer."Balance Account" := SalesVATAccount; - NoRealVATBuffer.Amount := TotalVATAmount; - NoRealVATBuffer."Entry No." := VATEntry2."Entry No."; - NoRealVATBuffer.Insert(); - end; - - VATEntry := VATEntry2; - VATEntry."Entry No." := VATEntryNo; - VATEntry."Posting Date" := GenJnlLine."Posting Date"; - VATEntry.SetVATDateFromGenJnlLine(GenJnlLine); - VATEntry."Document No." := GenJnlLine."Document No."; - VATEntry."External Document No." := GenJnlLine."External Document No."; - VATEntry."Document Type" := GenJnlLine."Document Type"; - VATEntry.Amount := VATAmount; - VATEntry.Base := VATBase; - VATEntry."Unrealized Amount" := 0; - VATEntry."Unrealized Base" := 0; - VATEntry."Remaining Unrealized Amount" := 0; - VATEntry."Remaining Unrealized Base" := 0; - VATEntry."Additional-Currency Amount" := VATAmountAddCurr; - VATEntry."Additional-Currency Base" := VATBaseAddCurr; - VATEntry."Add.-Currency Unrealized Amt." := 0; - VATEntry."Add.-Currency Unrealized Base" := 0; - VATEntry."Add.-Curr. Rem. Unreal. Amount" := 0; - VATEntry."Add.-Curr. Rem. Unreal. Base" := 0; - VATEntry."User ID" := UserId; - VATEntry."Source Code" := GenJnlLine."Source Code"; - VATEntry."Reason Code" := GenJnlLine."Reason Code"; - VATEntry."Closed by Entry No." := 0; - VATEntry.Closed := false; - VATEntry."Transaction No." := CustLedgEntry2."Transaction No."; - VATEntry."Unrealized VAT Entry No." := VATEntry2."Entry No."; - VATEntry.UpdateRates(VATPostingSetup); - Test1 := VATEntry.Insert(); - - VATEntry2."Remaining Unrealized Amount" := - VATEntry2."Remaining Unrealized Amount" - VATEntry.Amount; - VATEntry2."Remaining Unrealized Base" := - VATEntry2."Remaining Unrealized Base" - VATEntry.Base; - VATEntry2."Add.-Curr. Rem. Unreal. Amount" := - VATEntry2."Add.-Curr. Rem. Unreal. Amount" - VATEntry."Additional-Currency Amount"; - VATEntry2."Add.-Curr. Rem. Unreal. Base" := - VATEntry2."Add.-Curr. Rem. Unreal. Base" - VATEntry."Additional-Currency Base"; - OnCustUnrealizedVATOnBeforeVATEntryModify(VATEntry, CustLedgEntry2, GenJnlLine); - Test2 := VATEntry2.Modify(); - LastVATEntryNo := VATEntryNo; - end; - end; - - if not ExistVATEntry then - FirstVATEntryNo := LastVATEntryNo; - ExistVATEntry := Test1 and Test2; - - IsLastEntry := VATEntryLast."Entry No." = VATEntry2."Entry No."; - - until (VATEntry2.Next() = 0) or IsLastEntry; - end; - end; - - procedure VendUnrealizedVAT2(VendLedgEntry2: Record "Vendor Ledger Entry"; AmountLCY: Decimal; GenJnlLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntry: Integer; var LastVATEntry: Integer; var NoRealVATBuffer: Record "BG/PO Post. Buffer"; IsFromJournal: Boolean; PostedDocumentNo: Code[20]) - var - VendLedgEntry3: Record "Vendor Ledger Entry"; - begin - if GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry2, IsFromJournal) then begin - VendLedgEntry3.SetCurrentKey("Document No.", "Document Type", "Vendor No."); - VendLedgEntry3.SetRange("Document Type", VendLedgEntry3."Document Type"::Invoice); - VendLedgEntry3.SetRange("Document No.", VendLedgEntry2."Document No."); - - OnVendUnrealizedVAT2OnAfterSetFilters( - VendLedgEntry2, VendLedgEntry3, AmountLCY, GenJnlLine, ExistVATEntry, FirstVATEntry, LastVATEntry, - NoRealVATBuffer, IsFromJournal, PostedDocumentNo); - if VendLedgEntry3.FindFirst() then begin - VendLedgEntry3.Open := true; - VendUnrealizedVAT( - VendLedgEntry3, -AmountLCY, GenJnlLine, ExistVATEntry, FirstVATEntry, LastVATEntry, NoRealVATBuffer, PostedDocumentNo); - end; - end else - exit; - end; - - local procedure VendUnrealizedVAT(var VendLedgEntry2: Record "Vendor Ledger Entry"; SettledAmount: Decimal; GenJnlLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var NoRealVATBuffer: Record "BG/PO Post. Buffer"; PostedDocumentNo: Code[20]) - var - VATEntry: Record "VAT Entry"; - VATEntry2: Record "VAT Entry"; - VATEntry3: Record "VAT Entry"; - VATEntryLast: Record "VAT Entry"; - PurchInvHeader: Record "Purch. Inv. Header"; - PaymentTerms: Record "Payment Terms"; - VATPart: Decimal; - VATAmount: Decimal; - VATBase: Decimal; - VATAmountAddCurr: Decimal; - VATBaseAddCurr: Decimal; - CurrencyFactor: Decimal; - PurchVATAccount: Code[20]; - PurchVATUnrealAccount: Code[20]; - LastConnectionNo: Integer; - Test1: Boolean; - Test2: Boolean; - IsLastEntry: Boolean; - PaymentTermsCode: Code[20]; - ReverseChrgVATAcc: Code[20]; - ReverseChrgVATUnrealAcc: Code[20]; - begin - OnBeforeVendUnrealizedVAT( - VendLedgEntry2, SettledAmount, GenJnlLine, ExistVATEntry, FirstVATEntryNo, LastVATEntryNo, - NoRealVATBuffer, PostedDocumentNo, PaymentTermsCode, VATPostingSetup); - - if PostedDocumentNo <> '' then begin - PurchInvHeader.Get(PostedDocumentNo); - PaymentTermsCode := PurchInvHeader."Payment Terms Code"; - end; - - VendLedgEntry2.CalcFields( - Amount, - "Amount (LCY)", - "Remaining Amount", - "Remaining Amt. (LCY)", - "Original Amt. (LCY)"); - CurrencyFactor := VendLedgEntry2.Amount / VendLedgEntry2."Amount (LCY)"; - VATEntry2.Reset(); - VATEntry2.SetCurrentKey("Transaction No."); - VATEntry2.SetRange("Transaction No.", VendLedgEntry2."Transaction No."); - - VATEntryLast.Copy(VATEntry2); - if VATEntryLast.FindLast() then; - - if VATEntry2.Find('-') then begin - LastConnectionNo := 0; - repeat - if LastConnectionNo <> VATEntry2."Sales Tax Connection No." then - LastConnectionNo := VATEntry2."Sales Tax Connection No."; - - VATEntry3.Reset(); - if VATEntry3.FindLast() then - VATEntryNo := VATEntry3."Entry No." + 1; - - if (VATEntry2.Type <> VATEntry2.Type::" ") and - (VATEntry2.Amount = 0) and - (VATEntry2.Base = 0) - then begin - case VATEntry2."VAT Calculation Type" of - VATEntry2."VAT Calculation Type"::"Normal VAT", - VATEntry2."VAT Calculation Type"::"Reverse Charge VAT", - VATEntry2."VAT Calculation Type"::"Full VAT": - VATPostingSetup.Get( - VATEntry2."VAT Bus. Posting Group", VATEntry2."VAT Prod. Posting Group"); - end; - if (VATPostingSetup."Unrealized VAT Type" > 0) and - ((VATEntry2."Remaining Unrealized Amount" <> 0) or - (VATEntry2."Remaining Unrealized Base" <> 0)) - then begin - if not VendLedgEntry2.Open then - VATPart := 1 - else - if VendLedgEntry2."Currency Code" = '' then - VATPart := -SettledAmount / VendLedgEntry2."Original Amt. (LCY)" - else - VATPart := - -SettledAmount * - (VendLedgEntry2."Original Amt. (LCY)" / VendLedgEntry2.Amount) / VendLedgEntry2."Original Amt. (LCY)"; - OnVendUnrealizedVATOnAfterVATPartCalculated(VendLedgEntry2, VATEntry2, VATPostingSetup, SettledAmount, VATPart); - end; - if VATPart <> 0 then begin - case VATEntry2."VAT Calculation Type" of - VATEntry2."VAT Calculation Type"::"Normal VAT", - VATEntry2."VAT Calculation Type"::"Reverse Charge VAT", - VATEntry2."VAT Calculation Type"::"Full VAT": - begin - VATPostingSetup.TestField("Purchase VAT Account"); - VATPostingSetup.TestField("Purch. VAT Unreal. Account"); - if VATEntry2."VAT Calculation Type" = VATEntry2."VAT Calculation Type"::"Reverse Charge VAT" then begin - VATPostingSetup.TestField("Reverse Chrg. VAT Acc."); - VATPostingSetup.TestField("Reverse Chrg. VAT Unreal. Acc."); - ReverseChrgVATAcc := VATPostingSetup."Reverse Chrg. VAT Acc."; - ReverseChrgVATUnrealAcc := VATPostingSetup."Reverse Chrg. VAT Unreal. Acc."; - end; - PurchVATAccount := VATPostingSetup."Purchase VAT Account"; - PurchVATUnrealAccount := VATPostingSetup."Purch. VAT Unreal. Account"; - end; - end; - PaymentTerms.Get(PaymentTermsCode); - if PaymentTerms."VAT distribution" = PaymentTerms."VAT distribution"::"First Installment" then - VATPart := 1; - - if VATPart = 1 then begin - VATAmount := VATEntry2."Remaining Unrealized Amount"; - VATBase := VATEntry2."Remaining Unrealized Base"; - VATAmountAddCurr := VATEntry2."Add.-Curr. Rem. Unreal. Amount"; - VATBaseAddCurr := VATEntry2."Add.-Curr. Rem. Unreal. Base"; - end else begin - VATAmount := Round(VATEntry2."Unrealized Amount" * VATPart); - VATBase := Round(VATEntry2."Unrealized Base" * VATPart); - end; - - VATUnrealAcc := PurchVATUnrealAccount; - VATAcc := PurchVATAccount; - if VendLedgEntry2."Currency Code" = '' then - TotalVATAmount := VATAmount - else - TotalVATAmount := VATAmount * CurrencyFactor; - - if NoRealVATBuffer.Get(PurchVATUnrealAccount, PurchVATAccount, VATEntry2."Entry No.") then - NoRealVATBuffer.Amount := NoRealVATBuffer.Amount + TotalVATAmount - else begin - NoRealVATBuffer.Init(); - NoRealVATBuffer.Account := PurchVATUnrealAccount; - NoRealVATBuffer."Balance Account" := PurchVATAccount; - NoRealVATBuffer.Amount := TotalVATAmount; - NoRealVATBuffer."Entry No." := VATEntry2."Entry No."; - NoRealVATBuffer.Insert(); - end; - - if VATEntry2."VAT Calculation Type" = VATEntry2."VAT Calculation Type"::"Reverse Charge VAT" then - if NoRealVATBuffer.Get(ReverseChrgVATAcc, ReverseChrgVATUnrealAcc, VATEntry2."Entry No.") then - NoRealVATBuffer.Amount := NoRealVATBuffer.Amount + TotalVATAmount - else begin - NoRealVATBuffer.Init(); - NoRealVATBuffer.Account := ReverseChrgVATAcc; - NoRealVATBuffer."Balance Account" := ReverseChrgVATUnrealAcc; - NoRealVATBuffer.Amount := TotalVATAmount; - NoRealVATBuffer."Entry No." := VATEntry2."Entry No."; - NoRealVATBuffer.Insert(); - end; - - VATEntry := VATEntry2; - VATEntry."Entry No." := VATEntryNo; - VATEntry."Posting Date" := GenJnlLine."Posting Date"; - VATEntry.SetVATDateFromGenJnlLine(GenJnlLine); - VATEntry."Document No." := GenJnlLine."Document No."; - VATEntry."External Document No." := GenJnlLine."External Document No."; - VATEntry."Document Type" := GenJnlLine."Document Type"; - VATEntry.Amount := VATAmount; - VATEntry.Base := VATBase; - VATEntry."Unrealized Amount" := 0; - VATEntry."Unrealized Base" := 0; - VATEntry."Remaining Unrealized Amount" := 0; - VATEntry."Remaining Unrealized Base" := 0; - VATEntry."Additional-Currency Amount" := VATAmountAddCurr; - VATEntry."Additional-Currency Base" := VATBaseAddCurr; - VATEntry."Add.-Currency Unrealized Amt." := 0; - VATEntry."Add.-Currency Unrealized Base" := 0; - VATEntry."Add.-Curr. Rem. Unreal. Amount" := 0; - VATEntry."Add.-Curr. Rem. Unreal. Base" := 0; - VATEntry."User ID" := UserId; - VATEntry."Source Code" := GenJnlLine."Source Code"; - VATEntry."Reason Code" := GenJnlLine."Reason Code"; - VATEntry."Closed by Entry No." := 0; - VATEntry.Closed := false; - VATEntry."Transaction No." := VendLedgEntry2."Transaction No."; - VATEntry."Unrealized VAT Entry No." := VATEntry2."Entry No."; - VATEntry.UpdateRates(VATPostingSetup); - Test1 := VATEntry.Insert(); - - VATEntry2."Remaining Unrealized Amount" := - VATEntry2."Remaining Unrealized Amount" - VATEntry.Amount; - VATEntry2."Remaining Unrealized Base" := - VATEntry2."Remaining Unrealized Base" - VATEntry.Base; - VATEntry2."Add.-Curr. Rem. Unreal. Amount" := - VATEntry2."Add.-Curr. Rem. Unreal. Amount" - VATEntry."Additional-Currency Amount"; - VATEntry2."Add.-Curr. Rem. Unreal. Base" := - VATEntry2."Add.-Curr. Rem. Unreal. Base" - VATEntry."Additional-Currency Base"; - OnVendUnrealizedVATOnBeforeVATEntry2Modify(VATEntry, VendLedgEntry2, GenJnlLine); - Test2 := VATEntry2.Modify(); - LastVATEntryNo := VATEntryNo; - end; - end; - - if not ExistVATEntry then - FirstVATEntryNo := LastVATEntryNo; - ExistVATEntry := Test1 and Test2; - - IsLastEntry := VATEntryLast."Entry No." = VATEntry2."Entry No."; - - until (VATEntry2.Next() = 0) or IsLastEntry; - end; - end; - - [Scope('OnPrem')] - procedure GetLastDate(CurrCode: Code[10]; DocPostDate: Date; Type: Option Receivable,Payable): Date - var - ExchRateAdjReg: Record "Exch. Rate Adjmt. Reg."; - begin - ExchRateAdjReg.SetRange("Currency Code", CurrCode); - if Type = Type::Receivable then - ExchRateAdjReg.SetRange("Account Type", ExchRateAdjReg."Account Type"::Customer) - else - ExchRateAdjReg.SetRange("Account Type", ExchRateAdjReg."Account Type"::Vendor); - if ExchRateAdjReg.FindLast() then - if ExchRateAdjReg."Creation Date" > DocPostDate then - exit(ExchRateAdjReg."Creation Date") - else - exit(DocPostDate) - else - exit(DocPostDate); - end; - - procedure GetGainLoss(PostingDate: Date; PostingDate2: Date; AmountFCY: Decimal; CurrencyCode: Code[10]): Decimal - begin - exit( - GetAmountLCYBasedOnCurrencyDate(PostingDate2, CurrencyCode, AmountFCY) - - GetAmountLCYBasedOnCurrencyDate(PostingDate, CurrencyCode, AmountFCY)); - end; - - procedure GetCurrFactorGainLoss(CurrFactor1: Decimal; CurrFactor2: Decimal; AmountFCY: Decimal; CurrencyCode: Code[10]): Decimal - begin - exit( - GetAmountLCYBasedOnCurrencyFactor(CurrencyCode, CurrFactor2, AmountFCY) - - GetAmountLCYBasedOnCurrencyFactor(CurrencyCode, CurrFactor1, AmountFCY)); - end; - - procedure CheckFromRedrawnDoc(DocNo: Code[20]): Boolean - begin - if StrPos(DocNo, '-') = 0 then - exit(false); - - exit(true); - end; - - local procedure GetDocType(Type: Enum "Cartera Document Doc. Type"): Enum "Gen. Journal Document Type" - begin - case Type of - Type::Invoice, Type::Bill: - exit("Gen. Journal Document Type"::Payment); - else - exit("Gen. Journal Document Type"::" "); - end; - end; - - local procedure RemovePayableError(CarteraDoc: Record "Cartera Doc.") - var - PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text"; - begin - PaymentJnlExportErrorText.SetRange("Document No.", CarteraDoc."Bill Gr./Pmt. Order No."); - PaymentJnlExportErrorText.SetRange("Journal Line No.", CarteraDoc."Entry No."); - PaymentJnlExportErrorText.DeleteAll(true); - end; - - local procedure RemoveReceivableError(CarteraDoc: Record "Cartera Doc.") - var - PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text"; - begin - PaymentJnlExportErrorText.SetRange("Journal Template Name", ''); - PaymentJnlExportErrorText.SetRange("Journal Batch Name", Format(DATABASE::"Bill Group")); - PaymentJnlExportErrorText.SetRange("Document No.", CarteraDoc."Bill Gr./Pmt. Order No."); - PaymentJnlExportErrorText.SetRange("Journal Line No.", CarteraDoc."Entry No."); - PaymentJnlExportErrorText.DeleteAll(true); - end; - - procedure GetDimSetIDFromCustLedgEntry(GenJnlLine: Record "Gen. Journal Line"; CustLedgEntry: Record "Cust. Ledger Entry"; IsPostedDoc: Boolean) DimSetID: Integer - var - PostedCarteraDoc: Record "Posted Cartera Doc."; - ClosedCarteraDoc: Record "Closed Cartera Doc."; - begin - if IsPostedDoc then begin - PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Receivable); - PostedCarteraDoc.SetRange("Document No.", CustLedgEntry."Document No."); - if CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Bill then - PostedCarteraDoc.SetRange("No.", CustLedgEntry."Bill No."); - PostedCarteraDoc.FindLast(); - DimSetID := PostedCarteraDoc."Dimension Set ID"; - end else begin - ClosedCarteraDoc.SetRange(Type, ClosedCarteraDoc.Type::Receivable); - ClosedCarteraDoc.SetRange("Document No.", CustLedgEntry."Document No."); - if CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Bill then - ClosedCarteraDoc.SetRange("No.", CustLedgEntry."Bill No."); - ClosedCarteraDoc.FindLast(); - DimSetID := ClosedCarteraDoc."Dimension Set ID"; - end; - exit(GetCombinedDimSetID(GenJnlLine, DimSetID)); - end; - - procedure GetDimSetIDFromCustPostDocBuffer(GenJnlLine: Record "Gen. Journal Line"; CustLedgEntry: Record "Cust. Ledger Entry"; var PostDocBuffer: Record "Posted Cartera Doc."): Integer - begin - PostDocBuffer.SetRange(Type, PostDocBuffer.Type::Receivable); - PostDocBuffer.SetRange("Document No.", CustLedgEntry."Document No."); - if CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Bill then - PostDocBuffer.SetRange("No.", CustLedgEntry."Bill No."); - PostDocBuffer.FindLast(); - PostDocBuffer.Reset(); - exit(GetCombinedDimSetID(GenJnlLine, PostDocBuffer."Dimension Set ID")); - end; - - procedure GetCombinedDimSetID(GenJnlLine: Record "Gen. Journal Line"; DimSetID: Integer): Integer - var - DimensioMgt: Codeunit DimensionManagement; - DimensionSetIDArr: array[10] of Integer; - begin - DimensionSetIDArr[1] := GenJnlLine."Dimension Set ID"; - DimensionSetIDArr[2] := DimSetID; - exit( - DimensioMgt.GetCombinedDimensionSetID(DimensionSetIDArr, GenJnlLine."Shortcut Dimension 1 Code", GenJnlLine."Shortcut Dimension 2 Code")); - end; - - local procedure GetAmountLCYBasedOnCurrencyDate(PostingDate: Date; CurrencyCode: Code[10]; AmountFCY: Decimal): Decimal - var - TempGenJournalLine: Record "Gen. Journal Line" temporary; - begin - TempGenJournalLine.Init(); - TempGenJournalLine."Posting Date" := PostingDate; - TempGenJournalLine.Validate("Account Type", TempGenJournalLine."Account Type"::"G/L Account"); - TempGenJournalLine.Validate("Currency Code", CurrencyCode); - TempGenJournalLine.Validate(Amount, AmountFCY); - TempGenJournalLine.Insert(); - exit(TempGenJournalLine."Amount (LCY)"); - end; - - local procedure GetAmountLCYBasedOnCurrencyFactor(CurrencyCode: Code[10]; CurrencyFactor: Decimal; AmountFCY: Decimal): Decimal - var - TempGenJournalLine: Record "Gen. Journal Line" temporary; - begin - TempGenJournalLine.Init(); - TempGenJournalLine.Validate("Currency Code", CurrencyCode); - TempGenJournalLine.Validate("Currency Factor", CurrencyFactor); - TempGenJournalLine.Validate(Amount, AmountFCY); - TempGenJournalLine.Insert(); - exit(TempGenJournalLine."Amount (LCY)"); - end; - - local procedure CheckUseForElectronicPayments(No: Code[20]): Boolean - var - VendorBankAccount: Record "Vendor Bank Account"; - begin - VendorBankAccount.SetRange("Vendor No.", No); - VendorBankAccount.SetRange("Use For Electronic Payments", true); - exit(not VendorBankAccount.IsEmpty()); - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterCreatePayableDocPayment(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterCreateReceivableDocPayment(var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterInsertPayableDocs(var CarteraDoc: Record "Cartera Doc."; var PaymentOrder: Record "Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterInsertReceivableDocs(var CarteraDoc: Record "Cartera Doc."; var BillGroup: Record "Bill Group") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterRemovePayableDocs(var CarteraDoc: Record "Cartera Doc."; var PaymentOrder: Record "Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterRemoveReceivableDocs(var CarteraDoc: Record "Cartera Doc."; var BillGroup: Record "Bill Group") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterReversePayableDocPayment(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterReverseReceivableDocPayment(var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCheckConfirmBillGroupAlreadyPrinted(BillGr: Record "Bill Group"; var Result: Boolean; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCheckConfirmPaymentOrderAlreadyPrinted(PaymentOrder: Record "Payment Order"; var Result: Boolean; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCustUnrealizedVAT(var CustLedgerEntry: Record "Cust. Ledger Entry"; var SettledAmount: Decimal; var GenJournalLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var PostedDocumentNo: Code[20]; var PaymentTermsCode: Code[20]; var VATPostingSetup: Record "VAT Posting Setup") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeVendUnrealizedVAT(var VendLedgEntry: Record "Vendor Ledger Entry"; var SettledAmount: Decimal; var GenJournalLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var PostedDocumentNo: Code[20]; var PaymentTermsCode: Code[20]; var VATPostingSetup: Record "VAT Posting Setup") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnCustUnrealizedVATOnAfterVATPartCalculated(CustLedgerEntry: Record "Cust. Ledger Entry"; VATEntry: Record "VAT Entry"; VATPostingSetup: Record "VAT Posting Setup"; var SettledAmount: Decimal; var VATPart: Decimal) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnCustUnrealizedVATOnBeforeVATEntryModify(var VATEntry: Record "VAT Entry"; CustLedgerEntry: Record "Cust. Ledger Entry"; GenJournalLine: Record "Gen. Journal Line") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnInsertPayableDocsOnAfterSetFilters(var CarteraDoc: Record "Cartera Doc."; var CarteraDoc2: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnInsertReceivableDocsOnAfterSetFilters(var CarteraDoc: Record "Cartera Doc."; BillGroup: Record "Bill Group") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnVendUnrealizedVAT2OnAfterSetFilters(var VendLedgEntry2: Record "Vendor Ledger Entry"; var VendLedgEntry3: Record "Vendor Ledger Entry"; var SettledAmount: Decimal; var GenJournalLine: Record "Gen. Journal Line"; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var IsFromJournal: Boolean; var PostedDocumentNo: Code[20]) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnVendUnrealizedVATOnAfterVATPartCalculated(VendorLedgerEntry: Record "Vendor Ledger Entry"; VATEntry: Record "VAT Entry"; VATPostingSetup: Record "VAT Posting Setup"; var SettledAmount: Decimal; var VATPart: Decimal) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnVendUnrealizedVATOnBeforeVATEntry2Modify(var VATEntry: Record "VAT Entry"; VendLedgEntry2: Record "Vendor Ledger Entry"; GenJnlLine: Record "Gen. Journal Line") - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraReportSelections.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraReportSelections.Table.al deleted file mode 100644 index 1d337b4861d..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraReportSelections.Table.al +++ /dev/null @@ -1,70 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using System.Reflection; - -table 7000013 "Cartera Report Selections" -{ - Caption = 'Cartera Report Selections'; - DataClassification = CustomerContent; - - fields - { - field(1; Usage; Enum "Report Selection Usage Cartera") - { - Caption = 'Usage'; - } - field(2; Sequence; Code[10]) - { - Caption = 'Sequence'; - Numeric = true; - } - field(3; "Report ID"; Integer) - { - Caption = 'Report ID'; - TableRelation = AllObjWithCaption."Object ID" where("Object Type" = const(Report)); - - trigger OnValidate() - begin - CalcFields("Report Name"); - end; - } - field(4; "Report Name"; Text[30]) - { - CalcFormula = lookup(Object.Name where(Type = const(Report), - ID = field("Report ID"))); - Caption = 'Report Name'; - Editable = false; - FieldClass = FlowField; - } - } - - keys - { - key(Key1; Usage, Sequence) - { - Clustered = true; - } - } - - fieldgroups - { - } - - var - CarteraReportSelection2: Record "Cartera Report Selections"; - - [Scope('OnPrem')] - procedure NewRecord() - begin - CarteraReportSelection2.SetRange(Usage, Usage); - if CarteraReportSelection2.FindLast() and (CarteraReportSelection2.Sequence <> '') then - Sequence := IncStr(CarteraReportSelection2.Sequence) - else - Sequence := '1'; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSetup.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSetup.Page.al deleted file mode 100644 index e25f1dc4d53..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSetup.Page.al +++ /dev/null @@ -1,89 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Foundation.NoSeries; - -page 7000040 "Cartera Setup" -{ - ApplicationArea = Basic, Suite; - Caption = 'Cartera Setup'; - DeleteAllowed = false; - InsertAllowed = false; - PageType = Card; - SourceTable = "Cartera Setup"; - UsageCategory = Administration; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("Bills Discount Limit Warnings"; Rec."Bills Discount Limit Warnings") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if a warning message is issued when the credit limit authorized by the selected bank for a bill group is exceeded.'; - } - field("Euro Currency Code"; Rec."Euro Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code that represents the euro.'; - } - } - group(Numbering) - { - Caption = 'Numbering'; - field("GenLedgerSetup.""Bank Account Nos."""; GenLedgerSetup."Bank Account Nos.") - { - ApplicationArea = Basic, Suite; - Caption = 'Bank Account Nos.'; - TableRelation = "No. Series"; - ToolTip = 'Specifies the number series for bank accounts.'; - - trigger OnValidate() - begin - GenLedgerSetupBankAccountNosOn(); - end; - } - field("Bill Group Nos."; Rec."Bill Group Nos.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the numbering code used to assign numbers to bill groups.'; - } - field("Payment Order Nos."; Rec."Payment Order Nos.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the numbering code used to assign numbers to payment orders.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - GenLedgerSetup.Get(); - end; - - trigger OnOpenPage() - begin - GenLedgerSetup.Get(); - end; - - var - GenLedgerSetup: Record "General Ledger Setup"; - - local procedure GenLedgerSetupBankAccountNosOn() - begin - GenLedgerSetup.Modify(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSetup.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSetup.Table.al deleted file mode 100644 index 5e2e80da5bc..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSetup.Table.al +++ /dev/null @@ -1,58 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.Currency; -using Microsoft.Foundation.NoSeries; - -table 7000016 "Cartera Setup" -{ - Caption = 'Cartera Setup'; - DataClassification = CustomerContent; - - fields - { - field(1; "Primary Key"; Code[10]) - { - Caption = 'Primary Key'; - } - field(3; "Bill Group Nos."; Code[20]) - { - Caption = 'Bill Group Nos.'; - TableRelation = "No. Series"; - } - field(4; "Payment Order Nos."; Code[20]) - { - Caption = 'Payment Order Nos.'; - TableRelation = "No. Series"; - } - field(7; "Bills Discount Limit Warnings"; Boolean) - { - Caption = 'Bills Discount Limit Warnings'; - } - field(8; "CCC Ctrl Digits Check String"; Text[30]) - { - Caption = 'CCC Ctrl Digits Check String'; - } - field(9; "Euro Currency Code"; Code[10]) - { - Caption = 'Euro Currency Code'; - TableRelation = Currency; - } - } - - keys - { - key(Key1; "Primary Key") - { - Clustered = true; - } - } - - fieldgroups - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSourceCdSetup.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSourceCdSetup.Page.al deleted file mode 100644 index 1f19d2eea76..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CarteraSourceCdSetup.Page.al +++ /dev/null @@ -1,47 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Foundation.AuditCodes; - -page 7000041 "Cartera Source Cd. Setup" -{ - ApplicationArea = Basic, Suite; - Caption = 'Cartera Source Code Setup'; - PageType = Card; - SourceTable = "Source Code Setup"; - UsageCategory = Administration; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("Cartera Journal"; Rec."Cartera Journal") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the source code related to the entries posted from the portfolio journal.'; - } - field("Compress Bank Acc. Ledger"; Rec."Compress Bank Acc. Ledger") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code linked to entries that are posted using the Date Compress Bank Acc. Ledger batch job.'; - } - field("Compress Check Ledger"; Rec."Compress Check Ledger") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the code linked to entries that are posted using the Delete Check Ledger Entries batch job.'; - } - } - } - } - - actions - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CheckDiscountCreditLimit.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CheckDiscountCreditLimit.Page.al deleted file mode 100644 index 24aaa134cf1..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CheckDiscountCreditLimit.Page.al +++ /dev/null @@ -1,270 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Bank.Check; -using Microsoft.Bank.Ledger; -using Microsoft.Bank.Statement; -using Microsoft.Foundation.Comment; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -page 7000037 "Check Discount Credit Limit" -{ - Caption = 'Check Discount Credit Limit'; - DeleteAllowed = false; - Editable = false; - InsertAllowed = false; - InstructionalText = 'The credit limit for discount with this bank will be exceeded. Do you still want to proceed?'; - ModifyAllowed = false; - PageType = ConfirmationDialog; - SourceTable = "Bank Account"; - - layout - { - area(content) - { - group(Details) - { - Caption = 'Details'; - field("No."; Rec."No.") - { - ApplicationArea = All; - } - field(Name; Rec.Name) - { - ApplicationArea = All; - } - field("Posted Receiv. Bills Rmg. Amt."; Rec."Posted Receiv. Bills Rmg. Amt.") - { - ApplicationArea = Basic, Suite; - Caption = 'Discounted so far'; - ToolTip = 'Shows the amount pending from the receivables registered at this bank.'; - } - field(CurrBillGrAmount; CurrBillGrAmount) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Amount of this Bill Group'; - } - field(AmountSelected; AmountSelected) - { - ApplicationArea = All; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Amount Selected'; - Visible = AmountSelectedVisible; - } - field(TotalAmount; TotalAmount) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Total Amount'; - } - field("Credit Limit for Discount"; Rec."Credit Limit for Discount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the credit limit for the discount of bills available at this particular bank.'; - } - } - } - area(factboxes) - { - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("&Bank Acc.") - { - Caption = '&Bank Acc.'; - Image = Bank; - action("Ledger E&ntries") - { - ApplicationArea = Basic, Suite; - Caption = 'Ledger E&ntries'; - RunObject = Page "Bank Account Ledger Entries"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No.", "Posting Date"); - ShortCutKey = 'Ctrl+F7'; - } - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "Comment Sheet"; - RunPageLink = "Table Name" = const("Bank Account"), - "No." = field("No."); - } - action(Statistics) - { - ApplicationArea = Basic, Suite; - Caption = 'Statistics'; - Image = Statistics; - Promoted = true; - PromotedCategory = Process; - RunObject = Page "Bank Account Statistics"; - RunPageLink = "No." = field("No."), - "Date Filter" = field("Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); - ShortCutKey = 'F7'; - } - action(Balance) - { - ApplicationArea = Basic, Suite; - Caption = 'Balance'; - Image = Balance; - RunObject = Page "Bank Account Balance"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); - } - action("St&atements") - { - ApplicationArea = Basic, Suite; - Caption = 'St&atements'; - RunObject = Page "Bank Account Statement List"; - RunPageLink = "Bank Account No." = field("No."); - } - action("Chec&k Ledger Entries") - { - ApplicationArea = Basic, Suite; - Caption = 'Chec&k Ledger Entries'; - Image = CheckLedger; - RunObject = Page "Check Ledger Entries"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No.", "Entry Status", "Check No."); - } - separator(Action41) - { - } - action("&Operation Fees") - { - ApplicationArea = Basic, Suite; - Caption = '&Operation Fees'; - RunObject = Page "Operation Fees"; - RunPageLink = Code = field("Operation Fees Code"), - "Currency Code" = field("Currency Code"); - } - action("Customer Ratings") - { - ApplicationArea = Basic, Suite; - Caption = 'Customer Ratings'; - Image = CustomerRating; - RunObject = Page "Customer Ratings"; - RunPageLink = Code = field("Customer Ratings Code"), - "Currency Code" = field("Currency Code"); - } - separator(Action5) - { - Caption = ''; - } - action("Bill &Groups") - { - ApplicationArea = Basic, Suite; - Caption = 'Bill &Groups'; - Image = VoucherGroup; - RunObject = Page "Bill Groups List"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No."); - } - action("Posted Bill Groups") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Bill Groups'; - Image = PostedVoucherGroup; - RunObject = Page "Posted Bill Groups List"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No."); - } - separator(Action7) - { - Caption = ''; - } - action("Payment O&rders") - { - ApplicationArea = Basic, Suite; - Caption = 'Payment O&rders'; - RunObject = Page "Payment Orders List"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No."); - } - action("Posted P&ayment Orders") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted P&ayment Orders'; - Image = PostedPayment; - RunObject = Page "Posted Payment Orders List"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No."); - } - separator(Action50) - { - } - action("Posted Recei&vable Bills") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Recei&vable Bills'; - Image = PostedReceivableVoucher; - RunObject = Page "Bank Cat. Posted Receiv. Bills"; - } - action("Posted Pa&yable Bills") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Pa&yable Bills'; - Image = PostedPayableVoucher; - RunObject = Page "Bank Cat. Posted Payable Bills"; - } - } - } - } - - trigger OnInit() - begin - AmountSelectedVisible := true; - end; - - trigger OnOpenPage() - begin - OnActivateForm(); - end; - - var - CurrBillGrAmount: Decimal; - AmountSelected: Decimal; - TotalAmount: Decimal; - AmountSelectedVisible: Boolean; - - [Scope('OnPrem')] - procedure SetValues(CurrAmount: Decimal; SelAmount: Decimal) - begin - CurrBillGrAmount := CurrAmount; - AmountSelected := SelAmount; - end; - - local procedure OnActivateForm() - begin - Rec.SetRange("Dealing Type Filter", Rec."Dealing Type Filter"::Discount); - Rec.SetRange("Status Filter", Rec."Status Filter"::Open); - Rec.CalcFields("Posted Receiv. Bills Amt."); - TotalAmount := Rec."Posted Receiv. Bills Rmg. Amt." + CurrBillGrAmount + AmountSelected; - AmountSelectedVisible := AmountSelected <> 0; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedCarteraDoc.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedCarteraDoc.Table.al deleted file mode 100644 index 9c1c310e052..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedCarteraDoc.Table.al +++ /dev/null @@ -1,260 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Purchases.Payables; -using Microsoft.Purchases.Vendor; -using Microsoft.Sales.Customer; -using Microsoft.Sales.Receivables; - -table 7000004 "Closed Cartera Doc." -{ - Caption = 'Closed Cartera Doc.'; - DrillDownPageID = "Closed Cartera Documents"; - LookupPageID = "Closed Cartera Documents"; - DataClassification = CustomerContent; - - fields - { - field(1; Type; Enum "Cartera Document Type") - { - Caption = 'Type'; - } - field(2; "Entry No."; Integer) - { - Caption = 'Entry No.'; - } - field(3; "No."; Code[20]) - { - Caption = 'No.'; - } - field(4; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(5; "Document No."; Code[20]) - { - Caption = 'Document No.'; - } - field(6; Description; Text[100]) - { - Caption = 'Description'; - } - field(7; "Bank Account No."; Code[20]) - { - Caption = 'Bank Account No.'; - TableRelation = "Bank Account"; - } - field(8; "Dealing Type"; Enum "Cartera Dealing Type") - { - Caption = 'Dealing Type'; - Editable = false; - } - field(9; "Amount for Collection"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Amount for Collection'; - } - field(10; "Amt. for Collection (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amt. for Collection (LCY)'; - } - field(11; "Due Date"; Date) - { - Caption = 'Due Date'; - } - field(12; "Payment Method Code"; Code[10]) - { - Caption = 'Payment Method Code'; - TableRelation = "Payment Method"; - } - field(13; Accepted; Option) - { - Caption = 'Accepted'; - OptionCaption = 'Not Required,Yes'; - OptionMembers = "Not Required",Yes; - } - field(14; Place; Boolean) - { - Caption = 'Place'; - } - field(15; "Collection Agent"; Option) - { - Caption = 'Collection Agent'; - OptionCaption = 'Direct,Bank'; - OptionMembers = Direct,Bank; - } - field(16; "Bill Gr./Pmt. Order No."; Code[20]) - { - Caption = 'Bill Gr./Pmt. Order No.'; - TableRelation = if (Type = const(Receivable)) "Closed Bill Group"."No." - else - if (Type = const(Payable)) "Closed Payment Order"."No."; - } - field(18; "Account No."; Code[20]) - { - Caption = 'Account No.'; - TableRelation = if (Type = const(Receivable)) Customer - else - if (Type = const(Payable)) Vendor; - } - field(19; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - } - field(20; "Cust./Vendor Bank Acc. Code"; Code[20]) - { - Caption = 'Cust./Vendor Bank Acc. Code'; - TableRelation = if (Type = const(Receivable)) "Customer Bank Account".Code where("Customer No." = field("Account No.")) - else - if (Type = const(Payable)) "Vendor Bank Account".Code where("Vendor No." = field("Account No.")); - } -#if not CLEANSCHEMA25 - field(21; "Pmt. Address Code"; Code[10]) - { - Caption = 'Pmt. Address Code'; - ObsoleteReason = 'Address is taken from the fields Address, City, etc. of Customer/Vendor table.'; - ObsoleteState = Removed; - ObsoleteTag = '25.0'; - } -#endif - field(22; "Global Dimension 1 Code"; Code[20]) - { - CaptionClass = '1,1,1'; - Caption = 'Global Dimension 1 Code'; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(23; "Global Dimension 2 Code"; Code[20]) - { - CaptionClass = '1,1,2'; - Caption = 'Global Dimension 2 Code'; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(24; Status; Enum "Cartera Document Status") - { - Caption = 'Status'; - } - field(25; "Honored/Rejtd. at Date"; Date) - { - Caption = 'Honored/Rejtd. at Date'; - } - field(26; "Remaining Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Remaining Amount'; - } - field(27; "Remaining Amt. (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Remaining Amt. (LCY)'; - } - field(28; Redrawn; Boolean) - { - Caption = 'Redrawn'; - } - field(29; "Original Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Original Amount'; - } - field(30; "Original Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Original Amount (LCY)'; - } - field(40; "Document Type"; Enum "Cartera Document Doc. Type") - { - Caption = 'Document Type'; - Editable = false; - } - field(42; Factoring; Option) - { - Caption = 'Factoring'; - Editable = false; - OptionCaption = ' ,Unrisked,Risked'; - OptionMembers = " ",Unrisked,Risked; - } - field(49; "From Journal"; Boolean) - { - Caption = 'From Journal'; - } - field(480; "Dimension Set ID"; Integer) - { - Caption = 'Dimension Set ID'; - Editable = false; - TableRelation = "Dimension Set Entry"; - - trigger OnLookup() - begin - Rec.ShowDimensions(); - end; - } - field(10700; "Original Document No."; Code[20]) - { - Caption = 'Original Document No.'; - } - } - - keys - { - key(Key1; Type, "Entry No.") - { - Clustered = true; - } - key(Key2; Type, "Document No.") - { - } - key(Key3; "Account No.", "Honored/Rejtd. at Date") - { - } - key(Key4; Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn) - { - SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; - } - key(Key5; "Bank Account No.", "Dealing Type", "Currency Code", Status, Redrawn, "Due Date", "Honored/Rejtd. at Date") - { - SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; - } - key(Key6; Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Currency Code", Status, Redrawn) - { - SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; - } - key(Key7; "Bank Account No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Currency Code", "Dealing Type", Status, Redrawn, "Due Date", "Honored/Rejtd. at Date", "Document Type") - { - SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; - } - key(Key8; Type, "Bank Account No.", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn, "Document Type") - { - SumIndexFields = "Amount for Collection", "Original Amount", "Amt. for Collection (LCY)", "Original Amount (LCY)"; - } - key(Key9; Type, "Original Document No.") - { - } - } - - fieldgroups - { - } - - [Scope('OnPrem')] - procedure ShowDimensions() - var - DimMgt: Codeunit DimensionManagement; - begin - DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo('%1 %2 %3', Type, "Entry No.", "Document No.")); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedCarteraDocuments.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedCarteraDocuments.Page.al deleted file mode 100644 index 8bfd9b87cae..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedCarteraDocuments.Page.al +++ /dev/null @@ -1,245 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Sales.Receivables; - -page 7000007 "Closed Cartera Documents" -{ - Caption = 'Closed Cartera Documents'; - Editable = false; - PageType = List; - SourceTable = "Closed Cartera Doc."; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date this closed document was created and posted.'; - Visible = false; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this closed document.'; - } - field(Status; Rec.Status) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the status of the closed document.'; - } - field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date of payment or rejection of this closed document.'; - Visible = false; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the payment method code defined for the document number.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the document that is the source of this closed document.'; - } - field("No."; Rec."No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the closed bill.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the description associated with this closed document.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code in which this closed document was generated.'; - Visible = false; - } - field("Original Amount"; Rec."Original Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the initial amount of this closed document.'; - } - field("Original Amount (LCY)"; Rec."Original Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the initial amount of this document, in LCY.'; - Visible = false; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for this closed document to be fully applied.'; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding, in order for this closed document to be fully settled.'; - Visible = false; - } - field(Redrawn; Rec.Redrawn) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if this document, which has come due and is now rejected, has been recirculated.'; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - Visible = false; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the account number of the customer/vendor associated with this closed document.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the ledger entry number associated with the posting of this closed document.'; - } - } - } - } - - actions - { - area(navigation) - { - group("&Docs.") - { - Caption = '&Docs.'; - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - - trigger OnAction() - begin - ClosedDoc.Copy(Rec); - PAGE.Run(PAGE::"Closed Documents Analysis", ClosedDoc); - end; - } - action(Redraw) - { - ApplicationArea = Basic, Suite; - Caption = 'Redraw'; - Ellipsis = true; - Image = RefreshVoucher; - ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; - - trigger OnAction() - begin - RedrawDoc(); - end; - } - separator(Action1100000) - { - } - action("Dime&nsions") - { - ApplicationArea = Basic, Suite; - Caption = 'Dime&nsions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - } - } - area(processing) - { - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - CarteraManagement.NavigateClosedDoc(Rec); - end; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Navigate_Promoted"; "&Navigate") - { - } - } - } - } - - var - Text1100000: Label 'Only bills can be redrawn.'; - Text1100001: Label 'Only receivable bills can be redrawn.'; - Text1100002: Label 'No bills have been found that can be redrawn. \'; - Text1100003: Label 'Please check that at least one rejected bill was selected.'; - ClosedDoc: Record "Closed Cartera Doc."; - CustLedgEntry: Record "Cust. Ledger Entry"; - CarteraManagement: Codeunit CarteraManagement; - - [Scope('OnPrem')] - procedure RedrawDoc() - begin - CurrPage.SetSelectionFilter(ClosedDoc); - if not ClosedDoc.Find('=><') then - exit; - - ClosedDoc.SetRange("Document Type", ClosedDoc."Document Type"::Bill); - if not ClosedDoc.Find('-') then - Error( - Text1100000); - - ClosedDoc.SetRange(Type, ClosedDoc.Type::Receivable); - if not ClosedDoc.Find('-') then - Error( - Text1100001); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); - if not ClosedDoc.Find('-') then - Error( - Text1100002 + - Text1100003); - - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(ClosedDoc."Entry No."); - CustLedgEntry.Mark(true); - until ClosedDoc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Redraw Receivable Bills", true, false, CustLedgEntry); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocsAnalysisLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocsAnalysisLCYFB.Page.al deleted file mode 100644 index 95582499c7d..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocsAnalysisLCYFB.Page.al +++ /dev/null @@ -1,151 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 35296 "Closed Docs Analysis LCY FB" -{ - Caption = 'Closed Docs Analysis LCY FB'; - DataCaptionExpression = Rec.GetFilter(Type); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SourceTable = "Closed Cartera Doc."; - - layout - { - area(content) - { - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - field(HonoredLCY; HonoredAmtLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - Visible = HonoredLCYVisible; - } - field(RejectedLCY; RejectedAmtLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - Visible = RejectedLCYVisible; - } - field(RedrawnLCY; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - trigger OnInit() - begin - RejectedLCYVisible := true; - HonoredLCYVisible := true; - end; - - trigger OnOpenPage() - begin - CurrencyFilter := Rec.GetFilter("Currency Code"); - UpdateStatistics(); - end; - - var - ClosedDoc: Record "Closed Cartera Doc."; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - CurrencyFilter: Code[250]; - Show: Boolean; - HonoredLCYVisible: Boolean; - RejectedLCYVisible: Boolean; - - local procedure UpdateStatistics() - begin - ClosedDoc.Copy(Rec); - ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); - ClosedDoc.SetFilter("Currency Code", CurrencyFilter); - ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); - ClosedDoc.SetRange(Redrawn, true); - Show := ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); - if Show then begin - RedrawnAmt := ClosedDoc."Original Amount"; - RedrawnAmtLCY := ClosedDoc."Original Amount (LCY)"; - end; - NoRedrawn := ClosedDoc.Count; - - ClosedDoc.SetRange(Redrawn, false); - if Show then begin - ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); - HonoredAmt := ClosedDoc."Original Amount"; - HonoredAmtLCY := ClosedDoc."Original Amount (LCY)"; - end; - NoHonored := ClosedDoc.Count; - ClosedDoc.SetRange(Redrawn); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); - if Show then begin - ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); - RejectedAmt := ClosedDoc."Original Amount"; - RejectedAmtLCY := ClosedDoc."Original Amount (LCY)"; - end; - NoRejected := ClosedDoc.Count; - ClosedDoc.SetRange(Status); - - if ClosedDoc.Find('=><') then; - // necessary to calculate decimal places - // CurrForm.Honored.VISIBLE(Show); - // CurrForm.Rejected.VISIBLE(Show); - HonoredLCYVisible := Show; - RejectedLCYVisible := Show; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocsAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocsAnalysisNonLCYFB.Page.al deleted file mode 100644 index ac561a0ec38..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocsAnalysisNonLCYFB.Page.al +++ /dev/null @@ -1,151 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 35297 "Closed Docs Analysis NonLCY FB" -{ - Caption = 'Closed Docs Analysis NonLCY FB'; - DataCaptionExpression = Rec.GetFilter(Type); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SourceTable = "Closed Cartera Doc."; - - layout - { - area(content) - { - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - field(Honored; HonoredAmt) - { - ApplicationArea = All; - AutoFormatExpression = ClosedDoc."Currency Code"; - AutoFormatType = 1; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - Visible = HonoredVisible; - } - field(Rejected; RejectedAmt) - { - ApplicationArea = All; - AutoFormatExpression = ClosedDoc."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - Visible = RejectedVisible; - } - field(Redrawn; RedrawnAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = ClosedDoc."Currency Code"; - AutoFormatType = 1; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - trigger OnInit() - begin - RejectedVisible := true; - HonoredVisible := true; - end; - - trigger OnOpenPage() - begin - CurrencyFilter := Rec.GetFilter("Currency Code"); - UpdateStatistics(); - end; - - var - ClosedDoc: Record "Closed Cartera Doc."; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - CurrencyFilter: Code[250]; - Show: Boolean; - HonoredVisible: Boolean; - RejectedVisible: Boolean; - - local procedure UpdateStatistics() - begin - ClosedDoc.Copy(Rec); - ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); - ClosedDoc.SetFilter("Currency Code", CurrencyFilter); - ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); - ClosedDoc.SetRange(Redrawn, true); - Show := ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); - if Show then begin - RedrawnAmt := ClosedDoc."Original Amount"; - RedrawnAmtLCY := ClosedDoc."Original Amount (LCY)"; - end; - NoRedrawn := ClosedDoc.Count; - - ClosedDoc.SetRange(Redrawn, false); - if Show then begin - ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); - HonoredAmt := ClosedDoc."Original Amount"; - HonoredAmtLCY := ClosedDoc."Original Amount (LCY)"; - end; - NoHonored := ClosedDoc.Count; - ClosedDoc.SetRange(Redrawn); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); - if Show then begin - ClosedDoc.CalcSums("Original Amount", "Original Amount (LCY)"); - RejectedAmt := ClosedDoc."Original Amount"; - RejectedAmtLCY := ClosedDoc."Original Amount (LCY)"; - end; - NoRejected := ClosedDoc.Count; - ClosedDoc.SetRange(Status); - - if ClosedDoc.Find('=><') then; - // necessary to calculate decimal places - HonoredVisible := Show; - RejectedVisible := Show; - // CurrForm.HonoredLCY.VISIBLE(Show); - // CurrForm.RejectedLCY.VISIBLE(Show); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocumentsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocumentsAnalysis.Page.al deleted file mode 100644 index 74d6923bd84..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ClosedDocumentsAnalysis.Page.al +++ /dev/null @@ -1,226 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.Currency; - -page 7000044 "Closed Documents Analysis" -{ - Caption = 'Closed Documents Analysis'; - DataCaptionExpression = Rec.GetFilter(Type); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SourceTable = "Closed Cartera Doc."; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CurrencyFilter; CurrencyFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Currency Filter'; - TableRelation = Currency; - ToolTip = 'Specifies the currencies that the data is included for.'; - - trigger OnValidate() - begin - CurrencyFilterOnAfterValidate(); - end; - } - } - group(Control23) - { - ShowCaption = false; - fixed(Control1902115401) - { - ShowCaption = false; - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - group("Original Amount") - { - Caption = 'Original Amount'; - field(Honored; HonoredAmt) - { - ApplicationArea = All; - AutoFormatExpression = ClosedDoc."Currency Code"; - AutoFormatType = 1; - Caption = 'Original Amount'; - Editable = false; - ToolTip = 'Specifies the initial amount of this closed document.'; - Visible = HonoredVisible; - } - field(Rejected; RejectedAmt) - { - ApplicationArea = All; - AutoFormatExpression = ClosedDoc."Currency Code"; - AutoFormatType = 1; - Editable = false; - Visible = RejectedVisible; - } - field(Rejected2; RedrawnAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = ClosedDoc."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - } - group("Original Amt. (LCY)") - { - Caption = 'Original Amt. (LCY)'; - field(HonoredLCY; HonoredAmtLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Original Amt. (LCY)'; - Editable = false; - ToolTip = 'Specifies the initial amount of this closed document, in LCY.'; - Visible = HonoredLCYVisible; - } - field(RejectedLCY; RejectedAmtLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - Visible = RejectedLCYVisible; - } - field(RejectedLCY2; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - } - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - trigger OnInit() - begin - RejectedLCYVisible := true; - HonoredLCYVisible := true; - RejectedVisible := true; - HonoredVisible := true; - end; - - trigger OnOpenPage() - begin - CurrencyFilter := Rec.GetFilter("Currency Code"); - UpdateStatistics(); - end; - - var - ClosedDoc: Record "Closed Cartera Doc."; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - CurrencyFilter: Code[250]; - HonoredVisible: Boolean; - RejectedVisible: Boolean; - HonoredLCYVisible: Boolean; - RejectedLCYVisible: Boolean; - - local procedure UpdateStatistics() - begin - ClosedDoc.Copy(Rec); - ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); - ClosedDoc.SetFilter("Currency Code", CurrencyFilter); - ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); - ClosedDoc.SetRange(Redrawn, true); - RedrawnAmt := 0; - RedrawnAmtLCY := 0; - if ClosedDoc.FindSet() then - repeat - RedrawnAmt += ClosedDoc."Original Amount"; - RedrawnAmtLCY += ClosedDoc."Original Amount (LCY)"; - until ClosedDoc.Next() = 0; - NoRedrawn := ClosedDoc.Count; - - ClosedDoc.SetRange(Redrawn, false); - HonoredAmt := 0; - HonoredAmtLCY := 0; - if ClosedDoc.FindSet() then - repeat - HonoredAmt += ClosedDoc."Original Amount"; - HonoredAmtLCY += ClosedDoc."Original Amount (LCY)"; - until ClosedDoc.Next() = 0; - NoHonored := ClosedDoc.Count; - ClosedDoc.SetRange(Redrawn); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); - RejectedAmt := 0; - RejectedAmtLCY := 0; - if ClosedDoc.FindSet() then - repeat - RejectedAmt += ClosedDoc."Original Amount"; - RejectedAmtLCY += ClosedDoc."Original Amount (LCY)"; - until ClosedDoc.Next() = 0; - - NoRejected := ClosedDoc.Count; - ClosedDoc.SetRange(Status); - - if ClosedDoc.Find('=><') then; // necessary to calculate decimal places - end; - - local procedure CurrencyFilterOnAfterValidate() - begin - UpdateStatistics(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CompanyInitializeCartera.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CompanyInitializeCartera.Codeunit.al deleted file mode 100644 index cf1f547206e..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/CompanyInitializeCartera.Codeunit.al +++ /dev/null @@ -1,64 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -codeunit 7000010 "Company-Initialize Cartera" -{ - - trigger OnRun() - begin - if not CarteraSetup.FindFirst() then begin - CarteraSetup.Init(); - CarteraSetup.Insert(); - end; - - InsertSourceCode(SourceCodeSetup."Cartera Journal", Text1100000, Text1100001); - - if not CarteraReportSelection.FindFirst() then begin - InsertBGPORepSelection(CarteraReportSelection.Usage::"Bill Group", '1', REPORT::"Bill Group Listing"); - InsertBGPORepSelection(CarteraReportSelection.Usage::"Posted Bill Group", '1', REPORT::"Posted Bill Group Listing"); - InsertBGPORepSelection(CarteraReportSelection.Usage::"Closed Bill Group", '1', REPORT::"Closed Bill Group Listing"); - InsertBGPORepSelection(CarteraReportSelection.Usage::Bill, '1', REPORT::"Receivable Bill"); - InsertBGPORepSelection(CarteraReportSelection.Usage::"Bill Group - Test", '1', REPORT::"Bill Group - Test"); - InsertBGPORepSelection(CarteraReportSelection.Usage::"Posted Payment Order", '1', REPORT::"Posted Payment Order Listing"); - InsertBGPORepSelection(CarteraReportSelection.Usage::"Closed Payment Order", '1', REPORT::"Closed Payment Order Listing"); - InsertBGPORepSelection(CarteraReportSelection.Usage::"Payment Order", '1', REPORT::"Payment Order Listing"); - InsertBGPORepSelection(CarteraReportSelection.Usage::"Payment Order - Test", '1', REPORT::"Payment Order - Test"); - end; - end; - - var - Text1100000: Label 'CARJNL'; - CarteraSetup: Record "Cartera Setup"; - SourceCode: Record "Source Code"; - SourceCodeSetup: Record "Source Code Setup"; - CarteraReportSelection: Record "Cartera Report Selections"; - Text1100001: Label 'Cartera Journal'; - - local procedure InsertSourceCode(var SourceCodeDefCode: Code[10]; "Code": Code[10]; Description: Text[50]) - begin - SourceCodeDefCode := Code; - SourceCode.Init(); - SourceCode.Code := Code; - SourceCode.Description := Description; - if SourceCode.Insert() then; - end; - - local procedure InsertBGPORepSelection(ReportUsage: Enum "Report Selection Usage Cartera"; Sequence: Code[10]; ReportID: Integer) - begin - CarteraReportSelection.Init(); - CarteraReportSelection.Usage := ReportUsage; - CarteraReportSelection.Sequence := Sequence; - CarteraReportSelection."Report ID" := ReportID; - CarteraReportSelection.Insert(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocPostBuffer.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocPostBuffer.Table.al deleted file mode 100644 index 1cfd7563ace..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocPostBuffer.Table.al +++ /dev/null @@ -1,44 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -table 7000011 "Doc. Post. Buffer" -{ - Caption = 'Doc. Post. Buffer'; - DataClassification = CustomerContent; - - fields - { - field(1; "Entry No."; Integer) - { - Caption = 'Entry No.'; - DataClassification = SystemMetadata; - } - field(2; "No. of Days"; Integer) - { - Caption = 'No. of Days'; - DataClassification = SystemMetadata; - } - field(3; Amount; Decimal) - { - AutoFormatType = 0; - Caption = 'Amount'; - DataClassification = SystemMetadata; - } - } - - keys - { - key(Key1; "Entry No.") - { - Clustered = true; - } - } - - fieldgroups - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentEdit.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentEdit.Codeunit.al deleted file mode 100644 index dc983499230..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentEdit.Codeunit.al +++ /dev/null @@ -1,75 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Purchases.Payables; -using Microsoft.Sales.Receivables; - -codeunit 7000008 "Document-Edit" -{ - Permissions = TableData "Cartera Doc." = imd, - TableData "Cust. Ledger Entry" = m, - TableData "Vendor Ledger Entry" = m, - TableData "Detailed Cust. Ledg. Entry" = m, - TableData "Detailed Vendor Ledg. Entry" = m; - TableNo = "Cartera Doc."; - - trigger OnRun() - begin - CarteraDoc := Rec; - CarteraDoc.LockTable(); - CarteraDoc.Find(); - CarteraDoc."Category Code" := Rec."Category Code"; - CarteraDoc."Direct Debit Mandate ID" := Rec."Direct Debit Mandate ID"; - if Rec."Bill Gr./Pmt. Order No." = '' then begin - CarteraDoc."Due Date" := Rec."Due Date"; - CarteraDoc."Cust./Vendor Bank Acc. Code" := Rec."Cust./Vendor Bank Acc. Code"; - CarteraDoc."Collection Agent" := Rec."Collection Agent"; - CarteraDoc.Accepted := Rec.Accepted; - end; - OnBeforeModifyCarteraDoc(CarteraDoc, Rec); - CarteraDoc.Modify(); - Rec := CarteraDoc; - end; - - var - CarteraDoc: Record "Cartera Doc."; - - [Scope('OnPrem')] - procedure EditDueDate(CarteraDoc: Record "Cartera Doc.") - var - CustLedgEntry: Record "Cust. Ledger Entry"; - VendLedgEntry: Record "Vendor Ledger Entry"; - DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; - DtldVendLedgEntry: Record "Detailed Vendor Ledg. Entry"; - begin - case CarteraDoc.Type of - CarteraDoc.Type::Receivable: - begin - CustLedgEntry.Get(CarteraDoc."Entry No."); - CustLedgEntry."Due Date" := CarteraDoc."Due Date"; - CustLedgEntry.Modify(); - DtldCustLedgEntry.SetCurrentKey("Cust. Ledger Entry No.", "Posting Date"); - DtldCustLedgEntry.SetRange("Cust. Ledger Entry No.", CustLedgEntry."Entry No."); - DtldCustLedgEntry.ModifyAll("Initial Entry Due Date", CarteraDoc."Due Date"); - end; - CarteraDoc.Type::Payable: - begin - VendLedgEntry.Get(CarteraDoc."Entry No."); - VendLedgEntry."Due Date" := CarteraDoc."Due Date"; - VendLedgEntry.Modify(); - DtldVendLedgEntry.SetCurrentKey("Vendor Ledger Entry No.", "Posting Date"); - DtldVendLedgEntry.SetRange("Vendor Ledger Entry No.", VendLedgEntry."Entry No."); - DtldVendLedgEntry.ModifyAll("Initial Entry Due Date", CarteraDoc."Due Date"); - end; - end; - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeModifyCarteraDoc(var CarteraDoc: Record "Cartera Doc."; CurrCarteraDoc: Record "Cartera Doc.") - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentMisc.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentMisc.Codeunit.al deleted file mode 100644 index b156af27efc..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentMisc.Codeunit.al +++ /dev/null @@ -1,264 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Purchases.Document; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.Customer; -using Microsoft.Sales.Document; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -codeunit 7000007 "Document-Misc" -{ - Permissions = TableData "Cust. Ledger Entry" = imd, - TableData "Vendor Ledger Entry" = imd, - TableData "Cartera Doc." = imd, - TableData "Posted Cartera Doc." = imd, - TableData "Closed Cartera Doc." = imd, - TableData "Posted Bill Group" = imd, - TableData "Closed Bill Group" = imd; - - trigger OnRun() - begin - end; - - var - Text1100000: Label 'This document is included in a posted bill group. Its %1 cannot be modified.'; - Text1100001: Label 'This document is closed. Its %1 cannot be modified.'; - Text1100002: Label 'This document is included in a posted payment order. Its %1 cannot be modified.'; - Text1100003: Label '%1 cannot be used in CSB Electronics Norms Exports.'; - Text1100004: Label '%1 cannot be used in CSB Electronic Norm Export No. 34./Norm Export No. 34.1'; - Text1100005: Label '%1 is not correct. Do you want to have it corrected?'; - Text1100006: Label 'This account has no control digit. Do you want to have it calculated?'; - Text1100007: Label 'Partial Bill settlement %1/%2'; - Text1100008: Label 'Partial Document settlement %1 Customer No. %2'; - Text1100009: Label 'Partial Document settlement %1'; - - procedure UpdateReceivableDueDate(var CustLedgEntry: Record "Cust. Ledger Entry") - var - Doc: Record "Cartera Doc."; - begin - if CustLedgEntry."Document Situation" = CustLedgEntry."Document Situation"::" " then - exit; - case CustLedgEntry."Document Situation" of - CustLedgEntry."Document Situation"::"BG/PO", CustLedgEntry."Document Situation"::Cartera: - begin - Doc.Get(Doc.Type::Receivable, CustLedgEntry."Entry No."); - Doc.Validate("Due Date", CustLedgEntry."Due Date"); - Doc.Modify(); - end; - CustLedgEntry."Document Situation"::"Posted BG/PO": - Error( - Text1100000, - CustLedgEntry.FieldCaption("Due Date")); - CustLedgEntry."Document Situation"::"Closed BG/PO", CustLedgEntry."Document Situation"::"Closed Documents": - Error( - Text1100001, - CustLedgEntry.FieldCaption("Due Date")); - end; - end; - - procedure UpdatePayableDueDate(var VendLedgEntry: Record "Vendor Ledger Entry") - var - Doc: Record "Cartera Doc."; - begin - if VendLedgEntry."Document Situation" = VendLedgEntry."Document Situation"::" " then - exit; - case VendLedgEntry."Document Situation" of - VendLedgEntry."Document Situation"::"BG/PO", VendLedgEntry."Document Situation"::Cartera: - begin - Doc.Get(Doc.Type::Payable, VendLedgEntry."Entry No."); - Doc."Due Date" := VendLedgEntry."Due Date"; - Doc.Modify(); - end; - VendLedgEntry."Document Situation"::"Posted BG/PO": - Error( - Text1100002, - VendLedgEntry.FieldCaption("Due Date")); - VendLedgEntry."Document Situation"::"Closed BG/PO", VendLedgEntry."Document Situation"::"Closed Documents": - Error( - Text1100001, - VendLedgEntry.FieldCaption("Due Date")); - end; - end; - - procedure DocType(PmtMethodCode: Code[10]): Code[10] - var - PaymentMethod: Record "Payment Method"; - begin - PaymentMethod.Get(PmtMethodCode); - case PaymentMethod."Bill Type" of - PaymentMethod."Bill Type"::"Bill of Exchange": - exit('1'); - PaymentMethod."Bill Type"::Receipt: - exit('2'); - PaymentMethod."Bill Type"::IOU: - exit('3'); - else - Error(Text1100003, PmtMethodCode); - end; - end; - - procedure DocType2(PmtMethodCode: Code[10]): Code[10] - var - PaymentMethod: Record "Payment Method"; - begin - PaymentMethod.Get(PmtMethodCode); - case PaymentMethod."Bill Type" of - PaymentMethod."Bill Type"::Check: - exit('4'); - PaymentMethod."Bill Type"::Transfer: - exit('5'); - else - Error(Text1100004, PmtMethodCode); - end; - end; - - procedure CalcControlDigit(Branch: Text[30]; Bank: Text[30]): Text[2] - var - CarteraSetup: Record "Cartera Setup"; - Weight: Text[30]; - Digit1: Integer; - Digit2: Integer; - i: Integer; - BranchDigit: Integer; - BankDigit: Integer; - WeightDigit: Integer; - begin - CarteraSetup.Get(); - Weight := CarteraSetup."CCC Ctrl Digits Check String"; - Digit1 := 0; - Digit2 := 0; - - for i := 1 to StrLen(Branch) do begin - Evaluate(BranchDigit, CopyStr(Branch, StrLen(Branch) - i + 1, 1)); - case i of - 1 .. 4: - Evaluate(WeightDigit, CopyStr(Weight, i, 1)); - 5: - Evaluate(WeightDigit, CopyStr(Weight, i, 2)); - 6 .. 11: - Evaluate(WeightDigit, CopyStr(Weight, i + 1, 1)); - end; - Digit1 := Digit1 + (BranchDigit * WeightDigit); - end; - Digit1 := 11 - (Digit1 mod 11); - - if Digit1 = 10 then - Digit1 := 1; - if Digit1 = 11 then - Digit1 := 0; - - for i := 1 to StrLen(Bank) do begin - Evaluate(BankDigit, CopyStr(Bank, StrLen(Bank) - i + 1, 1)); - case i of - 1 .. 4: - Evaluate(WeightDigit, CopyStr(Weight, i, 1)); - 5: - Evaluate(WeightDigit, CopyStr(Weight, i, 2)); - 6 .. 11: - Evaluate(WeightDigit, CopyStr(Weight, i + 1, 1)); - end; - Digit2 := Digit2 + (BankDigit * WeightDigit); - end; - Digit2 := 11 - (Digit2 mod 11); - - if Digit2 = 10 then - Digit2 := 1; - if Digit2 = 11 then - Digit2 := 0; - - exit(Format(Digit1) + Format(Digit2)); - end; - - procedure CheckControlDigit(var CustCCCControlDigits: Text[2]; CustCCCBankBranchNo: Text[30]; CustCCCAccNo: Text[30]; Cust2: Text[30]) - var - CarteraSetup: Record "Cartera Setup"; - CustBankAcc: Record "Customer Bank Account"; - MessageTxt: Text[150]; - begin - CarteraSetup.Get(); - if CarteraSetup."CCC Ctrl Digits Check String" <> '' then - if CustCCCControlDigits <> '' then begin - if CalcControlDigit(CustCCCBankBranchNo + Cust2, CustCCCAccNo) <> CustCCCControlDigits then begin - MessageTxt := StrSubstNo( - Text1100005, - CustBankAcc.FieldCaption("CCC Control Digits")); - if not Confirm(MessageTxt) then - CustCCCControlDigits := '**' - else - CustCCCControlDigits := CalcControlDigit(CustCCCBankBranchNo + Cust2, CustCCCAccNo); - end - end else - if not Confirm(Text1100006) then - CustCCCControlDigits := '**' - else - CustCCCControlDigits := CalcControlDigit(CustCCCBankBranchNo + Cust2, CustCCCAccNo) - else - if CustCCCControlDigits = '' then - CustCCCControlDigits := '**'; - end; - - procedure FilterGLEntry(var GLEntry: Record "G/L Entry"; AccNo: Code[20]; DocNo: Code[20]; BillNo: Code[20]; TypeDoc: Option Bill,Invoice; CustAccNo: Code[20]) - var - Description2: Text[50]; - begin - GLEntry.SetCurrentKey("G/L Account No.", Description); - GLEntry.SetRange("G/L Account No.", AccNo); - if TypeDoc = TypeDoc::Bill then - Description2 := CopyStr( - StrSubstNo(Text1100007, DocNo, BillNo), - 1, MaxStrLen(GLEntry.Description)) - else - if CustAccNo <> '' then - Description2 := CopyStr( - StrSubstNo(Text1100008, - DocNo, - CustAccNo), 1, MaxStrLen(GLEntry.Description)) - else - Description2 := CopyStr( - StrSubstNo(Text1100009, DocNo), - 1, MaxStrLen(GLEntry.Description)); - GLEntry.SetRange(Description, Description2); - end; - - procedure GetRegisterCode(CurrCode: Code[10]; var RegisterCode: Integer; var RegisterString: Text[2]): Boolean - var - CarteraSetup: Record "Cartera Setup"; - begin - CarteraSetup.Get(); - if CurrCode = CarteraSetup."Euro Currency Code" then begin - RegisterCode := 50; - RegisterString := '65'; - exit(true); - end; - end; - - procedure CheckBankSuffix(SuffixBankAccNo: Code[20]; BillGrBankAccNo: Code[20]): Boolean - begin - if SuffixBankAccNo <> BillGrBankAccNo then - exit(false); - - exit(true); - end; - - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Quote to Order", 'OnAfterInsertAllSalesOrderLines', '', false, false)] - local procedure RecalculateDiscountOnAfterInsertAllSalesOrderLines(var SalesOrderLine: Record "Sales Line"; SalesQuoteHeader: Record "Sales Header") - begin - if SalesQuoteHeader."Payment Discount %" <> 0 then - CODEUNIT.Run(CODEUNIT::"Sales-Calc. Discount", SalesOrderLine); - end; - - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Quote to Order", 'OnAfterInsertAllPurchOrderLines', '', false, false)] - local procedure RecalculateDiscountOnAfterInsertAllPurchOrderLines(var PurchOrderLine: Record "Purchase Line"; PurchQuoteHeader: Record "Purchase Header") - begin - if PurchQuoteHeader."Payment Discount %" <> 0 then - CODEUNIT.Run(CODEUNIT::"Purch.-Calc.Discount", PurchOrderLine); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentMove.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentMove.Codeunit.al deleted file mode 100644 index abe337ff69a..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentMove.Codeunit.al +++ /dev/null @@ -1,128 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Foundation.Period; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Purchases.Vendor; -using Microsoft.Sales.Customer; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -codeunit 7000004 "Document-Move" -{ - Permissions = TableData "Closed Cartera Doc." = imd, - TableData "Closed Bill Group" = imd, - TableData "Closed Payment Order" = imd; - - trigger OnRun() - begin - end; - - var - Text1100000: Label 'You cannot delete a bank account with bill groups in preparation.'; - Text1100001: Label 'You cannot delete a bank account with bill groups.'; - Text1100002: Label 'You cannot delete a bank account with closed bill groups in a fiscal year that has not been closed yet.'; - Text1100003: Label 'You cannot delete a bank account with payment orders in preparation.'; - Text1100004: Label 'You cannot delete a bank account with payment orders.'; - Text1100005: Label 'You cannot delete a bank account with closed payment orders in a fiscal year that has not been closed yet.'; - AccountingPeriod: Record "Accounting Period"; - BillGr: Record "Bill Group"; - BillGr2: Record "Bill Group"; - PostedBillGr: Record "Posted Bill Group"; - PostedBillGr2: Record "Posted Bill Group"; - ClosedBillGr: Record "Closed Bill Group"; - ClosedBillGr2: Record "Closed Bill Group"; - ClosedDoc: Record "Closed Cartera Doc."; - PmtOrd: Record "Payment Order"; - PmtOrd2: Record "Payment Order"; - PostedPmtOrd: Record "Posted Payment Order"; - PostedPmtOrd2: Record "Posted Payment Order"; - ClosedPmtOrd: Record "Closed Payment Order"; - ClosedPmtOrd2: Record "Closed Payment Order"; - - [Scope('OnPrem')] - procedure MoveBankAccDocs(BankAcc: Record "Bank Account") - begin - BillGr.LockTable(); - if BillGr2.FindLast() then; - BillGr.Reset(); - BillGr.SetCurrentKey("Bank Account No."); - BillGr.SetRange("Bank Account No.", BankAcc."No."); - if BillGr.FindFirst() then - Error(Text1100000); - - PostedBillGr.LockTable(); - if PostedBillGr2.FindLast() then; - PostedBillGr.Reset(); - PostedBillGr.SetCurrentKey("Bank Account No."); - PostedBillGr.SetRange("Bank Account No.", BankAcc."No."); - if PostedBillGr.FindFirst() then - Error(Text1100001); - - ClosedBillGr.LockTable(); - if ClosedBillGr2.FindLast() then; - ClosedBillGr.Reset(); - ClosedBillGr.SetCurrentKey("Bank Account No."); - ClosedBillGr.SetRange("Bank Account No.", BankAcc."No."); - AccountingPeriod.SetRange(Closed, false); - if AccountingPeriod.FindFirst() then - ClosedBillGr.SetFilter("Closing Date", '>=%1', AccountingPeriod."Starting Date"); - if ClosedBillGr.FindFirst() then - Error(Text1100002); - ClosedBillGr.SetRange("Closing Date"); - ClosedBillGr.ModifyAll("Bank Account No.", ''); - - PmtOrd.LockTable(); - if PmtOrd2.FindLast() then; - PmtOrd.Reset(); - PmtOrd.SetCurrentKey("Bank Account No."); - PmtOrd.SetRange("Bank Account No.", BankAcc."No."); - if PmtOrd.FindFirst() then - Error(Text1100003); - - PostedPmtOrd.LockTable(); - if PostedPmtOrd2.FindLast() then; - PostedPmtOrd.Reset(); - PostedPmtOrd.SetCurrentKey("Bank Account No."); - PostedPmtOrd.SetRange("Bank Account No.", BankAcc."No."); - if PostedPmtOrd.FindFirst() then - Error(Text1100004); - - ClosedPmtOrd.LockTable(); - if ClosedPmtOrd2.FindLast() then; - ClosedPmtOrd.Reset(); - ClosedPmtOrd.SetCurrentKey("Bank Account No."); - ClosedPmtOrd.SetRange("Bank Account No.", BankAcc."No."); - AccountingPeriod.SetRange(Closed, false); - if AccountingPeriod.FindFirst() then - ClosedPmtOrd.SetFilter("Closing Date", '>=%1', AccountingPeriod."Starting Date"); - if ClosedPmtOrd.FindFirst() then - Error(Text1100005); - ClosedPmtOrd.SetRange("Closing Date"); - ClosedPmtOrd.ModifyAll("Bank Account No.", ''); - end; - - [Scope('OnPrem')] - procedure MoveReceivableDocs(Cust: Record Customer) - begin - ClosedDoc.Reset(); - ClosedDoc.SetCurrentKey("Account No.", "Honored/Rejtd. at Date"); - ClosedDoc.SetRange("Account No.", Cust."No."); - ClosedDoc.ModifyAll("Account No.", ''); - end; - - [Scope('OnPrem')] - procedure MovePayableDocs(Vend: Record Vendor) - begin - ClosedDoc.Reset(); - ClosedDoc.SetCurrentKey("Account No.", "Honored/Rejtd. at Date"); - ClosedDoc.SetRange("Account No.", Vend."No."); - ClosedDoc.ModifyAll("Account No.", ''); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentPost.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentPost.Codeunit.al deleted file mode 100644 index 460b09959ea..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentPost.Codeunit.al +++ /dev/null @@ -1,1297 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.EServices.EDocument; -using Microsoft.Finance.Analysis; -using Microsoft.Finance.Currency; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Foundation.Company; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.Customer; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; -using System.Security.User; - -codeunit 7000006 "Document-Post" -{ - Permissions = TableData "Cust. Ledger Entry" = imd, - TableData "Vendor Ledger Entry" = imd, - TableData "Detailed Cust. Ledg. Entry" = imd, - TableData "Detailed Vendor Ledg. Entry" = imd, - TableData "Cartera Doc." = imd, - TableData "Posted Cartera Doc." = imd, - TableData "Closed Cartera Doc." = imd, - TableData "Posted Bill Group" = imd, - TableData "Closed Bill Group" = imd, - TableData "Posted Payment Order" = imd, - TableData "Closed Payment Order" = imd; - - trigger OnRun() - begin - end; - - var - JournalErrorsMgt: Codeunit "Journal Errors Mgt."; - Text1100000: Label 'must be of a type that creates bills'; - Text1100001: Label 'A customer or vendor must be specified when a bill is created.'; - Text1100004: Label 'Sales Bill %1/%2 already exists.'; - Text1100005: Label 'Purchase Document %1/%2 already exists.'; - Text1100006: Label 'Receivable %1 %2/%3 cannot be applied to, because it is included in a posted Bill Group.'; - Text1100007: Label 'Payable %1 %2/%3 cannot be applied to, because it is included in a posted Payment Order.'; - Text1100008: Label 'Date %1 is not within your range of allowed posting dates'; - Text1100009: Label '%1 must be entered.'; - Text1100010: Label '%1 must be of a type that creates bills.'; - Text1100011: Label 'A grouped document cannot be settled from a journal. Remove it from its group or payment order and try again.'; - Text1100012: Label 'cannot be filtered when posting recurring journals'; - Text1100013: Label 'Do you want to post the journal lines and print the posting report?'; - Text1100014: Label 'Do you want to post the journal lines?'; - Text1100016: Label 'The journal lines were successfully posted.'; - Text1100017: Label 'The journal lines were successfully posted. You are now in the %1 journal.'; - CarteraDocBillGroupErr: Label 'A grouped document cannot be settled from a journal.\Remove Document %1/%2 from Group/Pmt. Order %3 and try again.', Comment = '%1=Document Number,%2=Bill number,%3=Bill Group number.'; - - procedure CheckGenJnlLine(var GenJnlLine: Record "Gen. Journal Line") - var - CarteraDoc: Record "Cartera Doc."; - PaymentMethod: Record "Payment Method"; - SystemCreated: Boolean; - CarteraDocType: Enum "Cartera Document Type"; - begin - if (GenJnlLine."Document Type" = GenJnlLine."Document Type"::Invoice) and - (GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]) and - (GenJnlLine.Amount <> 0) - then begin - GenJnlLine.TestField("Payment Method Code"); - GenJnlLine.TestField("Payment Terms Code"); - end; - if (GenJnlLine."Document Type" = GenJnlLine."Document Type"::Bill) and - (GenJnlLine.Amount <> 0) - then begin - GenJnlLine.TestField("Bill No."); - GenJnlLine.TestField("Due Date"); - GenJnlLine.TestField("Payment Method Code"); - PaymentMethod.Get(GenJnlLine."Payment Method Code"); - if not PaymentMethod."Create Bills" then - GenJnlLine.FieldError("Payment Method Code", Text1100000); - if not (GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]) then - Error(Text1100001) - end; - if GenJnlLine."Document Type" = GenJnlLine."Document Type"::"Credit Memo" then - SystemCreated := false - else - SystemCreated := GenJnlLine."System-Created Entry"; - - if (GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]) and - (GenJnlLine."Applies-to Doc. Type" in [GenJnlLine."Applies-to Doc. Type"::Bill, GenJnlLine."Applies-to Doc. Type"::Invoice]) and - not SystemCreated - then begin - if GenJnlLine."Account Type" = GenJnlLine."Account Type"::Customer then - CarteraDocType := CarteraDoc.Type::Receivable - else - CarteraDocType := CarteraDoc.Type::Payable; - CheckCarteraDocsForBillGroups(CarteraDocType, GenJnlLine."Applies-to Doc. No.", GenJnlLine."Applies-to Bill No."); - CheckPostedCarteraDocsForBillGroups(CarteraDocType, GenJnlLine."Applies-to Doc. No.", GenJnlLine."Applies-to Bill No."); - end; - OnAfterCheckGenJnlLine(GenJnlLine); - end; - - procedure CreateReceivableDoc(GenJnlLine: Record "Gen. Journal Line"; var CVLedgEntryBuf: Record "CV Ledger Entry Buffer"; IsFromJournal: Boolean) - var - CarteraDoc: Record "Cartera Doc."; - CompanyInfo: Record "Company Information"; - OldCustLedgEntry: Record "Cust. Ledger Entry"; - CustBankAccCode: Record "Customer Bank Account"; - begin - CarteraDoc.Init(); - GJLInfoToDoc(GenJnlLine, CarteraDoc); - CarteraDoc.Type := CarteraDoc.Type::Receivable; - CarteraDoc."Entry No." := CVLedgEntryBuf."Entry No."; - CarteraDoc."Remaining Amount" := CVLedgEntryBuf."Remaining Amount"; - CarteraDoc."Remaining Amt. (LCY)" := CVLedgEntryBuf."Remaining Amt. (LCY)"; - CarteraDoc."Original Amount" := CVLedgEntryBuf."Remaining Amount"; - CarteraDoc."Original Amount (LCY)" := CVLedgEntryBuf."Remaining Amt. (LCY)"; - if CompanyInfo.Get() and CustBankAccCode.Get(CVLedgEntryBuf."CV No.", GenJnlLine."Recipient Bank Account") then - CarteraDoc.Place := CopyStr(CompanyInfo."Post Code", 1, 2) = CopyStr(CustBankAccCode."Post Code", 1, 2); - // Check the Doc no. - OldCustLedgEntry.Reset(); - OldCustLedgEntry.SetCurrentKey("Document No.", "Document Type", "Customer No."); - OldCustLedgEntry.SetRange("Document No.", CVLedgEntryBuf."Document No."); - if GenJnlLine."Document Type" = GenJnlLine."Document Type"::Bill then - OldCustLedgEntry.SetRange("Document Type", OldCustLedgEntry."Document Type"::Bill) - else - if GenJnlLine."Document Type" = GenJnlLine."Document Type"::Invoice then - OldCustLedgEntry.SetRange("Document Type", OldCustLedgEntry."Document Type"::Invoice); - OldCustLedgEntry.SetRange("Bill No.", CVLedgEntryBuf."Bill No."); - if OldCustLedgEntry.FindFirst() then - Error( - Text1100004, - CVLedgEntryBuf."Document No.", CVLedgEntryBuf."Bill No."); - - if IsFromJournal then - CarteraDoc."From Journal" := true; - - OnBeforeCreateReceivableDoc(CarteraDoc, GenJnlLine, CVLedgEntryBuf); - CarteraDoc.Insert(); - OnAfterCreateReceivableDoc(CarteraDoc, GenJnlLine, CVLedgEntryBuf); - CVLedgEntryBuf."Document Situation" := CVLedgEntryBuf."Document Situation"::Cartera; - CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open; - end; - - procedure CreatePayableDoc(GenJnlLine: Record "Gen. Journal Line"; var CVLedgEntryBuf: Record "CV Ledger Entry Buffer"; IsFromJournal: Boolean) - var - CarteraDoc: Record "Cartera Doc."; - OldVendLedgEntry: Record "Vendor Ledger Entry"; - ElectPmtMgmt: Codeunit "Elect. Pmts Management"; - begin - CarteraDoc.Init(); - GJLInfoToDoc(GenJnlLine, CarteraDoc); - CarteraDoc.Type := CarteraDoc.Type::Payable; - CarteraDoc."Entry No." := CVLedgEntryBuf."Entry No."; - CarteraDoc."Remaining Amount" := -CVLedgEntryBuf."Remaining Amount"; - CarteraDoc."Remaining Amt. (LCY)" := -CVLedgEntryBuf."Remaining Amt. (LCY)"; - CarteraDoc."Original Amount" := -CVLedgEntryBuf."Remaining Amount"; - CarteraDoc."Original Amount (LCY)" := -CVLedgEntryBuf."Remaining Amt. (LCY)"; - // Check the Doc no. - OldVendLedgEntry.Reset(); - OldVendLedgEntry.SetCurrentKey("Document No.", "Document Type", "Vendor No."); - OldVendLedgEntry.SetRange("Document No.", CVLedgEntryBuf."Document No."); - if GenJnlLine."Document Type" = GenJnlLine."Document Type"::Bill then - OldVendLedgEntry.SetRange("Document Type", OldVendLedgEntry."Document Type"::Bill) - else - if GenJnlLine."Document Type" = GenJnlLine."Document Type"::Invoice then - OldVendLedgEntry.SetRange("Document Type", OldVendLedgEntry."Document Type"::Invoice); - OldVendLedgEntry.SetRange("Bill No.", CVLedgEntryBuf."Bill No."); - if OldVendLedgEntry.FindFirst() then - Error( - Text1100005, - CVLedgEntryBuf."Document No.", CVLedgEntryBuf."Bill No."); - - if IsFromJournal then - CarteraDoc."From Journal" := true; - - ElectPmtMgmt.GetTransferType(CarteraDoc."Account No.", CarteraDoc."Remaining Amount", CarteraDoc."Transfer Type", true); - - OnBeforeCreatePayableDoc(CarteraDoc, GenJnlLine, CVLedgEntryBuf); - CarteraDoc.Insert(); - OnAfterCreatePayableDoc(CarteraDoc, GenJnlLine, CVLedgEntryBuf); - CVLedgEntryBuf."Document Situation" := CVLedgEntryBuf."Document Situation"::Cartera; - CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open; - end; - - procedure GJLInfoToDoc(var GenJnlLine: Record "Gen. Journal Line"; var CarteraDoc: Record "Cartera Doc.") - var - PaymentMethod: Record "Payment Method"; - CompanyInfo: Record "Company Information"; - CustBankAcc: Record "Customer Bank Account"; - Cust: Record Customer; - begin - CarteraDoc."No." := GenJnlLine."Bill No."; - CarteraDoc."Posting Date" := GenJnlLine."Posting Date"; - CarteraDoc."Document No." := GenJnlLine."Document No."; - CarteraDoc."Original Document No." := GenJnlLine."Document No."; - CarteraDoc.Description := GenJnlLine.Description; - CarteraDoc."Due Date" := GenJnlLine."Due Date"; - CarteraDoc."Payment Method Code" := GenJnlLine."Payment Method Code"; - PaymentMethod.Get(GenJnlLine."Payment Method Code"); - if PaymentMethod."Submit for Acceptance" then - CarteraDoc.Accepted := CarteraDoc.Accepted::No - else - CarteraDoc.Accepted := CarteraDoc.Accepted::"Not Required"; - CarteraDoc."Collection Agent" := PaymentMethod."Collection Agent"; - CarteraDoc."Account No." := GenJnlLine."Account No."; - CarteraDoc."Currency Code" := GenJnlLine."Currency Code"; - CarteraDoc."Cust./Vendor Bank Acc. Code" := - CopyStr(GenJnlLine."Recipient Bank Account", 1, MaxStrLen(CarteraDoc."Cust./Vendor Bank Acc. Code")); - CarteraDoc."Global Dimension 1 Code" := GenJnlLine."Shortcut Dimension 1 Code"; - CarteraDoc."Global Dimension 2 Code" := GenJnlLine."Shortcut Dimension 2 Code"; - CarteraDoc."Dimension Set ID" := GenJnlLine."Dimension Set ID"; - CarteraDoc."Direct Debit Mandate ID" := GenJnlLine."Direct Debit Mandate ID"; - case GenJnlLine."Document Type" of - GenJnlLine."Document Type"::Bill: - CarteraDoc."Document Type" := CarteraDoc."Document Type"::Bill; - GenJnlLine."Document Type"::Invoice: - CarteraDoc."Document Type" := CarteraDoc."Document Type"::Invoice; - GenJnlLine."Document Type"::"Credit Memo": - CarteraDoc."Document Type" := CarteraDoc."Document Type"::"Credit Memo"; - end; - if GenJnlLine."Account Type" = GenJnlLine."Account Type"::Customer then begin - CompanyInfo.Get(); - if GenJnlLine."Recipient Bank Account" <> '' then begin - CustBankAcc.Get(GenJnlLine."Account No.", GenJnlLine."Recipient Bank Account"); - CarteraDoc.Place := CompanyInfo."Post Code" = CustBankAcc."Post Code"; - OnGJLInfoToDocOnBeforeExit(CarteraDoc, GenJnlLine); - exit; - end; - Cust.Get(GenJnlLine."Account No."); - CarteraDoc.Place := CompanyInfo."Post Code" = Cust."Post Code"; - end; - OnAfterGJLInfoToDoc(CarteraDoc, GenJnlLine); - end; - - procedure UpdateReceivableDoc(var CustLedgEntry: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line"; AppliedAmountLCY: Decimal; var DocAmountLCY: Decimal; var RejDocAmountLCY: Decimal; var DiscDocAmountLCY: Decimal; var CollDocAmountLCY: Decimal; var DiscRiskFactAmountLCY: Decimal; var DiscUnriskFactAmountLCY: Decimal; var CollFactAmountLCY: Decimal) - var - CarteraDoc: Record "Cartera Doc."; - PostedCarteraDoc: Record "Posted Cartera Doc."; - ClosedCarteraDoc: Record "Closed Cartera Doc."; - CarteraDoc2: Record "Cartera Doc."; - PostedCarteraDoc2: Record "Posted Cartera Doc."; - ClosedCarteraDoc2: Record "Closed Cartera Doc."; - PostedBillGroup: Record "Posted Bill Group"; - Currency: Record Currency; - DocLock: Boolean; - begin - OnBeforeUpdateReceivableDoc(CustLedgEntry); - if not DocLock then begin - DocLock := true; - CarteraDoc.LockTable(); - PostedCarteraDoc.LockTable(); - ClosedCarteraDoc.LockTable(); - if CarteraDoc2.FindLast() then; - if PostedCarteraDoc2.FindLast() then; - if ClosedCarteraDoc2.FindLast() then; - end; - if CustLedgEntry."Remaining Amount" = 0 then - CustLedgEntry."Remaining Amt. (LCY)" := 0; - if CustLedgEntry."Document Situation" <> CustLedgEntry."Document Situation"::Cartera then - AppliedAmountLCY := Round(AppliedAmountLCY); - case CustLedgEntry."Document Situation" of - CustLedgEntry."Document Situation"::" ", CustLedgEntry."Document Situation"::Cartera: - begin - CarteraDoc.Get(CarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); - if CarteraDoc."Currency Code" = '' then - CarteraDoc."Remaining Amount" := CarteraDoc."Remaining Amount" + AppliedAmountLCY - else begin - Currency.Get(CarteraDoc."Currency Code"); - Currency.InitRoundingPrecision(); - CarteraDoc."Remaining Amount" := - CarteraDoc."Remaining Amount" + - Round(AppliedAmountLCY * CustLedgEntry."Original Currency Factor", Currency."Amount Rounding Precision"); - end; - CarteraDoc."Remaining Amt. (LCY)" := - Round(CarteraDoc."Remaining Amount" / CustLedgEntry."Original Currency Factor", Currency."Amount Rounding Precision"); - - AppliedAmountLCY := Round(AppliedAmountLCY); - if CarteraDoc."Document Type" = CarteraDoc."Document Type"::Bill then - DocAmountLCY := DocAmountLCY + AppliedAmountLCY; - CarteraDoc.ResetNoPrinted(); - if CustLedgEntry.Open then - CarteraDoc.Modify() - else begin - ClosedCarteraDoc.TransferFields(CarteraDoc); - ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Honored; - ClosedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; - ClosedCarteraDoc."Bill Gr./Pmt. Order No." := ''; - ClosedCarteraDoc."Remaining Amount" := 0; - ClosedCarteraDoc."Remaining Amt. (LCY)" := 0; - ClosedCarteraDoc."Amount for Collection" := 0; - ClosedCarteraDoc."Amt. for Collection (LCY)" := 0; - ClosedCarteraDoc.Insert(); - CarteraDoc.Delete(); - CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::"Closed Documents"; - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Honored; - if CustLedgEntry."Document Type" <> CustLedgEntry."Document Type"::Invoice then - CustLedgEntry.Modify(); - end; - end; - CustLedgEntry."Document Situation"::"Posted BG/PO": - begin - PostedCarteraDoc.Get(PostedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); - PostedCarteraDoc."Remaining Amount" := CustLedgEntry."Remaining Amount"; - PostedCarteraDoc."Remaining Amt. (LCY)" := CustLedgEntry."Remaining Amt. (LCY)"; - if PostedCarteraDoc.Factoring = PostedCarteraDoc.Factoring::" " then begin - if PostedCarteraDoc.Status = PostedCarteraDoc.Status::Rejected then - RejDocAmountLCY := RejDocAmountLCY + AppliedAmountLCY - else - if PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount then - DiscDocAmountLCY := DiscDocAmountLCY + AppliedAmountLCY - else - CollDocAmountLCY := CollDocAmountLCY + AppliedAmountLCY; - end else - case true of - PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount: - begin - PostedBillGroup.Get(PostedCarteraDoc."Bill Gr./Pmt. Order No."); - if PostedBillGroup.Factoring = PostedBillGroup.Factoring::Risked then - DiscRiskFactAmountLCY := DiscRiskFactAmountLCY + AppliedAmountLCY - else - DiscUnriskFactAmountLCY := DiscUnriskFactAmountLCY + AppliedAmountLCY - end; - else - CollFactAmountLCY := CollFactAmountLCY + AppliedAmountLCY; - end; - - UpdateReceivableCurrFact( - PostedCarteraDoc, AppliedAmountLCY, DocAmountLCY, RejDocAmountLCY, DiscDocAmountLCY, CollDocAmountLCY, - DiscRiskFactAmountLCY, DiscUnriskFactAmountLCY, CollFactAmountLCY); - if not CustLedgEntry.Open then begin - if GenJnlLine."Document Type" <> GenJnlLine."Document Type"::Payment then - if PostedCarteraDoc.Status = ClosedCarteraDoc.Status::Rejected then - PostedCarteraDoc.Redrawn := true; - PostedCarteraDoc.Status := PostedCarteraDoc.Status::Honored; - PostedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; - PostedCarteraDoc."Remaining Amount" := 0; - PostedCarteraDoc."Remaining Amt. (LCY)" := 0; - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Honored; - if PostedCarteraDoc.Redrawn then - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Redrawn; - CustLedgEntry.Modify(); - end; - PostedCarteraDoc.Modify(); - end; - CustLedgEntry."Document Situation"::"Closed BG/PO", CustLedgEntry."Document Situation"::"Closed Documents": - begin - ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); - ClosedCarteraDoc.TestField(Status, ClosedCarteraDoc.Status::Rejected); - ClosedCarteraDoc."Remaining Amount" := CustLedgEntry."Remaining Amount"; - ClosedCarteraDoc."Remaining Amt. (LCY)" := CustLedgEntry."Remaining Amt. (LCY)"; - if not CustLedgEntry.Open then begin - if GenJnlLine."Document Type" <> GenJnlLine."Document Type"::Payment then begin - ClosedCarteraDoc.Redrawn := true; - ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Rejected; - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Rejected; - end else - if CustLedgEntry."Remaining Amount" = 0 then begin - ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Honored; - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Honored; - end; - ClosedCarteraDoc."Remaining Amount" := 0; - ClosedCarteraDoc."Remaining Amt. (LCY)" := 0; - ClosedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; - if ClosedCarteraDoc.Redrawn then - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Redrawn; - CustLedgEntry.Modify(); - end; - ClosedCarteraDoc.Modify(); - CustLedgEntry.Modify(); - if (ClosedCarteraDoc."Document Type" = ClosedCarteraDoc."Document Type"::Bill) or - (ClosedCarteraDoc."Document Type" = ClosedCarteraDoc."Document Type"::Invoice) - then - RejDocAmountLCY := RejDocAmountLCY + AppliedAmountLCY; - end; - end; - end; - - procedure UpdatePayableDoc(var VendLedgEntry: Record "Vendor Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line"; var DocAmountLCY: Decimal; AppliedAmountLCY: Decimal; var DocLock: Boolean; var CollDocAmountLCY: Decimal) - var - CarteraDoc: Record "Cartera Doc."; - PostedCarteraDoc: Record "Posted Cartera Doc."; - ClosedCarteraDoc: Record "Closed Cartera Doc."; - CarteraDoc2: Record "Cartera Doc."; - PostedCarteraDoc2: Record "Posted Cartera Doc."; - ClosedCarteraDoc2: Record "Closed Cartera Doc."; - Currency: Record Currency; - MultiplePostingGroups: Boolean; - begin - if not DocLock then begin - DocLock := true; - CarteraDoc.LockTable(); - PostedCarteraDoc.LockTable(); - if CarteraDoc2.FindLast() then; - if PostedCarteraDoc2.FindLast() then; - if ClosedCarteraDoc2.FindLast() then; - ClosedCarteraDoc.LockTable(); - end; - if VendLedgEntry."Remaining Amount" = 0 then - VendLedgEntry."Remaining Amt. (LCY)" := 0; - if VendLedgEntry."Document Situation" <> VendLedgEntry."Document Situation"::Cartera then - AppliedAmountLCY := Round(AppliedAmountLCY); - case VendLedgEntry."Document Situation" of - VendLedgEntry."Document Situation"::" ", VendLedgEntry."Document Situation"::Cartera: - begin - CarteraDoc.Get(CarteraDoc.Type::Payable, VendLedgEntry."Entry No."); - if CarteraDoc."Currency Code" = '' then - CarteraDoc."Remaining Amount" := CarteraDoc."Remaining Amount" - AppliedAmountLCY - else begin - Currency.Get(CarteraDoc."Currency Code"); - Currency.InitRoundingPrecision(); - CarteraDoc."Remaining Amount" := - CarteraDoc."Remaining Amount" - - Round(AppliedAmountLCY * VendLedgEntry."Original Currency Factor", Currency."Amount Rounding Precision"); - end; - CarteraDoc."Remaining Amt. (LCY)" := - Round(CarteraDoc."Remaining Amount" / VendLedgEntry."Original Currency Factor", Currency."Amount Rounding Precision"); - - AppliedAmountLCY := Round(AppliedAmountLCY); - if CarteraDoc."Document Type" = CarteraDoc."Document Type"::Bill then - DocAmountLCY := DocAmountLCY + AppliedAmountLCY; - - MultiplePostingGroups := CheckVendMultiplePostingGroups(VendLedgEntry); - - if (CarteraDoc."Document Type" = CarteraDoc."Document Type"::Invoice) and - (MultiplePostingGroups) - then - DocAmountLCY := DocAmountLCY + AppliedAmountLCY; - - CarteraDoc.ResetNoPrinted(); - if VendLedgEntry.Open then begin - OnUpdatePayableDocBeforeCarteraDocModify(CarteraDoc, VendLedgEntry); - CarteraDoc.Modify(); - end else begin - ClosedCarteraDoc.TransferFields(CarteraDoc); - ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Honored; - ClosedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; - ClosedCarteraDoc."Bill Gr./Pmt. Order No." := ''; - ClosedCarteraDoc."Remaining Amount" := 0; - ClosedCarteraDoc."Remaining Amt. (LCY)" := 0; - ClosedCarteraDoc."Amount for Collection" := 0; - ClosedCarteraDoc."Amt. for Collection (LCY)" := 0; - OnUpdatePayableDocBeforeClosedCarteraDocInsert(ClosedCarteraDoc, GenJnlLine); - ClosedCarteraDoc.Insert(); - CarteraDoc.Delete(); - VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::"Closed Documents"; - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - if VendLedgEntry."Document Type" <> VendLedgEntry."Document Type"::Invoice then - VendLedgEntry.Modify(); - end; - end; - VendLedgEntry."Document Situation"::"Posted BG/PO": - begin - PostedCarteraDoc.Get(PostedCarteraDoc.Type::Payable, VendLedgEntry."Entry No."); - PostedCarteraDoc."Remaining Amount" := -VendLedgEntry."Remaining Amount"; - PostedCarteraDoc."Remaining Amt. (LCY)" := -VendLedgEntry."Remaining Amt. (LCY)"; - CollDocAmountLCY := CollDocAmountLCY + AppliedAmountLCY; - UpdatePayableCurrFact(PostedCarteraDoc, AppliedAmountLCY, DocAmountLCY, CollDocAmountLCY); - if not VendLedgEntry.Open then begin - if PostedCarteraDoc.Status = ClosedCarteraDoc.Status::Rejected then - PostedCarteraDoc.Redrawn := true; - PostedCarteraDoc.Status := PostedCarteraDoc.Status::Honored; - PostedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; - PostedCarteraDoc."Remaining Amount" := 0; - PostedCarteraDoc."Remaining Amt. (LCY)" := 0; - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - VendLedgEntry.Modify(); - end; - PostedCarteraDoc.Modify(); - end; - VendLedgEntry."Document Situation"::"Closed BG/PO": - begin - ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Payable, VendLedgEntry."Entry No."); - ClosedCarteraDoc.TestField(Status, ClosedCarteraDoc.Status::Rejected); - ClosedCarteraDoc."Remaining Amount" := VendLedgEntry."Remaining Amount"; - ClosedCarteraDoc."Remaining Amt. (LCY)" := VendLedgEntry."Remaining Amt. (LCY)"; - if not VendLedgEntry.Open then begin - if ClosedCarteraDoc.Status = PostedCarteraDoc.Status::Rejected then - ClosedCarteraDoc.Redrawn := true; - ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Honored; - ClosedCarteraDoc."Remaining Amount" := 0; - ClosedCarteraDoc."Remaining Amt. (LCY)" := 0; - ClosedCarteraDoc."Honored/Rejtd. at Date" := GenJnlLine."Posting Date"; - end; - ClosedCarteraDoc.Modify(); - end; - end; - end; - - procedure CheckAppliedReceivableDoc(var OldCustLedgEntry: Record "Cust. Ledger Entry"; SystemCreatedEntry: Boolean) - begin - if (OldCustLedgEntry."Document Situation" = OldCustLedgEntry."Document Situation"::"Posted BG/PO") - and not SystemCreatedEntry - then - Error( - Text1100006, - OldCustLedgEntry."Document Type", OldCustLedgEntry."Document No.", - OldCustLedgEntry."Bill No."); - end; - - procedure CheckAppliedPayableDoc(var OldVendLedgEntry: Record "Vendor Ledger Entry"; SystemCreatedEntry: Boolean) - begin - if (OldVendLedgEntry."Document Situation" = OldVendLedgEntry."Document Situation"::"Posted BG/PO") - and not SystemCreatedEntry - then - Error( - Text1100007, - OldVendLedgEntry."Document Type", OldVendLedgEntry."Document No.", - OldVendLedgEntry."Bill No."); - end; - - procedure CheckPostingDate(CheckDate: Date) - var - GLSetup: Record "General Ledger Setup"; - UserSetup: Record "User Setup"; - AllowPostingTo: Date; - AllowPostingFrom: Date; - begin - GLSetup.Get(); - if UserId <> '' then - if UserSetup.Get(UserId) then begin - AllowPostingFrom := UserSetup."Allow Posting From"; - AllowPostingTo := UserSetup."Allow Posting To"; - end; - if (AllowPostingFrom = 0D) and (AllowPostingTo = 0D) then begin - AllowPostingFrom := GLSetup."Allow Posting From"; - AllowPostingTo := GLSetup."Allow Posting To"; - end; - if AllowPostingTo = 0D then - AllowPostingTo := 99991231D; - if (CheckDate < AllowPostingFrom) or (CheckDate > AllowPostingTo) then - Error(Text1100008, - CheckDate); - end; - - local procedure CheckCarteraDocsForBillGroups(CarteraDocType: Enum "Cartera Document Type"; DocumentNo: Code[20]; BillNo: Code[20]) - var - CarteraDoc: Record "Cartera Doc."; - begin - CarteraDoc.Reset(); - CarteraDoc.SetCurrentKey(Type, "Document No."); - CarteraDoc.SetRange(Type, CarteraDocType); - CarteraDoc.SetRange("Document No.", DocumentNo); - if BillNo <> '' then - CarteraDoc.SetRange("No.", BillNo) - else - CarteraDoc.SetRange("Document Type", CarteraDoc."Document Type"::Invoice); - CarteraDoc.SetFilter("Bill Gr./Pmt. Order No.", '<>%1', ''); - if CarteraDoc.FindFirst() then - Error( - CarteraDocBillGroupErr, - CarteraDoc."Document No.", CarteraDoc."No.", CarteraDoc."Bill Gr./Pmt. Order No."); - end; - - local procedure CheckPostedCarteraDocsForBillGroups(CarteraDocType: Enum "Cartera Document Type"; DocumentNo: Code[20]; BillNo: Code[20]) - var - PostedCarteraDoc: Record "Posted Cartera Doc."; - begin - PostedCarteraDoc.Reset(); - PostedCarteraDoc.SetCurrentKey(Type, "Document No."); - PostedCarteraDoc.SetRange(Type, CarteraDocType); - PostedCarteraDoc.SetRange("Document No.", DocumentNo); - if BillNo <> '' then - PostedCarteraDoc.SetRange("No.", BillNo) - else - PostedCarteraDoc.SetRange("Document Type", PostedCarteraDoc."Document Type"::Invoice); - PostedCarteraDoc.SetFilter("Bill Gr./Pmt. Order No.", '<>%1', ''); - if PostedCarteraDoc.FindFirst() then - Error( - CarteraDocBillGroupErr, - PostedCarteraDoc."Document No.", PostedCarteraDoc."No.", PostedCarteraDoc."Bill Gr./Pmt. Order No."); - end; - - procedure CloseBillGroupIfEmpty(PostedBillGroup: Record "Posted Bill Group"; PostingDate: Date) - var - PostedCarteraDoc: Record "Posted Cartera Doc."; - ClosedCarteraDoc: Record "Closed Cartera Doc."; - CustLedgEntry: Record "Cust. Ledger Entry"; - ClosedBillGroup: Record "Closed Bill Group"; - begin - PostedCarteraDoc.Reset(); - PostedCarteraDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status); - PostedCarteraDoc.SetRange("Bill Gr./Pmt. Order No.", PostedBillGroup."No."); - PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Receivable); - PostedCarteraDoc.SetRange(Status, PostedCarteraDoc.Status::Open); - OnCloseBillGroupIfEmptyOnAfterPostedCarteraDocSetFilter(PostedCarteraDoc); - if not PostedCarteraDoc.Find('-') then begin - PostedCarteraDoc.SetRange(Status); - PostedCarteraDoc.Find('-'); - repeat - ClosedCarteraDoc.TransferFields(PostedCarteraDoc); - ClosedCarteraDoc.Insert(); - CustLedgEntry.Get(ClosedCarteraDoc."Entry No."); - CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::"Closed BG/PO"; - CustLedgEntry.Modify(); - until PostedCarteraDoc.Next() = 0; - PostedCarteraDoc.DeleteAll(); - ClosedBillGroup.TransferFields(PostedBillGroup); - ClosedBillGroup."Closing Date" := PostingDate; - ClosedBillGroup.Insert(); - PostedBillGroup.Delete(); - end; - end; - - procedure ClosePmtOrdIfEmpty(PostedPmtOrd: Record "Posted Payment Order"; PostingDate: Date) - var - PostedCarteraDoc: Record "Posted Cartera Doc."; - ClosedCarteraDoc: Record "Closed Cartera Doc."; - VendLedgEntry: Record "Vendor Ledger Entry"; - ClosedPmtOrd: Record "Closed Payment Order"; - begin - PostedCarteraDoc.Reset(); - PostedCarteraDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status); - PostedCarteraDoc.SetRange("Bill Gr./Pmt. Order No.", PostedPmtOrd."No."); - PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Payable); - PostedCarteraDoc.SetRange(Status, PostedCarteraDoc.Status::Open); - if not PostedCarteraDoc.Find('-') then begin - PostedCarteraDoc.SetRange(Status); - PostedCarteraDoc.Find('-'); - repeat - ClosedCarteraDoc.TransferFields(PostedCarteraDoc); - ClosedCarteraDoc.Insert(); - VendLedgEntry.Get(ClosedCarteraDoc."Entry No."); - VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::"Closed BG/PO"; - VendLedgEntry.Modify(); - until PostedCarteraDoc.Next() = 0; - PostedCarteraDoc.DeleteAll(); - ClosedPmtOrd.TransferFields(PostedPmtOrd); - ClosedPmtOrd."Closing Date" := PostingDate; - ClosedPmtOrd.Insert(); - PostedPmtOrd.Delete(); - end; - end; - - procedure CheckDocInfo(var GenJnlLine: Record "Gen. Journal Line"; var ErrorCounter: Integer; var ErrorText: array[50] of Text[250]) - var - CarteraDoc: Record "Cartera Doc."; - PaymentMethod: Record "Payment Method"; - begin - if (GenJnlLine."Document Type" = GenJnlLine."Document Type"::Bill) and - (GenJnlLine.Amount <> 0) - then begin - if GenJnlLine."Bill No." = '' then - AddError( - StrSubstNo(Text1100009, GenJnlLine.FieldCaption("Bill No.")), - ErrorCounter, - ErrorText); - if GenJnlLine."Due Date" = 0D then - AddError( - StrSubstNo(Text1100009, GenJnlLine.FieldCaption("Due Date")), - ErrorCounter, - ErrorText); - if GenJnlLine."Payment Method Code" = '' then - AddError( - StrSubstNo(Text1100009, GenJnlLine.FieldCaption("Payment Method Code")), ErrorCounter, ErrorText); - PaymentMethod.Get(GenJnlLine."Payment Method Code"); - if not PaymentMethod."Create Bills" then - AddError( - StrSubstNo(Text1100010, GenJnlLine.FieldCaption("Payment Method Code")), ErrorCounter, ErrorText); - if not (GenJnlLine."Account Type" in [GenJnlLine."Account Type"::Customer, GenJnlLine."Account Type"::Vendor]) then - AddError(Text1100001, ErrorCounter, ErrorText); - end; - if (GenJnlLine."Account Type" = GenJnlLine."Account Type"::Customer) and - (GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::Bill) and - not GenJnlLine."System-Created Entry" - then begin - CarteraDoc.Reset(); - CarteraDoc.SetCurrentKey(Type, "Document No."); - CarteraDoc.SetRange(Type, CarteraDoc.Type::Receivable); - CarteraDoc.SetRange("Document No.", GenJnlLine."Applies-to Doc. No."); - CarteraDoc.SetRange("No.", GenJnlLine."Applies-to Bill No."); - if CarteraDoc.FindFirst() and (CarteraDoc."Bill Gr./Pmt. Order No." <> '') then - AddError(Text1100011, ErrorCounter, ErrorText); - end; - end; - - local procedure AddError(Text: Text[250]; var ErrorCounter: Integer; var ErrorText: array[50] of Text[250]) - begin - ErrorCounter := ErrorCounter + 1; - ErrorText[ErrorCounter] := Text; - end; - - procedure FindDisctdAmt(DocAmount: Decimal; CustomerNo: Code[20]; BankAccCode: Code[20]): Decimal - var - CustRating: Record "Customer Rating"; - BankAcc: Record "Bank Account"; - begin - BankAcc.Get(BankAccCode); - BankAcc.TestField("Customer Ratings Code"); - CustRating.Get(BankAcc."Customer Ratings Code", BankAcc."Currency Code", CustomerNo); - CustRating.TestField("Risk Percentage"); - exit(DocAmount * CustRating."Risk Percentage" / 100); - end; - - local procedure "Code"(var GenJnlLine: Record "Gen. Journal Line"; var PostOk: Boolean; Print: Boolean) - var - GenJnlTemplate: Record "Gen. Journal Template"; - GenJnlPostBatch: Codeunit "Gen. Jnl.-Post Batch"; - TempJnlBatchName: Code[10]; - GLReg: Record "G/L Register"; - IsHandled: Boolean; - begin - GenJnlTemplate.Get(GenJnlLine."Journal Template Name"); - GenJnlTemplate.TestField("Force Posting Report", false); - if GenJnlTemplate.Recurring and (GenJnlLine.GetFilter("Posting Date") <> '') then - GenJnlLine.FieldError("Posting Date", Text1100012); - - if Print then begin - if not Confirm(Text1100013, false) then - exit; - end else - if not Confirm(Text1100014, false) then - exit; - - TempJnlBatchName := GenJnlLine."Journal Batch Name"; - - if Print then begin - GLReg.LockTable(); - if GLReg.FindLast() then; - end; - - IsHandled := false; - OnCodeOnBeforeGenJnlPostBatchRun(GenJnlLine, IsHandled); - if not IsHandled then begin - GenJnlPostBatch.Run(GenJnlLine); - Clear(GenJnlPostBatch); - - if Print then begin - GLReg.SetRange("No.", GLReg."No." + 1, GenJnlLine."Line No."); - if GLReg.Get(GenJnlLine."Line No.") then - REPORT.Run(GenJnlTemplate."Posting Report ID", false, false, GLReg); - end; - - ShowPostResultMessage(GenJnlLine, PostOk, TempJnlBatchName); - - if not GenJnlLine.Find('=><') or (TempJnlBatchName <> GenJnlLine."Journal Batch Name") then begin - GenJnlLine.Reset(); - GenJnlLine.FilterGroup(2); - GenJnlLine.SetRange("Journal Template Name", GenJnlLine."Journal Template Name"); - GenJnlLine.SetRange("Journal Batch Name", GenJnlLine."Journal Batch Name"); - GenJnlLine.FilterGroup(0); - GenJnlLine."Line No." := 1; - end; - end; - end; - - local procedure ShowPostResultMessage(var GenJournalLine: Record "Gen. Journal Line"; var PostOk: Boolean; TempJnlBatchName: Code[10]) - var - IsHandled: Boolean; - begin - IsHandled := false; - OnBeforeShowPostResultMessage(GenJournalLine, PostOk, TempJnlBatchName, IsHandled); - if IsHandled then - exit; - - if GenJournalLine."Line No." = 0 then - Message(JournalErrorsMgt.GetNothingToPostErrorMsg()) - else - if TempJnlBatchName = GenJournalLine."Journal Batch Name" then begin - Message(Text1100016); - PostOk := true; - end else - Message(Text1100017, GenJournalLine."Journal Batch Name"); - end; - - procedure PostLines(var GenJnlLine2: Record "Gen. Journal Line"; var PostOk: Boolean; Print: Boolean) - var - GenJnlLine: Record "Gen. Journal Line"; - begin - GenJnlLine.Copy(GenJnlLine2); - Code(GenJnlLine, PostOk, Print); - GenJnlLine2.Copy(GenJnlLine); - end; - - procedure PostSettlement(var GenJournalLine: Record "Gen. Journal Line") - var - GenJournalLineToPost: Record "Gen. Journal Line"; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - UpdateAnalysisView: Codeunit "Update Analysis View"; - begin - if GenJournalLine.FindSet() then - repeat - GenJournalLineToPost := GenJournalLine; - GenJnlPostLine.SetFromSettlement(true); - GenJnlPostLine.Run(GenJournalLineToPost); - until GenJournalLine.Next() = 0; - UpdateAnalysisView.UpdateAll(0, true); - end; - - procedure PostSettlementForPostedPmtOrder(var GenJournalLine: Record "Gen. Journal Line"; PostingDate: Date) - var - GenJournalLineToPost: Record "Gen. Journal Line"; - PostedPmtOrder: Record "Posted Payment Order"; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - UpdateAnalysisView: Codeunit "Update Analysis View"; - begin - if GenJournalLine.FindSet() then - repeat - GenJournalLineToPost := GenJournalLine; - GenJnlPostLine.SetFromSettlement(true); - GenJnlPostLine.Run(GenJournalLineToPost); - if PostedPmtOrder.Get(GenJournalLine."Document No.") then - ClosePmtOrdIfEmpty(PostedPmtOrder, PostingDate); - until GenJournalLine.Next() = 0; - UpdateAnalysisView.UpdateAll(0, true); - end; - - procedure PostSettlementForPostedBillGroup(var GenJournalLine: Record "Gen. Journal Line"; PostingDate: Date) - var - GenJournalLineToPost: Record "Gen. Journal Line"; - PostedBillGroup: Record "Posted Bill Group"; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - UpdateAnalysisView: Codeunit "Update Analysis View"; - begin - if GenJournalLine.FindSet() then - repeat - GenJournalLineToPost := GenJournalLine; - GenJnlPostLine.SetFromSettlement(true); - GenJnlPostLine.Run(GenJournalLineToPost); - if PostedBillGroup.Get(GenJournalLine."Document No.") then - CloseBillGroupIfEmpty(PostedBillGroup, PostingDate); - until GenJournalLine.Next() = 0; - UpdateAnalysisView.UpdateAll(0, true); - end; - - procedure InsertDtldCustLedgEntry(CustLedgEntry2: Record "Cust. Ledger Entry"; Amount2: Decimal; Amount2LCY: Decimal; EntryType: Option " ","Initial Entry",Application,"Unrealized Loss","Unrealized Gain","Realized Loss","Realized Gain","Payment Discount","Payment Discount (VAT Excl.)","Payment Discount (VAT Adjustment)","Appln. Rounding","Correction of Remaining Amount",,,,,,,,,Settlement,Rejection,Redrawal,Expenses; PostingDate: Date) - var - DtldCVLedgEntryBuf: Record "Detailed Cust. Ledg. Entry"; - NextDtldBufferEntryNo: Integer; - begin - Clear(DtldCVLedgEntryBuf); - DtldCVLedgEntryBuf.Reset(); - if DtldCVLedgEntryBuf.FindLast() then - NextDtldBufferEntryNo := DtldCVLedgEntryBuf."Entry No." + 1 - else - NextDtldBufferEntryNo := 1; - - CustLedgEntry2.CalcFields(Amount); - DtldCVLedgEntryBuf.Init(); - DtldCVLedgEntryBuf."Entry No." := NextDtldBufferEntryNo; - DtldCVLedgEntryBuf."Cust. Ledger Entry No." := CustLedgEntry2."Entry No."; - DtldCVLedgEntryBuf."Entry Type" := "Detailed CV Ledger Entry Type".FromInteger(EntryType); - case true of - EntryType = EntryType::Rejection: - DtldCVLedgEntryBuf."Excluded from calculation" := true; - EntryType = EntryType::Redrawal: - DtldCVLedgEntryBuf."Excluded from calculation" := true; - end; - DtldCVLedgEntryBuf."Posting Date" := PostingDate; - DtldCVLedgEntryBuf."Initial Entry Due Date" := CustLedgEntry2."Due Date"; - DtldCVLedgEntryBuf."Document Type" := CustLedgEntry2."Document Type"; - DtldCVLedgEntryBuf."Document No." := CustLedgEntry2."Document No."; - DtldCVLedgEntryBuf.Amount := Amount2; - DtldCVLedgEntryBuf."Amount (LCY)" := Amount2LCY; - DtldCVLedgEntryBuf."Customer No." := CustLedgEntry2."Customer No."; - DtldCVLedgEntryBuf."Currency Code" := CustLedgEntry2."Currency Code"; - DtldCVLedgEntryBuf."User ID" := UserId; - DtldCVLedgEntryBuf."Initial Entry Global Dim. 1" := CustLedgEntry2."Global Dimension 1 Code"; - DtldCVLedgEntryBuf."Initial Entry Global Dim. 2" := CustLedgEntry2."Global Dimension 2 Code"; - DtldCVLedgEntryBuf."Bill No." := CustLedgEntry2."Bill No."; - DtldCVLedgEntryBuf.Insert(true); - end; - - procedure InsertDtldVendLedgEntry(VendLedgEntry2: Record "Vendor Ledger Entry"; Amount2: Decimal; Amount2LCY: Decimal; EntryType: Option " ","Initial Entry",Application,"Unrealized Loss","Unrealized Gain","Realized Loss","Realized Gain","Payment Discount","Payment Discount (VAT Excl.)","Payment Discount (VAT Adjustment)","Appln. Rounding","Correction of Remaining Amount",,,,,,,,,Settlement,Rejection,Redrawal,Expenses; PostingDate: Date) - var - DtldCVLedgEntryBuf: Record "Detailed Vendor Ledg. Entry"; - NextDtldBufferEntryNo: Integer; - begin - Clear(DtldCVLedgEntryBuf); - DtldCVLedgEntryBuf.Reset(); - if DtldCVLedgEntryBuf.FindLast() then - NextDtldBufferEntryNo := DtldCVLedgEntryBuf."Entry No." + 1 - else - NextDtldBufferEntryNo := 1; - - VendLedgEntry2.CalcFields(Amount); - DtldCVLedgEntryBuf.Init(); - DtldCVLedgEntryBuf."Entry No." := NextDtldBufferEntryNo; - DtldCVLedgEntryBuf."Vendor Ledger Entry No." := VendLedgEntry2."Entry No."; - DtldCVLedgEntryBuf."Entry Type" := "Detailed CV Ledger Entry Type".FromInteger(EntryType); - case true of - EntryType = EntryType::Rejection: - DtldCVLedgEntryBuf."Excluded from calculation" := true; - EntryType = EntryType::Redrawal: - DtldCVLedgEntryBuf."Excluded from calculation" := true; - end; - DtldCVLedgEntryBuf."Posting Date" := PostingDate; - DtldCVLedgEntryBuf."Initial Entry Due Date" := VendLedgEntry2."Due Date"; - DtldCVLedgEntryBuf."Document Type" := VendLedgEntry2."Document Type"; - DtldCVLedgEntryBuf."Document No." := VendLedgEntry2."Document No."; - DtldCVLedgEntryBuf.Amount := Amount2; - DtldCVLedgEntryBuf."Amount (LCY)" := Amount2LCY; - DtldCVLedgEntryBuf."Vendor No." := VendLedgEntry2."Vendor No."; - DtldCVLedgEntryBuf."Currency Code" := VendLedgEntry2."Currency Code"; - DtldCVLedgEntryBuf."User ID" := UserId; - DtldCVLedgEntryBuf."Initial Entry Global Dim. 1" := VendLedgEntry2."Global Dimension 1 Code"; - DtldCVLedgEntryBuf."Initial Entry Global Dim. 2" := VendLedgEntry2."Global Dimension 2 Code"; - DtldCVLedgEntryBuf."Bill No." := VendLedgEntry2."Bill No."; - DtldCVLedgEntryBuf.Insert(true); - end; - - procedure GetFCYAppliedAmt(AppliedAmountLCY: Decimal; CurrCode: Code[20]; PostingDate: Date): Decimal - var - CurrExchRate: Record "Currency Exchange Rate"; - GLSetup: Record "General Ledger Setup"; - begin - if CurrCode <> '' then begin - GLSetup.Get(); - exit( - Round( - CurrExchRate.ExchangeAmtLCYToFCY( - PostingDate, - CurrCode, - AppliedAmountLCY, - CurrExchRate.ExchangeRate(PostingDate, CurrCode)), - GLSetup."Amount Rounding Precision")); - end; - exit(AppliedAmountLCY); - end; - - procedure UpdateReceivableCurrFact(PostedCarteraDoc: Record "Posted Cartera Doc."; AppliedAmountLCY: Decimal; var DocAmountLCY: Decimal; var RejDocAmountLCY: Decimal; var DiscDocAmountLCY: Decimal; var CollDocAmountLCY: Decimal; var DiscRiskFactAmountLCY: Decimal; var DiscUnriskFactAmountLCY: Decimal; var CollFactAmountLCY: Decimal) - var - SalesInvHeader: Record "Sales Invoice Header"; - PostedBillGroup: Record "Posted Bill Group"; - CurrFact: Decimal; - CurrExchRate: Record "Currency Exchange Rate"; - begin - if SalesInvHeader.Get(PostedCarteraDoc."Document No.") then - if SalesInvHeader."Currency Factor" <> 0 then begin - if PostedBillGroup.Get(PostedCarteraDoc."Bill Gr./Pmt. Order No.") then; - CurrFact := CurrExchRate.ExchangeRate(PostedBillGroup."Posting Date", PostedCarteraDoc."Currency Code"); - if CurrFact <> SalesInvHeader."Currency Factor" then - if PostedCarteraDoc.Factoring = PostedCarteraDoc.Factoring::" " then begin - if PostedCarteraDoc.Status = PostedCarteraDoc.Status::Rejected then - DocAmountLCY := - GetCorrectAmounts(RejDocAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) - else - if PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount then - DocAmountLCY := - GetCorrectAmounts(DiscDocAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) - else - DocAmountLCY := - GetCorrectAmounts(CollDocAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc); - end else - case true of - PostedCarteraDoc."Dealing Type" = PostedCarteraDoc."Dealing Type"::Discount: - begin - if PostedBillGroup.Get(PostedCarteraDoc."Bill Gr./Pmt. Order No.") then; - if PostedBillGroup.Factoring = PostedBillGroup.Factoring::Risked then - DocAmountLCY := - GetCorrectAmounts( - DiscRiskFactAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) - else - DocAmountLCY := - GetCorrectAmounts( - DiscUnriskFactAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) - end; - else - DocAmountLCY := - GetCorrectAmounts(CollFactAmountLCY, AppliedAmountLCY, CurrFact, SalesInvHeader."Currency Factor", PostedCarteraDoc) - end; - end; - end; - - procedure UpdatePayableCurrFact(PostedCarteraDoc: Record "Posted Cartera Doc."; AppliedAmountLCY: Decimal; var DocAmountLCY: Decimal; var CollDocAmountLCY: Decimal) - var - PurchInvHeader: Record "Purch. Inv. Header"; - PostedPaymentOrder: Record "Posted Payment Order"; - CurrExchRate: Record "Currency Exchange Rate"; - PaymentMethod: Record "Payment Method"; - CurrFact: Decimal; - begin - if PurchInvHeader.Get(PostedCarteraDoc."Document No.") then - if PurchInvHeader."Currency Factor" <> 0 then begin - if PostedPaymentOrder.Get(PostedCarteraDoc."Bill Gr./Pmt. Order No.") then; - if PaymentMethod.Get(PostedCarteraDoc."Payment Method Code") then; - CurrFact := CurrExchRate.ExchangeRate(PostedPaymentOrder."Posting Date", PostedCarteraDoc."Currency Code"); - if CurrFact <> PurchInvHeader."Currency Factor" then - if not PaymentMethod."Invoices to Cartera" then - DocAmountLCY := - GetCorrectAmounts(CollDocAmountLCY, AppliedAmountLCY, CurrFact, PurchInvHeader."Currency Factor", PostedCarteraDoc); - end; - end; - - procedure GetCorrectAmounts(var Amount: Decimal; AppliedAmountLCY: Decimal; CurrFact: Decimal; InvoiceCurrFact: Decimal; PostedCarteraDoc: Record "Posted Cartera Doc."): Decimal - var - AuxAmount: Decimal; - AuxAmount2: Decimal; - begin - AuxAmount := Amount; - Amount := Round(Round(AppliedAmountLCY * InvoiceCurrFact) / CurrFact); - AuxAmount2 := AuxAmount - Amount; - - if PostedCarteraDoc.Adjusted xor PostedCarteraDoc.ReAdjusted then - exit(0); - if PostedCarteraDoc.ReAdjusted then begin - Amount := Amount - PostedCarteraDoc."Adjusted Amount"; - exit(0); - end; - exit(AuxAmount2); - end; - - procedure UpdateUnAppliedReceivableDoc(var CustLedgEntry: Record "Cust. Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line") - var - CarteraDoc: Record "Cartera Doc."; - PostedCarteraDoc: Record "Posted Cartera Doc."; - ClosedCarteraDoc: Record "Closed Cartera Doc."; - CarteraDoc2: Record "Cartera Doc."; - ClosedCarteraDoc2: Record "Closed Cartera Doc."; - DocLock: Boolean; - Text1100101: Label ' Remove it from its bill group and try again.'; - Text1100102: Label '%1 cannot be unapplied, since it is included in a bill group.'; - InBillGroup: Boolean; - DtldCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; - IsRejection: Boolean; - begin - InBillGroup := false; - if CarteraDoc.Get(CarteraDoc.Type::Receivable, CustLedgEntry."Entry No.") then - if CarteraDoc."Bill Gr./Pmt. Order No." <> '' then - InBillGroup := true; - if PostedCarteraDoc.Get(PostedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No.") then - if PostedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then - InBillGroup := true; - if ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No.") then - if ClosedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then - InBillGroup := true; - if InBillGroup then - Error( - Text1100102 + - Text1100101, - CustLedgEntry.Description); - CustLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - if not DocLock then begin - DocLock := true; - CarteraDoc.LockTable(); - ClosedCarteraDoc.LockTable(); - if CarteraDoc2.FindLast() then; - if ClosedCarteraDoc2.FindLast() then; - end; - if CustLedgEntry."Remaining Amount" = 0 then - CustLedgEntry."Remaining Amt. (LCY)" := 0; - case CustLedgEntry."Document Situation" of - CustLedgEntry."Document Situation"::Cartera: - begin - CarteraDoc.Get(CarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); - CarteraDoc."Remaining Amount" := - CarteraDoc."Remaining Amount" + GetFCYAppliedAmt(CustLedgEntry."Remaining Amt. (LCY)" - CarteraDoc."Remaining Amt. (LCY)", - CarteraDoc."Currency Code", GenJnlLine."Posting Date"); - CarteraDoc."Remaining Amt. (LCY)" := - CarteraDoc."Remaining Amt. (LCY)" + (CustLedgEntry."Remaining Amt. (LCY)" - CarteraDoc."Remaining Amt. (LCY)"); - CarteraDoc.ResetNoPrinted(); - if CustLedgEntry.Open then begin - OnUpdateUnAppliedReceivableDocOnBeforeCarteraDocModify(CarteraDoc); - CarteraDoc.Modify(); - OnUpdateUnAppliedReceivableDocOnAfterCarteraDocModify(CarteraDoc); - end; - end; - CustLedgEntry."Document Situation"::"Closed Documents": - begin - ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Receivable, CustLedgEntry."Entry No."); - IsRejection := false; - DtldCustLedgEntry.SetCurrentKey("Cust. Ledger Entry No.", "Posting Date"); - DtldCustLedgEntry.SetRange("Cust. Ledger Entry No.", CustLedgEntry."Entry No."); - if DtldCustLedgEntry.Find('-') then - repeat - if DtldCustLedgEntry."Entry Type" = DtldCustLedgEntry."Entry Type"::Rejection then - IsRejection := true; - until DtldCustLedgEntry.Next() = 0; - - if CustLedgEntry.Open then - if (IsRejection = true) and (CustLedgEntry."Remaining Amount" <> 0) then begin - ClosedCarteraDoc."Remaining Amount" := - ClosedCarteraDoc."Remaining Amount" + (CustLedgEntry."Remaining Amount" - ClosedCarteraDoc."Remaining Amount"); - ClosedCarteraDoc."Remaining Amt. (LCY)" := ClosedCarteraDoc."Remaining Amt. (LCY)" + - (CustLedgEntry."Remaining Amt. (LCY)" - ClosedCarteraDoc."Remaining Amt. (LCY)"); - ClosedCarteraDoc.Status := ClosedCarteraDoc.Status::Rejected; - ClosedCarteraDoc.Modify(); - CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::"Closed Documents"; - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Rejected; - CustLedgEntry.Modify(); - end else begin - CarteraDoc.TransferFields(ClosedCarteraDoc); - CarteraDoc.Type := CarteraDoc.Type::Receivable; - CarteraDoc."Remaining Amount" := CarteraDoc."Remaining Amount" + CustLedgEntry."Remaining Amount"; - CarteraDoc."Remaining Amt. (LCY)" := CarteraDoc."Remaining Amt. (LCY)" + CustLedgEntry."Remaining Amt. (LCY)"; - OnUpdateUnAppliedReceivableDocOnBeforeCarteraDocInsert(CarteraDoc); - CarteraDoc.Insert(); - OnUpdateUnAppliedReceivableDocOnAfterCarteraDocInsert(CarteraDoc); - ClosedCarteraDoc.Delete(); - CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera; - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Open; - CustLedgEntry.Modify(); - end; - CustLedgEntry.Modify(); - end; - end; - end; - - procedure UpdateUnAppliedPayableDoc(var VendLedgEntry: Record "Vendor Ledger Entry"; var GenJnlLine: Record "Gen. Journal Line"; var DocLock: Boolean) - var - CarteraDoc: Record "Cartera Doc."; - PostedCarteraDoc: Record "Posted Cartera Doc."; - ClosedCarteraDoc: Record "Closed Cartera Doc."; - CarteraDoc2: Record "Cartera Doc."; - ClosedCarteraDoc2: Record "Closed Cartera Doc."; - Text1100101: Label ' Remove it from its payment order and try again.'; - InBillGroup: Boolean; - Text1100102: Label '%1 cannot be unapplied, since it is included in a payment order.'; - begin - InBillGroup := false; - if CarteraDoc.Get(CarteraDoc.Type::Payable, VendLedgEntry."Entry No.") then - if CarteraDoc."Bill Gr./Pmt. Order No." <> '' then - InBillGroup := true; - if PostedCarteraDoc.Get(PostedCarteraDoc.Type::Payable, VendLedgEntry."Entry No.") then - if PostedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then - InBillGroup := true; - if ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Payable, VendLedgEntry."Entry No.") then - if ClosedCarteraDoc."Bill Gr./Pmt. Order No." <> '' then - InBillGroup := true; - if InBillGroup then - Error( - Text1100102 + - Text1100101, - VendLedgEntry.Description); - VendLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - if not DocLock then begin - DocLock := true; - CarteraDoc.LockTable(); - if CarteraDoc2.FindLast() then; - if ClosedCarteraDoc2.FindLast() then; - ClosedCarteraDoc.LockTable(); - end; - if VendLedgEntry."Remaining Amount" = 0 then - VendLedgEntry."Remaining Amt. (LCY)" := 0; - case VendLedgEntry."Document Situation" of - VendLedgEntry."Document Situation"::Cartera: - begin - CarteraDoc.Get(CarteraDoc.Type::Payable, VendLedgEntry."Entry No."); - CarteraDoc."Remaining Amount" := - CarteraDoc."Remaining Amount" - GetFCYAppliedAmt(VendLedgEntry."Remaining Amt. (LCY)" + CarteraDoc."Remaining Amt. (LCY)", - CarteraDoc."Currency Code", GenJnlLine."Posting Date"); - CarteraDoc."Remaining Amt. (LCY)" := - CarteraDoc."Remaining Amt. (LCY)" - (VendLedgEntry."Remaining Amt. (LCY)" + CarteraDoc."Remaining Amt. (LCY)"); - CarteraDoc.ResetNoPrinted(); - if VendLedgEntry.Open then begin - OnUpdateUnAppliedPayableDocOnBeforeCarteraDocModify(CarteraDoc); - CarteraDoc.Modify(); - OnUpdateUnAppliedPayableDocOnAfterCarteraDocModify(CarteraDoc); - end; - end; - VendLedgEntry."Document Situation"::"Closed Documents": - begin - ClosedCarteraDoc.Get(ClosedCarteraDoc.Type::Payable, VendLedgEntry."Entry No."); - if VendLedgEntry.Open then begin - CarteraDoc.TransferFields(ClosedCarteraDoc); - CarteraDoc.Type := CarteraDoc.Type::Payable; - CarteraDoc."Remaining Amount" := CarteraDoc."Remaining Amount" - VendLedgEntry."Remaining Amount"; - CarteraDoc."Remaining Amt. (LCY)" := CarteraDoc."Remaining Amt. (LCY)" - VendLedgEntry."Remaining Amt. (LCY)"; - OnUpdateUnAppliedPayableDocOnBeforeCarteraDocInsert(CarteraDoc); - CarteraDoc.Insert(); - OnUpdateUnAppliedPayableDocOnAfterCarteraDocInsert(CarteraDoc); - ClosedCarteraDoc.Delete(); - VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera; - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Open; - VendLedgEntry.Modify(); - end; - VendLedgEntry.Modify(); - end; - end; - end; - - local procedure CheckVendMultiplePostingGroups(VendorLedgerEntry: Record "Vendor Ledger Entry"): Boolean - var - VendorLedgerEntry2: Record "Vendor Ledger Entry"; - PostingGroup: Code[20]; - begin - PostingGroup := ''; - VendorLedgerEntry2.SetCurrentKey("Applies-to ID"); - VendorLedgerEntry2.SetRange("Applies-to ID", VendorLedgerEntry."Applies-to ID"); - if VendorLedgerEntry2.FindSet() then - repeat - if (PostingGroup <> '') and (PostingGroup <> VendorLedgerEntry2."Vendor Posting Group") then - exit(true); - PostingGroup := VendorLedgerEntry2."Vendor Posting Group"; - until VendorLedgerEntry2.Next() = 0; - - exit(false); - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterCheckGenJnlLine(var GenJournalLine: Record "Gen. Journal Line") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterCreateReceivableDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line"; var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterCreatePayableDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line"; var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCreateReceivableDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line"; var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCreatePayableDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line"; var CVLedgerEntryBuffer: Record "CV Ledger Entry Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeShowPostResultMessage(var GenJournalLine: Record "Gen. Journal Line"; var PostOk: Boolean; TempJnlBatchName: Code[10]; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnCloseBillGroupIfEmptyOnAfterPostedCarteraDocSetFilter(var PostedCarteraDoc: Record "Posted Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnCodeOnBeforeGenJnlPostBatchRun(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdateUnAppliedReceivableDocOnAfterCarteraDocModify(var CarteraDoc: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdateUnAppliedReceivableDocOnBeforeCarteraDocModify(var CarteraDoc: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdateUnAppliedReceivableDocOnAfterCarteraDocInsert(var CarteraDoc: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdateUnAppliedReceivableDocOnBeforeCarteraDocInsert(var CarteraDoc: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdateUnAppliedPayableDocOnAfterCarteraDocModify(var CarteraDoc: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdateUnAppliedPayableDocOnBeforeCarteraDocModify(var CarteraDoc: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdateUnAppliedPayableDocOnAfterCarteraDocInsert(var CarteraDoc: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdateUnAppliedPayableDocOnBeforeCarteraDocInsert(var CarteraDoc: Record "Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdatePayableDocBeforeCarteraDocModify(var CarteraDoc: Record "Cartera Doc."; VendLedgEntry: Record "Vendor Ledger Entry") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeUpdateReceivableDoc(var CustLedgEntry: Record "Cust. Ledger Entry") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnUpdatePayableDocBeforeClosedCarteraDocInsert(var ClosedCarteraDoc: Record "Closed Cartera Doc."; GenJnlLine: Record "Gen. Journal Line") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnGJLInfoToDocOnBeforeExit(var CarteraDoc: Record "Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterGJLInfoToDoc(var CarteraDoc: Record "Cartera Doc."; GenJournalLine: Record "Gen. Journal Line") - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsAnalysis.Page.al deleted file mode 100644 index 4a9b6fe875b..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsAnalysis.Page.al +++ /dev/null @@ -1,155 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.Currency; -using Microsoft.Foundation.AuditCodes; - -page 7000019 "Documents Analysis" -{ - Caption = 'Documents Analysis'; - DataCaptionExpression = Rec.GetFilter(Type); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SaveValues = true; - SourceTable = "Cartera Doc."; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - field(CurrencyFilter; CurrencyFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Currency Filter'; - TableRelation = Currency; - ToolTip = 'Specifies the currencies that the data is included for.'; - - trigger OnValidate() - begin - CurrencyFilterOnAfterValidate(); - end; - } - } - group(Control6) - { - ShowCaption = false; - field(BillCount; DocCount) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Documents'; - Editable = false; - ToolTip = 'Specifies the number of documents included.'; - } - field(Total; TotalAmt) - { - ApplicationArea = All; - AutoFormatExpression = Doc."Currency Code"; - AutoFormatType = 1; - Caption = 'Amount'; - DrillDown = true; - Editable = false; - ToolTip = 'Specifies the sum of amounts on the documents.'; - Visible = TotalVisible; - - trigger OnDrillDown() - begin - PAGE.RunModal(0, Doc); - end; - } - field(TotalLCY; TotalAmtLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amount (LCY)'; - DrillDown = true; - Editable = false; - ToolTip = 'Specifies the sum of amounts on the documents.'; - Visible = TotalLCYVisible; - - trigger OnDrillDown() - begin - PAGE.RunModal(0, Doc); - end; - } - } - } - } - - actions - { - } - - trigger OnInit() - begin - TotalLCYVisible := true; - TotalVisible := true; - end; - - trigger OnOpenPage() - begin - CategoryFilter := Rec.GetFilter("Category Code"); - CurrencyFilter := Rec.GetFilter("Currency Code"); - UpdateStatistics(); - end; - - var - Doc: Record "Cartera Doc."; - CategoryFilter: Code[250]; - CurrencyFilter: Code[250]; - DocCount: Integer; - TotalAmt: Decimal; - TotalAmtLCY: Decimal; - Show: Boolean; - TotalVisible: Boolean; - TotalLCYVisible: Boolean; - - local procedure UpdateStatistics() - begin - Doc.Copy(Rec); - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code"); - Doc.SetFilter("Category Code", CategoryFilter); - Doc.SetFilter("Currency Code", CurrencyFilter); - Show := Doc.CalcSums("Remaining Amount", "Remaining Amt. (LCY)"); - if Show then begin - TotalAmt := Doc."Remaining Amount"; - TotalAmtLCY := Doc."Remaining Amt. (LCY)"; - end; - DocCount := Doc.Count; - TotalVisible := Show; - TotalLCYVisible := Show; - - if Doc.Find('=><') then; // necessary to calculate decimal places - end; - - local procedure CategoryFilterOnAfterValidate() - begin - UpdateStatistics(); - end; - - local procedure CurrencyFilterOnAfterValidate() - begin - UpdateStatistics(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsMaturity.Page.al deleted file mode 100644 index e8cb92f8097..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsMaturity.Page.al +++ /dev/null @@ -1,190 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Foundation.AuditCodes; - -page 7000029 "Documents Maturity" -{ - Caption = 'Documents Maturity'; - DataCaptionExpression = Rec.GetFilter(Type); - DeleteAllowed = false; - InsertAllowed = false; - PageType = List; - SaveValues = true; - SourceTable = "Cartera Doc."; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - Rec.SetFilter("Category Code", CategoryFilter); - UpdateSubForm(); - end; - } - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View by'; - OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - if PeriodType = PeriodType::Period then - PeriodPeriodTypeOnValidate(); - if PeriodType = PeriodType::Year then - YearPeriodTypeOnValidate(); - if PeriodType = PeriodType::Quarter then - QuarterPeriodTypeOnValidate(); - if PeriodType = PeriodType::Month then - MonthPeriodTypeOnValidate(); - if PeriodType = PeriodType::Week then - WeekPeriodTypeOnValidate(); - if PeriodType = PeriodType::Day then - DayPeriodTypeOnValidate(); - end; - } - field(AmountType; AmountType) - { - ApplicationArea = Basic, Suite; - Caption = 'View as'; - OptionCaption = 'Net Change,Balance at Date'; - ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; - - trigger OnValidate() - begin - if AmountType = AmountType::"Balance at Date" then - BalanceatDateAmountTypeOnValid(); - if AmountType = AmountType::"Net Change" then - NetChangeAmountTypeOnValidate(); - end; - } - } - part(MaturityLines; "Documents Maturity Lines") - { - ApplicationArea = Basic, Suite; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateSubForm(); - end; - - trigger OnOpenPage() - begin - CategoryFilter := Rec.GetFilter("Category Code"); - UpdateSubForm(); - end; - - var - PeriodType: Option Day,Week,Month,Quarter,Year,Period; - AmountType: Option "Net Change","Balance at Date"; - CategoryFilter: Code[250]; - - local procedure UpdateSubForm() - begin - CurrPage.MaturityLines.PAGE.Set(Rec, PeriodType, AmountType); - end; - - local procedure DayPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure WeekPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure MonthPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure QuarterPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure YearPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure PeriodPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure BalanceatDateAmountTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure NetChangeAmountTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure DayPeriodTypeOnValidate() - begin - DayPeriodTypeOnPush(); - end; - - local procedure WeekPeriodTypeOnValidate() - begin - WeekPeriodTypeOnPush(); - end; - - local procedure MonthPeriodTypeOnValidate() - begin - MonthPeriodTypeOnPush(); - end; - - local procedure QuarterPeriodTypeOnValidate() - begin - QuarterPeriodTypeOnPush(); - end; - - local procedure YearPeriodTypeOnValidate() - begin - YearPeriodTypeOnPush(); - end; - - local procedure PeriodPeriodTypeOnValidate() - begin - PeriodPeriodTypeOnPush(); - end; - - local procedure NetChangeAmountTypeOnValidate() - begin - NetChangeAmountTypeOnPush(); - end; - - local procedure BalanceatDateAmountTypeOnValid() - begin - BalanceatDateAmountTypeOnPush(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsMaturityLines.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsMaturityLines.Page.al deleted file mode 100644 index 921dc7975ee..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DocumentsMaturityLines.Page.al +++ /dev/null @@ -1,112 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Foundation.Enums; -using Microsoft.Foundation.Period; -using System.Utilities; - -page 7000030 "Documents Maturity Lines" -{ - Caption = 'Lines'; - PageType = ListPart; - SourceTable = Date; - - layout - { - area(content) - { - repeater(Control1) - { - Editable = false; - ShowCaption = false; - field("Period Start"; Rec."Period Start") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the starting date of the period that you want to view.'; - } - field("Period Name"; Rec."Period Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name of the period shown on the line.'; - } - field("Doc.""Remaining Amt. (LCY)"""; Doc."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - Caption = 'Amount (LCY)'; - DrillDown = true; - ToolTip = 'Specifies the sum of amounts on the matured documents.'; - - trigger OnDrillDown() - begin - ShowDocEntries(); - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - SetDateFilter(); - Doc.CalcSums("Remaining Amt. (LCY)"); - end; - - trigger OnFindRecord(Which: Text): Boolean - begin - exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); - end; - - trigger OnNextRecord(Steps: Integer): Integer - begin - exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); - end; - - trigger OnOpenPage() - begin - Rec.Reset(); - Doc.SetCurrentKey( - Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date"); - end; - - var - Doc: Record "Cartera Doc."; - PeriodPageManagement: Codeunit PeriodPageManagement; - PeriodLength: Enum "Analysis Period Type"; - AmountType: Enum "Analysis Amount Type"; - - [Scope('OnPrem')] - procedure Set(var NewDoc: Record "Cartera Doc."; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") - begin - NewDoc.CopyFilter(Type, Doc.Type); - NewDoc.CopyFilter("Bill Gr./Pmt. Order No.", Doc."Bill Gr./Pmt. Order No."); - NewDoc.CopyFilter("Category Code", Doc."Category Code"); - NewDoc.CopyFilter("Currency Code", Doc."Currency Code"); - PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); - AmountType := "Analysis Amount Type".FromInteger(NewAmountType); - CurrPage.Update(false); - end; - - [Scope('OnPrem')] - procedure SetDateFilter() - begin - if AmountType = AmountType::"Net Change" then - Doc.SetRange("Due Date", Rec."Period Start", Rec."Period End") - else - Doc.SetRange("Due Date", 0D, Rec."Period End"); - end; - - local procedure ShowDocEntries() - begin - SetDateFilter(); - PAGE.RunModal(0, Doc); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DueDateAdjust.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DueDateAdjust.Codeunit.al deleted file mode 100644 index a9aebed3062..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/DueDateAdjust.Codeunit.al +++ /dev/null @@ -1,201 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Foundation.Company; -using Microsoft.Purchases.Vendor; -using Microsoft.Sales.Customer; - -codeunit 10700 "Due Date-Adjust" -{ - - trigger OnRun() - begin - end; - - procedure SalesAdjustDueDate(var DueDate: Date; MinDate: Date; MaxDate: Date; CustomerNo: Code[20]) - var - PaymentDay: Record "Payment Day"; - NonPaymentPeriod: Record "Non-Payment Period"; - Customer: Record Customer; - begin - if CustomerNo = '' then - exit; - if not Customer.Get(CustomerNo) then - exit; - - SetNonPaymentPeriodFilterAndFields(NonPaymentPeriod, NonPaymentPeriod."Table Name"::Customer, Customer."Non-Paymt. Periods Code"); - SetPaymentDayFilterAndFields(PaymentDay, PaymentDay."Table Name"::Customer, Customer."Payment Days Code"); - AdjustDate(NonPaymentPeriod, PaymentDay, DueDate, MinDate, MaxDate); - end; - - procedure PurchAdjustDueDate(var DueDate: Date; MinDate: Date; MaxDate: Date; VendorNo: Code[20]) - var - PaymentDay: Record "Payment Day"; - NonPaymentPeriod: Record "Non-Payment Period"; - Vendor: Record Vendor; - CompanyInfo: Record "Company Information"; - IsHandled: Boolean; - begin - if VendorNo = '' then - exit; - if not Vendor.Get(VendorNo) then - exit; - - IsHandled := false; - OnPurchAdjustDueDateOnBeforeSetNonPaymentPeriodFilterAndFields(NonPaymentPeriod, Vendor, IsHandled); - if not IsHandled then - if Vendor."Non-Paymt. Periods Code" <> '' then - SetNonPaymentPeriodFilterAndFields(NonPaymentPeriod, NonPaymentPeriod."Table Name"::Vendor, Vendor."Non-Paymt. Periods Code") - else begin - CompanyInfo.Get(); - SetNonPaymentPeriodFilterAndFields( - NonPaymentPeriod, NonPaymentPeriod."Table Name"::"Company Information", CompanyInfo."Non-Paymt. Periods Code") - end; - - IsHandled := false; - OnPurchAdjustDueDateOnBeforeSetPaymentDayFilterAndFields(PaymentDay, Vendor, IsHandled); - if not IsHandled then - if Vendor."Payment Days Code" <> '' then - SetPaymentDayFilterAndFields(PaymentDay, PaymentDay."Table Name"::Vendor, Vendor."Payment Days Code") - else - SetPaymentDayFilterAndFieldsFromCompany(PaymentDay); - - AdjustDate(NonPaymentPeriod, PaymentDay, DueDate, MinDate, MaxDate); - - OnAfterPurchAdjustDueDate(DueDate, MinDate, MaxDate, VendorNo, PaymentDay); - end; - - local procedure SetPaymentDayFilterAndFieldsFromCompany(var PaymentDay: Record "Payment Day") - var - CompanyInformation: Record "Company Information"; - begin - CompanyInformation.Get(); - SetPaymentDayFilterAndFields(PaymentDay, PaymentDay."Table Name"::"Company Information", CompanyInformation."Payment Days Code"); - end; - - local procedure AdjustDate(var NonPaymentPeriod: Record "Non-Payment Period"; var PaymentDay: Record "Payment Day"; var DueDate: Date; MinDate: Date; MaxDate: Date) - var - InitialDate: Date; - ForwardCalculation: Boolean; - begin - if DueDateIsGreaterMaxAvailDate(DueDate, MinDate, MaxDate) then - DueDate := MaxDate; - ForwardCalculation := true; - - repeat - InitialDate := DueDate; - if not NonPaymentPeriod.IsEmpty() then begin - if ForwardCalculation then begin - DueDate := AdjustToNonPaymentPeriod(NonPaymentPeriod, DueDate, ForwardCalculation); - if DueDateIsGreaterMaxAvailDate(DueDate, MinDate, MaxDate) then - ForwardCalculation := false - end; - if not ForwardCalculation then - DueDate := AdjustToNonPaymentPeriod(NonPaymentPeriod, InitialDate, ForwardCalculation); - end; - if not PaymentDay.IsEmpty() then begin - if ForwardCalculation then begin - DueDate := AdjustToPaymentDay(PaymentDay, DueDate, '>', '-', '+'); - if DueDateIsGreaterMaxAvailDate(DueDate, MinDate, MaxDate) then - ForwardCalculation := false - end; - if not ForwardCalculation then - DueDate := AdjustToPaymentDay(PaymentDay, InitialDate, '<', '+', '-'); - end; - if (DueDate < MinDate) or PaymentDayInNonPaymentPeriod(NonPaymentPeriod, PaymentDay, DueDate) then begin - DueDate := 0D; - exit - end - until (DueDate = InitialDate) - end; - - local procedure AdjustToNonPaymentPeriod(var NonPaymentPeriod: Record "Non-Payment Period"; DueDate: Date; ForwardCalculation: Boolean): Date - var - PreviousFromDate: Date; - begin - PreviousFromDate := NonPaymentPeriod."From Date"; - NonPaymentPeriod."From Date" := DueDate; - if NonPaymentPeriod.Find('=<') and (DueDate <= NonPaymentPeriod."To Date") then begin - if ForwardCalculation then - DueDate := NonPaymentPeriod."To Date" + 1 - else - DueDate := NonPaymentPeriod."From Date" - 1; - - OnAdjustToNonPaymentPeriodOnAfterCalcDueDate(); - end else - if PreviousFromDate <> 0D then - NonPaymentPeriod."From Date" := PreviousFromDate; - exit(DueDate) - end; - - local procedure AdjustToPaymentDay(var PaymentDay: Record "Payment Day"; DueDate: Date; DirectionText: Text[1]; FindText: Text[1]; Sign: Text[1]): Date - begin - if (CalcDate('', DueDate) = DueDate) and PaymentDay.Get(PaymentDay."Table Name", PaymentDay.Code, 31) then - exit(DueDate); - PaymentDay."Day of the month" := Date2DMY(DueDate, 1); - if PaymentDay.Find('=') then - exit(DueDate); - if PaymentDay.Find(DirectionText) then - exit(CalcDate(StrSubstNo('<%1D%2>', Sign, PaymentDay."Day of the month"), DueDate)); - if PaymentDay.Find(FindText) then - exit(CalcDate(StrSubstNo('<%1D%2>', Sign, PaymentDay."Day of the month"), DueDate)); - exit(DueDate) - end; - - local procedure SetPaymentDayFilterAndFields(var PaymentDay: Record "Payment Day"; TableNameOption: Option; PaymentDayCode: Code[20]) - begin - PaymentDay.Reset(); - PaymentDay.SetRange("Table Name", TableNameOption); - PaymentDay.SetRange(Code, PaymentDayCode); - PaymentDay."Table Name" := TableNameOption; - PaymentDay.Code := PaymentDayCode - end; - - local procedure SetNonPaymentPeriodFilterAndFields(var NonPaymentPeriod: Record "Non-Payment Period"; TableNameOption: Option; NonPaymentPeriodCode: Code[20]) - begin - NonPaymentPeriod.Reset(); - NonPaymentPeriod.SetRange("Table Name", TableNameOption); - NonPaymentPeriod.SetRange(Code, NonPaymentPeriodCode); - NonPaymentPeriod."Table Name" := TableNameOption; - NonPaymentPeriod.Code := NonPaymentPeriodCode - end; - - local procedure PaymentDayInNonPaymentPeriod(var NonPaymentPeriod: Record "Non-Payment Period"; PaymentDay: Record "Payment Day"; PaymentDate: Date): Boolean - begin - if not NonPaymentPeriod.IsEmpty() and not PaymentDay.IsEmpty() then begin - if (PaymentDate >= NonPaymentPeriod."From Date") and (PaymentDate <= NonPaymentPeriod."To Date") then - exit(true); - - exit(false); - end; - end; - - local procedure DueDateIsGreaterMaxAvailDate(DueDate: Date; MinDate: Date; MaxDate: Date): Boolean - begin - exit((DueDate > MaxDate) and (MinDate <> MaxDate)); - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterPurchAdjustDueDate(var DueDate: Date; MinDate: Date; MaxDate: Date; VendorNo: Code[20]; var PaymentDay: Record "Payment Day") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAdjustToNonPaymentPeriodOnAfterCalcDueDate() - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnPurchAdjustDueDateOnBeforeSetNonPaymentPeriodFilterAndFields(var NonPaymentPeriod: Record "Non-Payment Period"; Vendor: Record Vendor; IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnPurchAdjustDueDateOnBeforeSetPaymentDayFilterAndFields(var PaymentDay: Record "Payment Day"; Vendor: Record Vendor; IsHandled: Boolean) - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/FeeRange.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/FeeRange.Table.al deleted file mode 100644 index fa12b1fbf99..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/FeeRange.Table.al +++ /dev/null @@ -1,667 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; - -table 7000019 "Fee Range" -{ - Caption = 'Fee Range'; - DrillDownPageID = "Fee Ranges"; - LookupPageID = "Fee Ranges"; - DataClassification = CustomerContent; - - fields - { - field(1; "Code"; Code[20]) - { - Caption = 'Code'; - NotBlank = true; - } - field(2; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - } - field(3; "Type of Fee"; Option) - { - Caption = 'Type of Fee'; - OptionCaption = 'Collection Expenses,Discount Expenses,Discount Interests,Rejection Expenses,Payment Order Expenses,Unrisked Factoring Expenses,Risked Factoring Expenses '; - OptionMembers = "Collection Expenses","Discount Expenses","Discount Interests","Rejection Expenses","Payment Order Expenses","Unrisked Factoring Expenses","Risked Factoring Expenses "; - } - field(4; "From No. of Days"; Integer) - { - Caption = 'From No. of Days'; - MinValue = 0; - - trigger OnValidate() - begin - if "From No. of Days" <> 0 then - TestField("Type of Fee", "Type of Fee"::"Discount Interests"); - end; - } - field(5; "Charge Amount per Doc."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Charge Amount per Doc.'; - MinValue = 0; - } - field(6; "Charge % per Doc."; Decimal) - { - AutoFormatType = 0; - Caption = 'Charge % per Doc.'; - DecimalPlaces = 2 : 6; - MaxValue = 100; - MinValue = 0; - } - field(7; "Minimum Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Minimum Amount'; - } - } - - keys - { - key(Key1; "Code", "Currency Code", "Type of Fee", "From No. of Days") - { - Clustered = true; - } - } - - fieldgroups - { - } - - var - Text1100000: Label 'untitled'; - Text1100001: Label 'CollExpenses'; - Text1100002: Label 'Out of Range'; - Text1100003: Label 'DiscExpenses'; - Text1100004: Label 'DiscInterests'; - Text1100005: Label 'RejExpenses'; - Text1100006: Label 'PmtOrdCollExpenses'; - Text1100007: Label 'RiskFactExpenses'; - Text1100008: Label 'UnriskFactExpenses'; - Currency: Record Currency; - OperationFee: Record "Operation Fee"; - DiscExpenses: Record "BG/PO Post. Buffer" temporary; - CollExpenses: Record "BG/PO Post. Buffer" temporary; - DiscInterests: Record "BG/PO Post. Buffer" temporary; - RejExpenses: Record "BG/PO Post. Buffer" temporary; - PmtOrdCollExpenses: Record "BG/PO Post. Buffer" temporary; - RiskFactExpenses: Record "BG/PO Post. Buffer" temporary; - UnriskFactExpenses: Record "BG/PO Post. Buffer" temporary; - Initialized: Boolean; - TotalDiscExpensesAmt: Decimal; - InitDiscExpensesAmt: Decimal; - TotalCollExpensesAmt: Decimal; - TotalDiscInterestsAmt: Decimal; - InitDiscInterestsAmt: Decimal; - TotalRejExpensesAmt: Decimal; - InitRejExpensesAmt: Decimal; - TotalPmtOrdCollExpensesAmt: Decimal; - TotalRiskFactExpensesAmt: Decimal; - InitRiskFactExpensesAmt: Decimal; - TotalUnriskFactExpensesAmt: Decimal; - InitUnriskFactExpensesAmt: Decimal; - "Sum": Decimal; - Factor: Decimal; - - procedure Caption(): Text - var - BankAcc: Record "Bank Account"; - begin - if Code = '' then - exit(Text1100000); - BankAcc.Get(Code); - exit(StrSubstNo('%1 %2 %3 %4', BankAcc."No.", BankAcc.Name, "Currency Code", "Type of Fee")); - end; - - local procedure InitCurrency() - begin - if Initialized then - exit; - - if "Currency Code" = '' then - Currency.InitRoundingPrecision() - else begin - Currency.Get("Currency Code"); - Currency.TestField("Amount Rounding Precision"); - end; - Initialized := true; - end; - - procedure InitCollExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - TotalCollExpensesAmt := 0; - if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Collection Expenses") then - TotalCollExpensesAmt := - Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); - - CollExpenses.DeleteAll(); - end; - - procedure CalcCollExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - SetRange(Code, Code2); - SetRange("Currency Code", CurrencyCode2); - SetRange("Type of Fee", "Type of Fee"::"Collection Expenses"); - if Find('=><') then begin - Amount := Round( - "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, - Currency."Amount Rounding Precision"); - if Amount < "Minimum Amount" then - Amount := "Minimum Amount"; - TotalCollExpensesAmt := TotalCollExpensesAmt + Amount; - end; - if CollExpenses.Get(Text1100001, '', EntryNo) then begin - CollExpenses.Amount := CollExpenses.Amount + Amount; - CollExpenses.Modify(); - end else begin - CollExpenses.Init(); - CollExpenses.Account := Text1100001; - CollExpenses."Entry No." := EntryNo; - // CollExpenses."Global Dimension 1 Code" := Dep; - // CollExpenses."Global Dimension 2 Code" := Proj; - CollExpenses.Amount := Amount; - CollExpenses.Insert(); - end; - end; - - procedure GetTotalCollExpensesAmt(): Decimal - begin - exit(TotalCollExpensesAmt); - end; - - procedure InitDiscExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - TotalDiscExpensesAmt := 0; - if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Discount Expenses") then - TotalDiscExpensesAmt := - Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); - - InitDiscExpensesAmt := TotalDiscExpensesAmt; - DiscExpenses.DeleteAll(); - end; - - procedure CalcDiscExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - SetRange(Code, Code2); - SetRange("Currency Code", CurrencyCode2); - SetRange("Type of Fee", "Type of Fee"::"Discount Expenses"); - if Find('=><') then begin - Amount := Round( - "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, - Currency."Amount Rounding Precision"); - if Amount < "Minimum Amount" then - Amount := "Minimum Amount"; - TotalDiscExpensesAmt := TotalDiscExpensesAmt + Amount; - end else - Amount := 0; - - if DiscExpenses.Get(Text1100003, '', EntryNo) then begin - DiscExpenses.Amount := DiscExpenses.Amount + Amount; - DiscExpenses.Modify(); - end else begin - DiscExpenses.Init(); - DiscExpenses.Account := Text1100003; - DiscExpenses."Entry No." := EntryNo; - // DiscExpenses."Global Dimension 1 Code" := Dep; - // DiscExpenses."Global Dimension 2 Code" := Proj; - DiscExpenses.Amount := Amount; - DiscExpenses.Insert(); - end; - end; - - procedure GetTotalDiscExpensesAmt(): Decimal - begin - exit(TotalDiscExpensesAmt); - end; - - procedure NoRegsDiscExpenses(): Integer - begin - DiscExpenses.SetRange(Account, Text1100003); - if DiscExpenses.Find('-') and (InitDiscExpensesAmt <> 0) then begin - Sum := 0; - repeat - Sum := Sum + DiscExpenses.Amount; - until DiscExpenses.Next() <= 0; - - if Sum <> 0 then - Factor := InitDiscExpensesAmt / Sum - else - Factor := 1; - DiscExpenses.Find('-'); - repeat - Sum := Round(DiscExpenses.Amount * Factor, Currency."Amount Rounding Precision"); - DiscExpenses.Amount := DiscExpenses.Amount + Sum; - InitDiscExpensesAmt := InitDiscExpensesAmt - Sum; - DiscExpenses.Modify(); - until DiscExpenses.Next() <= 0; - if Round(InitDiscExpensesAmt, Currency."Amount Rounding Precision") <> 0 then begin - DiscExpenses.Find('+'); - DiscExpenses.Amount := DiscExpenses.Amount + Round(InitDiscExpensesAmt, Currency."Amount Rounding Precision"); - InitDiscExpensesAmt := 0; - DiscExpenses.Modify(); - end; - end; - exit(DiscExpenses.Count); - end; - - procedure GetDiscExpensesAmt(var value: Record "BG/PO Post. Buffer"; Register: Integer) - begin - DiscExpenses.SetRange(Account, Text1100003); - DiscExpenses.Find('-'); - if Register <> DiscExpenses.Next(Register) then - Error(Text1100002); - value := DiscExpenses; - end; - - procedure InitDiscInterests(Code2: Code[20]; CurrencyCode2: Code[10]) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - TotalDiscInterestsAmt := 0; - if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Discount Interests") then - TotalDiscInterestsAmt := - Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); - - InitDiscInterestsAmt := TotalDiscInterestsAmt; - DiscInterests.DeleteAll(); - end; - - procedure CalcDiscInterestsAmt(Code2: Code[20]; CurrencyCode2: Code[10]; NoOfDays: Integer; Amount: Decimal; EntryNo: Integer) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - if NoOfDays <= 0 then - exit; - SetRange(Code, Code2); - SetRange("Currency Code", CurrencyCode2); - SetFilter("From No. of Days", '<=%1', NoOfDays); - SetRange("Type of Fee", "Type of Fee"::"Discount Interests"); - if Find('+') then begin - Amount := Round( - "Charge Amount per Doc." + Amount * "Charge % per Doc." * NoOfDays / 36000, - Currency."Amount Rounding Precision"); - if Amount < "Minimum Amount" then - Amount := "Minimum Amount"; - TotalDiscInterestsAmt := TotalDiscInterestsAmt + Amount; - end else - Amount := 0; - - SetRange("Type of Fee"); - - if DiscInterests.Get(Text1100004, '', EntryNo) then begin - DiscInterests.Amount := DiscInterests.Amount + Amount; - DiscInterests.Modify(); - end else begin - DiscInterests.Init(); - DiscInterests.Account := Text1100004; - DiscInterests."Entry No." := EntryNo; - DiscInterests.Amount := Amount; - DiscInterests.Insert(); - end; - end; - - procedure GetTotalDiscInterestsAmt(): Decimal - begin - exit(TotalDiscInterestsAmt); - end; - - procedure NoRegsDiscInterests(): Integer - begin - DiscInterests.SetRange(Account, Text1100004); - if DiscInterests.Find('-') and (InitDiscInterestsAmt <> 0) then begin - Sum := 0; - repeat - Sum := Sum + DiscInterests.Amount; - until DiscInterests.Next() <= 0; - - if Sum <> 0 then - Factor := InitDiscInterestsAmt / Sum - else - Factor := 1; - DiscInterests.Find('-'); - repeat - Sum := Round(DiscInterests.Amount * Factor, Currency."Amount Rounding Precision"); - DiscInterests.Amount := DiscInterests.Amount + Sum; - InitDiscInterestsAmt := InitDiscInterestsAmt - Sum; - DiscInterests.Modify(); - until DiscInterests.Next() <= 0; - if Round(InitDiscInterestsAmt, Currency."Amount Rounding Precision") <> 0 then begin - DiscInterests.Find('+'); - DiscInterests.Amount := DiscInterests.Amount + Round(InitDiscInterestsAmt, Currency."Amount Rounding Precision"); - InitDiscInterestsAmt := 0; - DiscInterests.Modify(); - end; - end; - exit(DiscInterests.Count); - end; - - procedure GetDiscInterestsAmt(var value: Record "BG/PO Post. Buffer"; Register: Integer) - begin - DiscInterests.SetRange(Account, Text1100004); - DiscInterests.Find('-'); - if Register <> DiscInterests.Next(Register) then - Error(Text1100002); - value := DiscInterests; - end; - - procedure InitRejExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - TotalRejExpensesAmt := 0; - if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Rejection Expenses") then - TotalRejExpensesAmt := - Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); - - InitRejExpensesAmt := TotalRejExpensesAmt; - RejExpenses.DeleteAll(); - end; - - procedure CalcRejExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - SetRange(Code, Code2); - SetRange("Currency Code", CurrencyCode2); - SetRange("Type of Fee", "Type of Fee"::"Rejection Expenses"); - if Find('=><') then begin - Amount := Round( - "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, - Currency."Amount Rounding Precision"); - if Amount < "Minimum Amount" then - Amount := "Minimum Amount"; - TotalRejExpensesAmt := TotalRejExpensesAmt + Amount; - end; - SetRange("Type of Fee"); - - if RejExpenses.Get(Text1100005, '', EntryNo) then begin - RejExpenses.Amount := RejExpenses.Amount + Amount; - RejExpenses.Modify(); - end else begin - RejExpenses.Init(); - RejExpenses.Account := Text1100005; - RejExpenses."Entry No." := EntryNo; - RejExpenses.Amount := Amount; - RejExpenses.Insert(); - end; - end; - - procedure GetTotalRejExpensesAmt(): Decimal - begin - exit(TotalRejExpensesAmt); - end; - - procedure NoRegRejExpenses(): Integer - begin - RejExpenses.SetRange(Account, Text1100005); - if RejExpenses.Find('-') and (InitRejExpensesAmt <> 0) then begin - Sum := 0; - repeat - Sum := Sum + RejExpenses.Amount; - until RejExpenses.Next() <= 0; - - if Sum <> 0 then - Factor := InitRejExpensesAmt / Sum - else - Factor := 1; - RejExpenses.Find('-'); - repeat - Sum := Round(RejExpenses.Amount * Factor, Currency."Amount Rounding Precision"); - RejExpenses.Amount := RejExpenses.Amount + Sum; - InitRejExpensesAmt := InitRejExpensesAmt - Sum; - RejExpenses.Modify(); - until RejExpenses.Next() <= 0; - if Round(InitRejExpensesAmt, Currency."Amount Rounding Precision") <> 0 then begin - RejExpenses.Find('+'); - RejExpenses.Amount := RejExpenses.Amount + Round(InitRejExpensesAmt, Currency."Amount Rounding Precision"); - InitRejExpensesAmt := 0; - RejExpenses.Modify(); - end; - end; - exit(RejExpenses.Count); - end; - - procedure GetRejExpensesAmt(var value: Record "BG/PO Post. Buffer"; Register: Integer) - begin - RejExpenses.SetRange(Account, Text1100005); - RejExpenses.Find('-'); - if Register <> RejExpenses.Next(Register) then - Error(Text1100002); - value := RejExpenses; - end; - - procedure InitPmtOrdCollExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - TotalPmtOrdCollExpensesAmt := 0; - if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Payment Order Expenses") then - TotalPmtOrdCollExpensesAmt := - Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); - - PmtOrdCollExpenses.DeleteAll(); - end; - - procedure CalcPmtOrdCollExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - SetRange(Code, Code2); - SetRange("Currency Code", CurrencyCode2); - SetRange("Type of Fee", "Type of Fee"::"Payment Order Expenses"); - if Find('=><') then begin - Amount := Round( - "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, - Currency."Amount Rounding Precision"); - if Amount < "Minimum Amount" then - Amount := "Minimum Amount"; - TotalPmtOrdCollExpensesAmt := TotalPmtOrdCollExpensesAmt + Amount; - end; - - if PmtOrdCollExpenses.Get(Text1100006, '', EntryNo) then begin - PmtOrdCollExpenses.Amount := PmtOrdCollExpenses.Amount + Amount; - PmtOrdCollExpenses.Modify(); - end else begin - PmtOrdCollExpenses.Init(); - PmtOrdCollExpenses.Account := Text1100006; - PmtOrdCollExpenses."Entry No." := EntryNo; - PmtOrdCollExpenses.Amount := Amount; - PmtOrdCollExpenses.Insert(); - end; - end; - - procedure GetTotalPmtOrdCollExpensesAmt(): Decimal - begin - exit(TotalPmtOrdCollExpensesAmt); - end; - - procedure InitRiskFactExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - TotalRiskFactExpensesAmt := 0; - if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Risked Factoring Expenses ") then - TotalRiskFactExpensesAmt := - Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); - - InitRiskFactExpensesAmt := TotalRiskFactExpensesAmt; - RiskFactExpenses.DeleteAll(); - end; - - procedure CalcRiskFactExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - SetRange(Code, Code2); - SetRange("Currency Code", CurrencyCode2); - SetRange("Type of Fee", "Type of Fee"::"Risked Factoring Expenses "); - if Find('=><') then begin - Amount := Round( - "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, - Currency."Amount Rounding Precision"); - if Amount < "Minimum Amount" then - Amount := "Minimum Amount"; - TotalRiskFactExpensesAmt := TotalRiskFactExpensesAmt + Amount; - end; - - if RiskFactExpenses.Get(Text1100007, '', EntryNo) then begin - RiskFactExpenses.Amount := RiskFactExpenses.Amount + Amount; - RiskFactExpenses.Modify(); - end else begin - RiskFactExpenses.Init(); - RiskFactExpenses.Account := Text1100007; - RiskFactExpenses."Entry No." := EntryNo; - RiskFactExpenses.Amount := Amount; - RiskFactExpenses.Insert(); - end; - end; - - procedure GetTotalRiskFactExpensesAmt(): Decimal - begin - exit(TotalRiskFactExpensesAmt); - end; - - procedure NoRegRiskFactExpenses(): Integer - begin - RiskFactExpenses.SetRange(Account, Text1100007); - if RiskFactExpenses.Find('-') and (InitRiskFactExpensesAmt <> 0) then begin - Sum := 0; - repeat - Sum := Sum + RiskFactExpenses.Amount; - until RiskFactExpenses.Next() <= 0; - - if Sum <> 0 then - Factor := InitRiskFactExpensesAmt / Sum - else - Factor := 1; - RiskFactExpenses.Find('-'); - repeat - Sum := Round(RiskFactExpenses.Amount * Factor, Currency."Amount Rounding Precision"); - RiskFactExpenses.Amount := RiskFactExpenses.Amount + Sum; - InitRiskFactExpensesAmt := InitRiskFactExpensesAmt - Sum; - RiskFactExpenses.Modify(); - until RiskFactExpenses.Next() <= 0; - if Round(InitRiskFactExpensesAmt, Currency."Amount Rounding Precision") <> 0 then begin - RiskFactExpenses.Find('+'); - RiskFactExpenses.Amount := RiskFactExpenses.Amount + Round(InitRiskFactExpensesAmt, Currency."Amount Rounding Precision"); - InitRiskFactExpensesAmt := 0; - RiskFactExpenses.Modify(); - end; - end; - exit(RiskFactExpenses.Count); - end; - - procedure GetRiskFactExpenses(var value: Record "BG/PO Post. Buffer"; Register: Integer) - begin - RiskFactExpenses.SetRange(Account, Text1100007); - RiskFactExpenses.Find('-'); - if Register <> RiskFactExpenses.Next(Register) then - Error(Text1100002); - value := RiskFactExpenses; - end; - - procedure InitUnriskFactExpenses(Code2: Code[20]; CurrencyCode2: Code[10]) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - TotalUnriskFactExpensesAmt := 0; - if OperationFee.Get(Code2, CurrencyCode2, "Type of Fee"::"Unrisked Factoring Expenses") then - TotalUnriskFactExpensesAmt := - Round(OperationFee."Charge Amt. per Operation", Currency."Amount Rounding Precision"); - - InitUnriskFactExpensesAmt := TotalUnriskFactExpensesAmt; - UnriskFactExpenses.DeleteAll(); - end; - - procedure CalcUnriskFactExpensesAmt(Code2: Code[20]; CurrencyCode2: Code[10]; Amount: Decimal; EntryNo: Integer) - begin - "Currency Code" := CurrencyCode2; - InitCurrency(); - SetRange(Code, Code2); - SetRange("Currency Code", CurrencyCode2); - SetRange("Type of Fee", "Type of Fee"::"Unrisked Factoring Expenses"); - if Find('=><') then begin - Amount := Round( - "Charge Amount per Doc." + Amount * "Charge % per Doc." / 100, - Currency."Amount Rounding Precision"); - if Amount < "Minimum Amount" then - Amount := "Minimum Amount"; - TotalUnriskFactExpensesAmt := TotalUnriskFactExpensesAmt + Amount; - end; - - if UnriskFactExpenses.Get(Text1100008, '', EntryNo) then begin - UnriskFactExpenses.Amount := UnriskFactExpenses.Amount + Amount; - UnriskFactExpenses.Modify(); - end else begin - UnriskFactExpenses.Init(); - UnriskFactExpenses.Account := Text1100008; - UnriskFactExpenses."Entry No." := EntryNo; - UnriskFactExpenses.Amount := Amount; - UnriskFactExpenses.Insert(); - end; - end; - - procedure GetTotalUnriskFactExpensesAmt(): Decimal - begin - exit(TotalUnriskFactExpensesAmt); - end; - - procedure NoRegUnriskFactExpenses(): Integer - begin - UnriskFactExpenses.SetRange(Account, Text1100008); - if UnriskFactExpenses.Find('-') and (InitUnriskFactExpensesAmt <> 0) then begin - Sum := 0; - repeat - Sum := Sum + UnriskFactExpenses.Amount; - until UnriskFactExpenses.Next() <= 0; - - if Sum <> 0 then - Factor := InitUnriskFactExpensesAmt / Sum - else - Factor := 1; - UnriskFactExpenses.Find('-'); - repeat - Sum := Round(UnriskFactExpenses.Amount * Factor, Currency."Amount Rounding Precision"); - UnriskFactExpenses.Amount := UnriskFactExpenses.Amount + Sum; - InitUnriskFactExpensesAmt := InitUnriskFactExpensesAmt - Sum; - UnriskFactExpenses.Modify(); - until UnriskFactExpenses.Next() <= 0; - if Round(InitUnriskFactExpensesAmt, Currency."Amount Rounding Precision") <> 0 then begin - UnriskFactExpenses.Find('+'); - UnriskFactExpenses.Amount := UnriskFactExpenses.Amount + - Round(InitUnriskFactExpensesAmt, Currency."Amount Rounding Precision"); - InitUnriskFactExpensesAmt := 0; - UnriskFactExpenses.Modify(); - end; - end; - exit(UnriskFactExpenses.Count); - end; - - procedure GetUnriskFactExpenses(var value: Record "BG/PO Post. Buffer"; Register: Integer) - begin - UnriskFactExpenses.SetRange(Account, Text1100008); - UnriskFactExpenses.Find('-'); - if Register <> UnriskFactExpenses.Next(Register) then - Error(Text1100002); - value := UnriskFactExpenses; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/FeeRanges.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/FeeRanges.Page.al deleted file mode 100644 index 96855eee59f..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/FeeRanges.Page.al +++ /dev/null @@ -1,49 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 7000049 "Fee Ranges" -{ - Caption = 'Fee Ranges'; - DataCaptionExpression = Rec.Caption(); - PageType = List; - SourceTable = "Fee Range"; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("From No. of Days"; Rec."From No. of Days") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of days for which commissions will be charged.'; - } - field("Charge Amount per Doc."; Rec."Charge Amount per Doc.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount per document that will be charged for each of the operations that generates commissions.'; - } - field("Charge % per Doc."; Rec."Charge % per Doc.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the percentage per document that will be charged for each type of operation that generates commissions.'; - } - field("Minimum Amount"; Rec."Minimum Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the minimum amount charged for each operation type, if the sum of the rest of the commissions is less than this minimum charge.'; - } - } - } - } - - actions - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/GLRegDocs.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/GLRegDocs.Codeunit.al deleted file mode 100644 index 73105638701..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/GLRegDocs.Codeunit.al +++ /dev/null @@ -1,71 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.GeneralLedger.Ledger; - -codeunit 7000001 "G/L Reg.-Docs." -{ - - trigger OnRun() - begin - end; - - var - Doc: Record "Cartera Doc."; - PostedDoc: Record "Posted Cartera Doc."; - ClosedDoc: Record "Closed Cartera Doc."; - - [Scope('OnPrem')] - procedure Docs(var GLReg: Record "G/L Register") - begin - Doc.SetRange("Entry No.", GLReg."From Entry No.", GLReg."To Entry No."); - PAGE.Run(0, Doc); - end; - - [Scope('OnPrem')] - procedure DocsinPostedBGPO(var GLReg: Record "G/L Register") - begin - PostedDoc.SetRange("Entry No.", GLReg."From Entry No.", GLReg."To Entry No."); - PAGE.Run(0, PostedDoc); - end; - - [Scope('OnPrem')] - procedure ClosedDocs(var GLReg: Record "G/L Register") - begin - ClosedDoc.SetRange("Entry No.", GLReg."From Entry No.", GLReg."To Entry No."); - PAGE.Run(0, ClosedDoc); - end; - - [Scope('OnPrem')] - procedure CheckPostedDocsInPostedBGPO(var GLEntry: Record "G/L Entry"): Boolean - begin - if GLEntry."Document Type" = GLEntry."Document Type"::Bill then begin - PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", GLEntry."Document No."); - if PostedDoc.FindFirst() then - exit(true); - - ClosedDoc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code", - "Currency Code", Status, Redrawn); - ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", GLEntry."Document No."); - if ClosedDoc.FindFirst() then - exit(true); - end else begin - PostedDoc.SetCurrentKey(Type, "Document No."); - PostedDoc.SetRange("Document No.", GLEntry."Document No."); - if PostedDoc.FindFirst() then - exit(true); - - ClosedDoc.SetCurrentKey(Type, "Document No."); - ClosedDoc.SetRange("Document No.", GLEntry."Document No."); - if ClosedDoc.FindFirst() then - exit(true); - end; - - exit(false); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/Installment.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/Installment.Table.al deleted file mode 100644 index 7a667634572..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/Installment.Table.al +++ /dev/null @@ -1,78 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Foundation.PaymentTerms; - -table 7000018 Installment -{ - Caption = 'Installment'; - DrillDownPageID = Installments; - LookupPageID = Installments; - DataClassification = CustomerContent; - - fields - { - field(1; "Payment Terms Code"; Code[10]) - { - Caption = 'Payment Terms Code'; - TableRelation = "Payment Terms"; - } - field(2; "Line No."; Integer) - { - Caption = 'Line No.'; - } - field(3; "% of Total"; Decimal) - { - AutoFormatType = 0; - Caption = '% of Total'; - DecimalPlaces = 2 : 5; - MaxValue = 100; - - trigger OnValidate() - begin - CheckTotalInstallmentPerc(); - end; - } - field(4; "Gap between Installments"; Code[20]) - { - Caption = 'Gap between Installments'; - DateFormula = true; - } - } - - keys - { - key(Key1; "Payment Terms Code", "Line No.") - { - Clustered = true; - } - } - - fieldgroups - { - } - - trigger OnInsert() - begin - CheckTotalInstallmentPerc(); - end; - - var - Text10700: Label 'The total of "% of Total" cannot be greater than 100.'; - - [Scope('OnPrem')] - procedure CheckTotalInstallmentPerc() - var - Installment: Record Installment; - begin - Installment.SetRange("Payment Terms Code", "Payment Terms Code"); - Installment.SetFilter("Line No.", '<>%1', "Line No."); - Installment.CalcSums("% of Total"); - if Installment."% of Total" + "% of Total" > 100 then - Error(Text10700); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/Installments.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/Installments.Page.al deleted file mode 100644 index 54859584647..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/Installments.Page.al +++ /dev/null @@ -1,40 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 7000048 Installments -{ - AutoSplitKey = true; - Caption = 'Installments'; - DataCaptionFields = "Payment Terms Code"; - PageType = List; - SourceTable = Installment; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("% of Total"; Rec."% of Total") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the percentage of the total amount that will be applied to each one of the bills to be created.'; - } - field("Gap between Installments"; Rec."Gap between Installments") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the time interval to be added to the due date of a bill, to obtain the due date of the next.'; - } - } - } - } - - actions - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/InvoiceSplitPayment.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/InvoiceSplitPayment.Codeunit.al deleted file mode 100644 index 465c66c002a..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/InvoiceSplitPayment.Codeunit.al +++ /dev/null @@ -1,824 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Bank.DirectDebit; -using Microsoft.Finance.Currency; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.VAT.Setup; -using Microsoft.Foundation.PaymentTerms; -using Microsoft.Purchases.Document; -using Microsoft.Purchases.Payables; -using Microsoft.Purchases.Setup; -using Microsoft.Sales.Customer; -using Microsoft.Sales.Document; -using Microsoft.Sales.Receivables; -using Microsoft.Sales.Setup; - -codeunit 7000005 "Invoice-Split Payment" -{ - - trigger OnRun() - begin - end; - - var - PaymentMethod: Record "Payment Method"; - PaymentTerms: Record "Payment Terms"; - GenJnlLine: Record "Gen. Journal Line"; - GenJnlLine2: Record "Gen. Journal Line"; - GLSetup: Record "General Ledger Setup"; - SalesSetup: Record "Sales & Receivables Setup"; - PurchSetup: Record "Purchases & Payables Setup"; - Currency: Record Currency; - CurrencyExchRate: Record "Currency Exchange Rate"; - Installment: Record Installment; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - DueDateAdjust: Codeunit "Due Date-Adjust"; - CurrencyFactor: Decimal; - VATAmountLCY: Decimal; - TotalAmount: Decimal; - TotalAmountLCY: Decimal; - RemainingAmount: Decimal; - RemainingAmountLCY: Decimal; - NextDueDate: Date; - CurrDocNo: Integer; - TotalPerc: Decimal; - ExistsVATNoReal: Boolean; - ErrorMessage: Boolean; - Text001: Label 'Sales %1 no. %2 cannot be posted, because the due date field for one or more installments is more than the legal limit of %3 days after the document date %4 for the original document.'; - Text002: Label 'Purchase %1 no. %2 cannot be posted, because the due date field for one or more installments is more than the legal limit of %3 days after the document date %4 for the original document.'; - Text1100000: Label 'You cannot select a bill-based %1 for a Credit memo.'; - Text1100001: Label '%1 must be 1 if %2 is True in %3'; - Text1100002: Label 'Transfer of Invoice %1 into bills'; - Text1100003: Label 'Unrealized VAT Type must be "Percentage" in VAT Posting Setup.'; - Text1100004: Label 'Bill %1/%2'; - Text1100005: Label 'The sum of %1 cannot be greater then 100 in the installments for %2 %3.'; - - procedure SplitSalesInv(var SalesHeader: Record "Sales Header"; var CustLedgEntry: Record "Cust. Ledger Entry"; var Window: Dialog; SourceCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; VATAmount: Decimal; HideProgressWindow: Boolean) - var - VATPostingSetup: Record "VAT Posting Setup"; - SepaDirectDebitMandate: Record "SEPA Direct Debit Mandate"; - BillNo: Integer; - IsHandled: Boolean; - begin - if not PaymentMethod.Get(SalesHeader."Payment Method Code") then - exit; - if (not PaymentMethod."Create Bills") and (not PaymentMethod."Invoices to Cartera") then - exit; - IsHandled := false; - OnSplitSalesInvOnBeforeCheckPaymentMethod(SalesHeader, PaymentMethod, PaymentTerms, IsHandled); - if not IsHandled then - if PaymentMethod."Create Bills" and (SalesHeader."Document Type" = SalesHeader."Document Type"::"Credit Memo") then - Error(Text1100000, SalesHeader.FieldCaption("Payment Method Code")); - - if SalesHeader."Currency Code" = '' then - CurrencyFactor := 1 - else - CurrencyFactor := SalesHeader."Currency Factor"; - - GLSetup.Get(); - SalesSetup.GetRecordOnce(); - SalesHeader.TestField("Payment Terms Code"); - PaymentTerms.Get(SalesHeader."Payment Terms Code"); - PaymentTerms.CalcFields("No. of Installments"); - if PaymentTerms."No. of Installments" = 0 then - PaymentTerms."No. of Installments" := 1; - IsHandled := false; - OnSplitSalesInvOnBeforeCheckPaymentMethod(SalesHeader, PaymentMethod, PaymentTerms, IsHandled); - if not IsHandled then - if PaymentMethod."Invoices to Cartera" and (PaymentTerms."No. of Installments" > 1) then - Error( - Text1100001, - PaymentTerms.FieldCaption("No. of Installments"), - PaymentMethod.FieldCaption("Invoices to Cartera"), - PaymentMethod.TableCaption()); - CustLedgEntry.Find('+'); - CustLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - if CustLedgEntry."Remaining Amount" = 0 then - exit; - - TotalAmount := CustLedgEntry."Remaining Amount"; - TotalAmountLCY := CustLedgEntry."Remaining Amt. (LCY)"; - RemainingAmount := TotalAmount; - RemainingAmountLCY := TotalAmountLCY; - // close invoice entry - if PaymentMethod."Create Bills" then begin - GenJnlLine.Init(); - GenJnlLine."Posting Date" := SalesHeader."Posting Date"; - GenJnlLine."Document Date" := SalesHeader."Document Date"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Customer); - GenJnlLine.Validate("Account No.", SalesHeader."Bill-to Customer No."); - GenJnlLine."Document Type" := GenJnlLine."Document Type"::" "; - GenJnlLine."Document No." := GenJnlLineDocNo; - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, GenJnlLineDocNo), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine."Shortcut Dimension 1 Code" := SalesHeader."Shortcut Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := SalesHeader."Shortcut Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := SalesHeader."Dimension Set ID"; - GenJnlLine."Direct Debit Mandate ID" := SalesHeader."Direct Debit Mandate ID"; - GenJnlLine."Reason Code" := SalesHeader."Reason Code"; - GenJnlLine."External Document No." := GenJnlLineExtDocNo; - GenJnlLine.Validate("Currency Code", SalesHeader."Currency Code"); - GenJnlLine.Amount := -TotalAmount; - GenJnlLine."Amount (LCY)" := -TotalAmountLCY; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."On Hold" := SalesHeader."On Hold"; - GenJnlLine."Applies-to Doc. Type" := GenJnlLine."Applies-to Doc. Type"::Invoice; - GenJnlLine."Applies-to Doc. No." := GenJnlLineDocNo; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."Currency Factor" := CurrencyFactor; - GenJnlLine."Payment Terms Code" := SalesHeader."Payment Terms Code"; - GenJnlLine."Payment Method Code" := SalesHeader."Payment Method Code"; - if SepaDirectDebitMandate.Get(SalesHeader."Direct Debit Mandate ID") then - GenJnlLine."Recipient Bank Account" := SepaDirectDebitMandate."Customer Bank Account Code" - else - GenJnlLine."Recipient Bank Account" := SalesHeader."Cust. Bank Acc. Code"; - GenJnlLine."Salespers./Purch. Code" := SalesHeader."Salesperson Code"; - - if GLSetup."Unrealized VAT" then begin - FindCustVATSetup(VATPostingSetup, SalesHeader); - if ErrorMessage then - Error(Text1100003); - end; - - OnBeforeSplitSalesInvCloseEntry(GenJnlLine, SalesHeader); - - if GLSetup."Unrealized VAT" and ExistsVATNoReal then - GenJnlLine2.Copy(GenJnlLine) - else - GenJnlPostLine.Run(GenJnlLine); - end; - // create bills - if SalesHeader."Currency Code" = '' then begin - Currency."Invoice Rounding Precision" := GLSetup."Inv. Rounding Precision (LCY)"; - Currency."Invoice Rounding Type" := GLSetup."Inv. Rounding Type (LCY)"; - Currency."Amount Rounding Precision" := GLSetup."Amount Rounding Precision"; - if SalesSetup."Invoice Rounding" then - GLSetup.TestField("Inv. Rounding Precision (LCY)") - else - GLSetup.TestField("Amount Rounding Precision"); - end else begin - Currency.Get(SalesHeader."Currency Code"); - if SalesSetup."Invoice Rounding" then - Currency.TestField("Invoice Rounding Precision") - else - Currency.TestField("Amount Rounding Precision"); - end; - TotalAmount := RoundReceivableAmt(TotalAmount); - - VATAmountLCY := RoundReceivableAmtLCY(VATAmount / CurrencyFactor); - - if PaymentTerms."No. of Installments" > 0 then begin - Installment.SetRange("Payment Terms Code", PaymentTerms.Code); - if Installment.Find('-') then; - end; - - NextDueDate := SalesHeader."Due Date"; - - GenJnlLine.Init(); - GenJnlLine."Posting Date" := SalesHeader."Posting Date"; - GenJnlLine."Document Date" := SalesHeader."Document Date"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Customer); - GenJnlLine.Validate("Account No.", SalesHeader."Bill-to Customer No."); - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Bill; - GenJnlLine."Document No." := GenJnlLineDocNo; - GenJnlLine."Shortcut Dimension 1 Code" := SalesHeader."Shortcut Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := SalesHeader."Shortcut Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := SalesHeader."Dimension Set ID"; - GenJnlLine."Direct Debit Mandate ID" := SalesHeader."Direct Debit Mandate ID"; - GenJnlLine."Reason Code" := SalesHeader."Reason Code"; - GenJnlLine."External Document No." := GenJnlLineExtDocNo; - GenJnlLine.Validate("Currency Code", SalesHeader."Currency Code"); - GenJnlLine."System-Created Entry" := true; - GenJnlLine."On Hold" := SalesHeader."On Hold"; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."Currency Factor" := CurrencyFactor; - GenJnlLine."Payment Terms Code" := SalesHeader."Payment Terms Code"; - GenJnlLine."Payment Method Code" := SalesHeader."Payment Method Code"; - if SepaDirectDebitMandate.Get(SalesHeader."Direct Debit Mandate ID") then - GenJnlLine."Recipient Bank Account" := SepaDirectDebitMandate."Customer Bank Account Code" - else - GenJnlLine."Recipient Bank Account" := SalesHeader."Cust. Bank Acc. Code"; - GenJnlLine."Salespers./Purch. Code" := SalesHeader."Salesperson Code"; - - CurrDocNo := 1; - repeat - GenJnlLine."Due Date" := NextDueDate; - CheckSalesDueDate(SalesHeader, GenJnlLine."Due Date", PaymentTerms."Max. No. of Days till Due Date"); - if not SalesHeader."Due Date Modified" then - DueDateAdjust.SalesAdjustDueDate( - GenJnlLine."Due Date", SalesHeader."Document Date", PaymentTerms.CalculateMaxDueDate(SalesHeader."Document Date"), SalesHeader."Bill-to Customer No."); - NextDueDate := GenJnlLine."Due Date"; - if CurrDocNo < PaymentTerms."No. of Installments" then begin - Installment.TestField("% of Total"); - if CurrDocNo = 1 then begin - TotalPerc := Installment."% of Total"; - case PaymentTerms."VAT distribution" of - PaymentTerms."VAT distribution"::"First Installment": - begin - GenJnlLine.Amount := RoundReceivableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100 + VATAmount); - GenJnlLine."Amount (LCY)" := - RoundReceivableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - PaymentTerms."VAT distribution"::"Last Installment": - begin - GenJnlLine.Amount := RoundReceivableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100); - GenJnlLine."Amount (LCY)" := - RoundReceivableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - PaymentTerms."VAT distribution"::Proportional: - begin - GenJnlLine.Amount := RoundReceivableAmt(TotalAmount * Installment."% of Total" / 100); - GenJnlLine."Amount (LCY)" := - RoundReceivableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - end; - end else begin - TotalPerc := TotalPerc + Installment."% of Total"; - if TotalPerc >= 100 then - Error( - Text1100005, - Installment.FieldCaption("% of Total"), - PaymentTerms.TableCaption(), - PaymentTerms.Code); - case PaymentTerms."VAT distribution" of - PaymentTerms."VAT distribution"::"First Installment", - PaymentTerms."VAT distribution"::"Last Installment": - begin - GenJnlLine.Amount := RoundReceivableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100); - GenJnlLine."Amount (LCY)" := - RoundReceivableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - PaymentTerms."VAT distribution"::Proportional: - begin - GenJnlLine.Amount := RoundReceivableAmt(TotalAmount * Installment."% of Total" / 100); - GenJnlLine."Amount (LCY)" := - RoundReceivableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(SalesHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - end; - end; - RemainingAmount := RemainingAmount - GenJnlLine.Amount; - RemainingAmountLCY := RemainingAmountLCY - GenJnlLine."Amount (LCY)"; - OnAfterSplitSalesInvCalculateAmounts(GenJnlLine, SalesHeader, RemainingAmount, RemainingAmountLCY, Installment, CurrDocNo, PaymentTerms); - Installment.TestField("Gap between Installments"); - NextDueDate := CalculateDate(Installment."Gap between Installments", NextDueDate); - Installment.Next(); - end else begin - GenJnlLine.Amount := RemainingAmount; - GenJnlLine."Amount (LCY)" := RemainingAmountLCY; - end; - - OnBeforeSplitSalesInvCreateBills(GenJnlLine, SalesHeader, Installment, CurrDocNo, PaymentTerms, RemainingAmount, RemainingAmountLCY); - - if PaymentMethod."Create Bills" and ((GenJnlLine.Amount <> 0) or (GenJnlLine."Amount (LCY)" <> 0)) then begin - BillNo += 1; - GenJnlLine."Bill No." := Format(BillNo); - GenJnlLine.Description := - CopyStr( - StrSubstNo(Text1100004, GenJnlLineDocNo, BillNo), - 1, - MaxStrLen(GenJnlLine.Description)); - OnSplitSalesInvOnCreateBillsOnBeforePostGenJnlLine(GenJnlLine, SalesHeader); - GenJnlPostLine.Run(GenJnlLine); - end; - CurrDocNo += 1; - until (CurrDocNo > PaymentTerms."No. of Installments") or (RemainingAmount = 0); - - if GLSetup."Unrealized VAT" and ExistsVATNoReal then - GenJnlPostLine.Run(GenJnlLine2); - end; - - procedure SplitPurchInv(var PurchHeader: Record "Purchase Header"; var VendLedgEntry: Record "Vendor Ledger Entry"; var Window: Dialog; SourceCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; VATAmount: Decimal) - var - VATPostingSetup: Record "VAT Posting Setup"; - BillNo: Integer; - IsHandled: Boolean; - begin - IsHandled := false; - OnBeforeSplitPurchInv(PurchHeader, VendLedgEntry, IsHandled); - if IsHandled then - exit; - - if not PaymentMethod.Get(PurchHeader."Payment Method Code") then - exit; - if (not PaymentMethod."Create Bills") and (not PaymentMethod."Invoices to Cartera") then - exit; - IsHandled := false; - OnSplitPurchInvOnBeforeCheckPaymentMethod(PurchHeader, PaymentMethod, PaymentTerms, IsHandled); - if not IsHandled then - if PaymentMethod."Create Bills" and (PurchHeader."Document Type" = PurchHeader."Document Type"::"Credit Memo") then - Error( - Text1100000, - PurchHeader.FieldCaption("Payment Method Code")); - - if PurchHeader."Currency Code" = '' then - CurrencyFactor := 1 - else - CurrencyFactor := PurchHeader."Currency Factor"; - - GLSetup.Get(); - PurchSetup.Get(); - PurchHeader.TestField("Payment Terms Code"); - PaymentTerms.Get(PurchHeader."Payment Terms Code"); - PaymentTerms.CalcFields("No. of Installments"); - if PaymentTerms."No. of Installments" = 0 then - PaymentTerms."No. of Installments" := 1; - IsHandled := false; - OnSplitPurchInvOnBeforeCheckPaymentMethod(PurchHeader, PaymentMethod, PaymentTerms, IsHandled); - if not IsHandled then - if PaymentMethod."Invoices to Cartera" and (PaymentTerms."No. of Installments" > 1) then - Error( - Text1100001, - PaymentTerms.FieldCaption("No. of Installments"), - PaymentMethod.FieldCaption("Invoices to Cartera"), - PaymentMethod.TableCaption()); - VendLedgEntry.Find('+'); - VendLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - if VendLedgEntry."Remaining Amount" = 0 then - exit; - TotalAmount := VendLedgEntry."Remaining Amount"; - TotalAmountLCY := VendLedgEntry."Remaining Amt. (LCY)"; - RemainingAmount := VendLedgEntry."Remaining Amount"; - RemainingAmountLCY := VendLedgEntry."Remaining Amt. (LCY)"; - // close invoice entry - if PaymentMethod."Create Bills" then begin - GenJnlLine.Init(); - GenJnlLine."Posting Date" := PurchHeader."Posting Date"; - GenJnlLine."Document Date" := PurchHeader."Document Date"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); - GenJnlLine.Validate("Account No.", PurchHeader."Pay-to Vendor No."); - GenJnlLine."Document Type" := GenJnlLine."Document Type"::" "; - GenJnlLine."Document No." := GenJnlLineDocNo; - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, GenJnlLineDocNo), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine."Shortcut Dimension 1 Code" := PurchHeader."Shortcut Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := PurchHeader."Shortcut Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := PurchHeader."Dimension Set ID"; - GenJnlLine."Reason Code" := PurchHeader."Reason Code"; - GenJnlLine."External Document No." := GenJnlLineExtDocNo; - GenJnlLine.Validate("Currency Code", PurchHeader."Currency Code"); - GenJnlLine."Posting Group" := PurchHeader."Vendor Posting Group"; - GenJnlLine.Amount := -TotalAmount; - GenJnlLine."Amount (LCY)" := -TotalAmountLCY; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."On Hold" := PurchHeader."On Hold"; - GenJnlLine."Applies-to Doc. Type" := GenJnlLine."Applies-to Doc. Type"::Invoice; - GenJnlLine."Applies-to Doc. No." := GenJnlLineDocNo; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."Currency Factor" := CurrencyFactor; - GenJnlLine."Payment Terms Code" := PurchHeader."Payment Terms Code"; - GenJnlLine."Payment Method Code" := PurchHeader."Payment Method Code"; - GenJnlLine."Recipient Bank Account" := PurchHeader."Vendor Bank Acc. Code"; - GenJnlLine."Salespers./Purch. Code" := PurchHeader."Purchaser Code"; - - if GLSetup."Unrealized VAT" then begin - FindVendVATSetup(VATPostingSetup, PurchHeader); - if ErrorMessage then - Error(Text1100003); - end; - - OnBeforeSplitPurchInvCloseEntry(GenJnlLine, PurchHeader); - - if GLSetup."Unrealized VAT" and ExistsVATNoReal then - GenJnlLine2.Copy(GenJnlLine) - else - GenJnlPostLine.Run(GenJnlLine); - end; - // create bills - if PurchHeader."Currency Code" = '' then begin - Currency."Invoice Rounding Precision" := GLSetup."Inv. Rounding Precision (LCY)"; - Currency."Invoice Rounding Type" := GLSetup."Inv. Rounding Type (LCY)"; - Currency."Amount Rounding Precision" := GLSetup."Amount Rounding Precision"; - if PurchSetup."Invoice Rounding" then - GLSetup.TestField("Inv. Rounding Precision (LCY)") - else - GLSetup.TestField("Amount Rounding Precision"); - end else begin - Currency.Get(PurchHeader."Currency Code"); - if SalesSetup."Invoice Rounding" then - Currency.TestField("Invoice Rounding Precision") - else - Currency.TestField("Amount Rounding Precision"); - end; - TotalAmount := RoundPayableAmt(TotalAmount); - - VATAmountLCY := RoundPayableAmtLCY(VATAmount / CurrencyFactor); - - if PaymentTerms."No. of Installments" > 0 then begin - Installment.SetRange("Payment Terms Code", PaymentTerms.Code); - if Installment.Find('-') then; - end; - - NextDueDate := PurchHeader."Due Date"; - - GenJnlLine.Init(); - GenJnlLine."Posting Date" := PurchHeader."Posting Date"; - GenJnlLine."Document Date" := PurchHeader."Document Date"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); - GenJnlLine.Validate("Account No.", PurchHeader."Pay-to Vendor No."); - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Bill; - GenJnlLine."Document No." := GenJnlLineDocNo; - GenJnlLine."Shortcut Dimension 1 Code" := PurchHeader."Shortcut Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := PurchHeader."Shortcut Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := PurchHeader."Dimension Set ID"; - GenJnlLine."Reason Code" := PurchHeader."Reason Code"; - GenJnlLine."External Document No." := GenJnlLineExtDocNo; - GenJnlLine.Validate("Currency Code", PurchHeader."Currency Code"); - GenJnlLine."Posting Group" := PurchHeader."Vendor Posting Group"; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."On Hold" := PurchHeader."On Hold"; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."Currency Factor" := CurrencyFactor; - GenJnlLine."Payment Terms Code" := PurchHeader."Payment Terms Code"; - GenJnlLine."Payment Method Code" := PurchHeader."Payment Method Code"; - GenJnlLine."Recipient Bank Account" := PurchHeader."Vendor Bank Acc. Code"; - GenJnlLine."Salespers./Purch. Code" := PurchHeader."Purchaser Code"; - - CurrDocNo := 1; - repeat - GenJnlLine."Due Date" := NextDueDate; - CheckPurchDueDate(PurchHeader, GenJnlLine."Due Date", PaymentTerms."Max. No. of Days till Due Date"); - if not PurchHeader."Due Date Modified" then - DueDateAdjust.PurchAdjustDueDate( - GenJnlLine."Due Date", PurchHeader."Document Date", PaymentTerms.CalculateMaxDueDate(PurchHeader."Document Date"), PurchHeader."Pay-to Vendor No."); - NextDueDate := GenJnlLine."Due Date"; - if CurrDocNo < PaymentTerms."No. of Installments" then begin - Installment.TestField("% of Total"); - OnBeforeSplitPurchInvCalculateAmounts(GenJnlLine, PurchHeader, TotalAmount, VATAmount, TotalAmountLCY, VATAmountLCY); - if CurrDocNo = 1 then begin - TotalPerc := Installment."% of Total"; - case PaymentTerms."VAT distribution" of - PaymentTerms."VAT distribution"::"First Installment": - begin - GenJnlLine.Amount := RoundPayableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100 + VATAmount); - GenJnlLine."Amount (LCY)" := - RoundPayableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - PaymentTerms."VAT distribution"::"Last Installment": - begin - GenJnlLine.Amount := RoundPayableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100); - GenJnlLine."Amount (LCY)" := - RoundPayableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - PaymentTerms."VAT distribution"::Proportional: - begin - GenJnlLine.Amount := RoundPayableAmt(TotalAmount * Installment."% of Total" / 100); - GenJnlLine."Amount (LCY)" := - RoundPayableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - end; - end else begin - TotalPerc := TotalPerc + Installment."% of Total"; - if TotalPerc >= 100 then - Error( - Text1100005, - Installment.FieldCaption("% of Total"), - PaymentTerms.TableCaption(), - PaymentTerms.Code); - case PaymentTerms."VAT distribution" of - PaymentTerms."VAT distribution"::"First Installment", - PaymentTerms."VAT distribution"::"Last Installment": - begin - GenJnlLine.Amount := RoundPayableAmt((TotalAmount - VATAmount) * Installment."% of Total" / 100); - GenJnlLine."Amount (LCY)" := RoundPayableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - PaymentTerms."VAT distribution"::Proportional: - begin - GenJnlLine.Amount := RoundPayableAmt(TotalAmount * Installment."% of Total" / 100); - GenJnlLine."Amount (LCY)" := RoundPayableAmtLCY( - CurrencyExchRate.ExchangeAmtFCYToLCY(PurchHeader."Posting Date", Currency.Code, GenJnlLine.Amount, CurrencyFactor)); - end; - end; - end; - RemainingAmount := RemainingAmount - GenJnlLine.Amount; - RemainingAmountLCY := RemainingAmountLCY - GenJnlLine."Amount (LCY)"; - OnAfterSplitPurchInvCalculateAmounts(GenJnlLine, PurchHeader, RemainingAmount, RemainingAmountLCY); - Installment.TestField("Gap between Installments"); - NextDueDate := CalculateDate(Installment."Gap between Installments", NextDueDate); - Installment.Next(); - end else begin - GenJnlLine.Amount := RemainingAmount; - GenJnlLine."Amount (LCY)" := RemainingAmountLCY; - end; - - OnBeforeSplitPurchInvCreateBills(GenJnlLine, PurchHeader, Installment, CurrDocNo, PaymentTerms, RemainingAmount, RemainingAmountLCY); - - if PaymentMethod."Create Bills" and ((GenJnlLine.Amount <> 0) or (GenJnlLine."Amount (LCY)" <> 0)) then begin - BillNo += 1; - GenJnlLine."Bill No." := Format(BillNo); - GenJnlLine.Description := - CopyStr( - StrSubstNo(Text1100004, GenJnlLineDocNo, BillNo), - 1, - MaxStrLen(GenJnlLine.Description)); - OnSplitPurchInvOnCreateBillsOnBeforePostGenJnlLine(GenJnlLine, PurchHeader); - GenJnlPostLine.Run(GenJnlLine); - end; - CurrDocNo += 1; - until (CurrDocNo > PaymentTerms."No. of Installments") or (RemainingAmount = 0); - - if GLSetup."Unrealized VAT" and ExistsVATNoReal then - GenJnlPostLine.Run(GenJnlLine2); - end; - - procedure RoundReceivableAmt(Amount: Decimal): Decimal - begin - SalesSetup.GetRecordOnce(); - if SalesSetup."Invoice Rounding" then - Amount := Round(Amount, Currency."Invoice Rounding Precision", SelectStr(Currency."Invoice Rounding Type" + 1, '=,>,<')) - else - Amount := Round(Amount, Currency."Amount Rounding Precision"); - - exit(Amount); - end; - - procedure RoundReceivableAmtLCY(Amount: Decimal): Decimal - begin - GLSetup.GetRecordOnce(); - SalesSetup.GetRecordOnce(); - if SalesSetup."Invoice Rounding" then - Amount := Round(Amount, GLSetup."Inv. Rounding Precision (LCY)", SelectStr(GLSetup."Inv. Rounding Type (LCY)" + 1, '=,>,<')) - else - Amount := Round(Amount, GLSetup."Amount Rounding Precision"); - - exit(Amount); - end; - - procedure RoundPayableAmt(Amount: Decimal): Decimal - begin - SalesSetup.GetRecordOnce(); - if SalesSetup."Invoice Rounding" then - Amount := Round(Amount, Currency."Invoice Rounding Precision", SelectStr(Currency."Invoice Rounding Type" + 1, '=,>,<')) - else - Amount := Round(Amount, Currency."Amount Rounding Precision"); - - exit(Amount); - end; - - procedure RoundPayableAmtLCY(Amount: Decimal): Decimal - begin - SalesSetup.GetRecordOnce(); - if SalesSetup."Invoice Rounding" then - Amount := Round(Amount, GLSetup."Inv. Rounding Precision (LCY)", SelectStr(GLSetup."Inv. Rounding Type (LCY)" + 1, '=,>,<')) - else - Amount := Round(Amount, GLSetup."Amount Rounding Precision"); - - exit(Amount); - end; - - procedure FindCustVATSetup(var VATSetup: Record "VAT Posting Setup"; SalesHeader2: Record "Sales Header") - var - Customer: Record Customer; - SalesLine2: Record "Sales Line"; - PostingGroup: Code[20]; - begin - Customer.Get(SalesHeader2."Bill-to Customer No."); - - VATSetup.SetCurrentKey("VAT Bus. Posting Group", "VAT Prod. Posting Group"); - VATSetup.SetRange("VAT Bus. Posting Group", Customer."VAT Bus. Posting Group"); - - SalesLine2.SetCurrentKey("Document Type", "Document No.", "Line No."); - SalesLine2.SetRange("Document Type", SalesHeader2."Document Type"); - SalesLine2.SetRange("Document No.", SalesHeader2."No."); - SalesLine2.Find('-'); - - repeat - case SalesLine2.Type of - SalesLine2.Type::Item: - begin - PostingGroup := SalesLine2."VAT Prod. Posting Group"; - VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); - if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then - if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then - ErrorMessage := true - else - ExistsVATNoReal := true; - end; - SalesLine2.Type::Resource: - begin - PostingGroup := SalesLine2."VAT Prod. Posting Group"; - VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); - if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then - if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then - ErrorMessage := true - else - ExistsVATNoReal := true; - end; - SalesLine2.Type::"G/L Account": - begin - PostingGroup := SalesLine2."VAT Prod. Posting Group"; - VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); - if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then - if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then - ErrorMessage := true - else - ExistsVATNoReal := true; - end; - end; - until SalesLine2.Next() = 0; - end; - - procedure FindVendVATSetup(var VATSetup: Record "VAT Posting Setup"; PurchHeader2: Record "Purchase Header") - var - PurchLine2: Record "Purchase Line"; - PostingGroup: Code[20]; - begin - VATSetup.SetCurrentKey("VAT Bus. Posting Group", "VAT Prod. Posting Group"); - VATSetup.SetRange("VAT Bus. Posting Group", PurchHeader2."VAT Bus. Posting Group"); - - PurchLine2.SetCurrentKey("Document Type", "Document No.", "Line No."); - PurchLine2.SetRange("Document Type", PurchHeader2."Document Type"); - PurchLine2.SetRange("Document No.", PurchHeader2."No."); - PurchLine2.Find('-'); - - repeat - case PurchLine2.Type of - PurchLine2.Type::Item: - begin - PostingGroup := PurchLine2."VAT Prod. Posting Group"; - VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); - if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then - if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then - ErrorMessage := true - else - ExistsVATNoReal := true; - end; - PurchLine2.Type::"G/L Account": - begin - PostingGroup := PurchLine2."VAT Prod. Posting Group"; - VATSetup.SetRange("VAT Prod. Posting Group", PostingGroup); - if VATSetup.Find('-') and (VATSetup."Unrealized VAT Type" >= VATSetup."Unrealized VAT Type"::Percentage) then - if VATSetup."Unrealized VAT Type" > VATSetup."Unrealized VAT Type"::Percentage then - ErrorMessage := true - else - ExistsVATNoReal := true; - end; - end; - until PurchLine2.Next() = 0; - end; - -#if not CLEAN27 - [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] - procedure SplitServiceInv(var ServiceHeader: Record Microsoft.Service.Document."Service Header"; var CustLedgEntry: Record "Cust. Ledger Entry"; var Window: Dialog; SourceCode: Code[10]; GenJnlLineExtDocNo: Code[35]; GenJnlLineDocNo: Code[20]; VATAmount: Decimal) - var - ServInvoiceSplitPayment: Codeunit "Serv. Invoice-Split Payment"; - begin - ServInvoiceSplitPayment.SplitServiceInvoice(ServiceHeader, CustLedgEntry, Window, SourceCode, GenJnlLineExtDocNo, GenJnlLineDocNo, VATAmount); - end; -#endif - -#if not CLEAN27 - [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] - procedure FindCustVATSetupServ(var VATSetup: Record "VAT Posting Setup"; ServiceHeader2: Record Microsoft.Service.Document."Service Header") - var - ServInvoiceSplitPayment: Codeunit "Serv. Invoice-Split Payment"; - begin - ServInvoiceSplitPayment.FindCustVATSetupServ(VATSetup, ServiceHeader2, ErrorMessage, ExistsVATNoReal); - end; -#endif - - procedure CalculateDate(DateFormulaText: Code[20]; DueDate: Date): Date - var - DateFormula: DateFormula; - begin - Evaluate(DateFormula, DateFormulaText); - exit(CalcDate(DateFormula, DueDate)); - end; - - procedure CheckDueDate(NewDueDate: Date; InitialDocumentDate: Date; MaxNoOfDays: Integer): Boolean - var - MaxAllowedDueDate: Date; - begin - if MaxNoOfDays > 0 then begin - MaxAllowedDueDate := InitialDocumentDate + MaxNoOfDays; - exit(NewDueDate <= MaxAllowedDueDate); - end; - - exit(true); - end; - - local procedure CheckSalesDueDate(SalesHeader: Record "Sales Header"; NewDueDate: Date; MaxNoOfDays: Integer) - begin - if not CheckDueDate(NewDueDate, SalesHeader."Document Date", MaxNoOfDays) then - Error(Text001, SalesHeader."Document Type", SalesHeader."No.", MaxNoOfDays, SalesHeader."Document Date"); - end; - - local procedure CheckPurchDueDate(PurchaseHeader: Record "Purchase Header"; NewDueDate: Date; MaxNoOfDays: Integer) - begin - if not CheckDueDate(NewDueDate, PurchaseHeader."Document Date", MaxNoOfDays) then - Error(Text002, PurchaseHeader."Document Type", PurchaseHeader."No.", MaxNoOfDays, PurchaseHeader."Document Date"); - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterSplitSalesInvCalculateAmounts(var GenJournalLine: Record "Gen. Journal Line"; var SalesHeader: Record "Sales Header"; var RemainingAmount: Decimal; var RemainingAmountLCY: Decimal; Installment: Record Installment; CurrDocNo: Integer; PaymentTerms: Record "Payment Terms") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterSplitPurchInvCalculateAmounts(var GenJournalLine: Record "Gen. Journal Line"; var PurchaseHeader: Record "Purchase Header"; var RemainingAmount: Decimal; var RemainingAmountLCY: Decimal) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeSplitSalesInvCloseEntry(var GenJournalLine: Record "Gen. Journal Line"; SalesHeader: Record "Sales Header") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeSplitSalesInvCreateBills(var GenJournalLine: Record "Gen. Journal Line"; SalesHeader: Record "Sales Header"; Installment: Record Installment; CurrDocNo: Integer; PaymentTerms: Record "Payment Terms"; RemainingAmount: Decimal; RemainingAmountLCY: Decimal) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeSplitPurchInvCalculateAmounts(var GenJournalLine: Record "Gen. Journal Line"; var PurchaseHeader: Record "Purchase Header"; var TotalAmount: Decimal; var VATAmount: Decimal; var TotalAmountLCY: Decimal; var VATAmountLCY: Decimal) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeSplitPurchInvCloseEntry(var GenJournalLine: Record "Gen. Journal Line"; PurchaseHeader: Record "Purchase Header") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeSplitPurchInvCreateBills(var GenJournalLine: Record "Gen. Journal Line"; PurchaseHeader: Record "Purchase Header"; Installment: Record Installment; CurrDocNo: Integer; PaymentTerms: Record "Payment Terms"; RemainingAmount: Decimal; RemainingAmountLCY: Decimal) - begin - end; - -#if not CLEAN27 - internal procedure RunOnBeforeSplitServInvCloseEntry(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") - begin - OnBeforeSplitServInvCloseEntry(GenJournalLine, ServiceHeader); - end; - - [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] - [IntegrationEvent(false, false)] - local procedure OnBeforeSplitServInvCloseEntry(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") - begin - end; -#endif - -#if not CLEAN27 - internal procedure RunOnBeforeSplitServInvCreateBills(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") - begin - OnBeforeSplitServInvCreateBills(GenJournalLine, ServiceHeader); - end; - - [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] - [IntegrationEvent(false, false)] - local procedure OnBeforeSplitServInvCreateBills(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") - begin - end; -#endif - - [IntegrationEvent(false, false)] - local procedure OnSplitPurchInvOnBeforeCheckPaymentMethod(var PurchHeader: Record "Purchase Header"; var PaymentMethod: Record "Payment Method"; var PaymentTerms: Record "Payment Terms"; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnSplitSalesInvOnBeforeCheckPaymentMethod(var SalesHeader: Record "Sales Header"; var PaymentMethod: Record "Payment Method"; var PaymentTerms: Record "Payment Terms"; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnSplitSalesInvOnCreateBillsOnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var SalesHeader: Record "Sales Header") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnSplitPurchInvOnCreateBillsOnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; PurchaseHeader: Record "Purchase Header") - begin - end; - -#if not CLEAN27 - internal procedure RunOnSplitServiceInvOnCreateBillsOnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") - begin - OnSplitServiceInvOnCreateBillsOnBeforePostGenJnlLine(GenJournalLine, ServiceHeader); - end; - - [Obsolete('Moved to codeunit ServInvoiceSplitPayment', '27.0')] - [IntegrationEvent(false, false)] - local procedure OnSplitServiceInvOnCreateBillsOnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record Microsoft.Service.Document."Service Header") - begin - end; -#endif - - [IntegrationEvent(false, false)] - local procedure OnBeforeSplitPurchInv(var PurchHeader: Record "Purchase Header"; var VendLedgEntry: Record "Vendor Ledger Entry"; var IsHandled: Boolean) - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/NonPaymentPeriod.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/NonPaymentPeriod.Table.al deleted file mode 100644 index aece2e8d8cb..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/NonPaymentPeriod.Table.al +++ /dev/null @@ -1,55 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -table 10702 "Non-Payment Period" -{ - Caption = 'Non-Payment Period'; - DrillDownPageID = "Non-Payment Periods"; - LookupPageID = "Non-Payment Periods"; - DataClassification = CustomerContent; - - fields - { - field(1; "Table Name"; Option) - { - Caption = 'Table Name'; - OptionCaption = 'Company Information,Customer,Vendor'; - OptionMembers = "Company Information",Customer,Vendor; - } - field(2; "Code"; Code[20]) - { - Caption = 'Code'; - NotBlank = true; - } - field(3; "From Date"; Date) - { - Caption = 'From Date'; - NotBlank = true; - } - field(4; "To Date"; Date) - { - Caption = 'To Date'; - NotBlank = true; - } - field(5; Description; Text[30]) - { - Caption = 'Description'; - } - } - - keys - { - key(Key1; "Table Name", "Code", "From Date") - { - Clustered = true; - } - } - - fieldgroups - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/NonPaymentPeriods.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/NonPaymentPeriods.Page.al deleted file mode 100644 index bfa25d3f560..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/NonPaymentPeriods.Page.al +++ /dev/null @@ -1,44 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 10701 "Non-Payment Periods" -{ - Caption = 'Non-Payment Periods'; - DataCaptionFields = "Code"; - PageType = List; - SourceTable = "Non-Payment Period"; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("From Date"; Rec."From Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the start date of the non-payment period.'; - } - field("To Date"; Rec."To Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the end date of the non-payment period.'; - } - field(Description; Rec.Description) - { - ApplicationArea = All; - ToolTip = 'Specifies a description of the non-payment period.'; - } - } - } - } - - actions - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/OperationFee.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/OperationFee.Table.al deleted file mode 100644 index a14973f4eb2..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/OperationFee.Table.al +++ /dev/null @@ -1,78 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; - -table 7000010 "Operation Fee" -{ - Caption = 'Operation Fee'; - DataClassification = CustomerContent; - - fields - { - field(1; "Code"; Code[20]) - { - Caption = 'Code'; - NotBlank = true; - } - field(2; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - } - field(3; "Type of Fee"; Option) - { - Caption = 'Type of Fee'; - OptionCaption = 'Collection Expenses,Discount Expenses,Discount Interests,Rejection Expenses,Payment Order Expenses,Unrisked Factoring Expenses,Risked Factoring Expenses '; - OptionMembers = "Collection Expenses","Discount Expenses","Discount Interests","Rejection Expenses","Payment Order Expenses","Unrisked Factoring Expenses","Risked Factoring Expenses "; - } - field(7; "Charge Amt. per Operation"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Charge Amt. per Operation'; - } - } - - keys - { - key(Key1; "Code", "Currency Code", "Type of Fee") - { - Clustered = true; - } - key(Key2; "Currency Code", "Code") - { - } - } - - fieldgroups - { - } - - trigger OnDelete() - begin - FeeRange.SetRange(Code, Code); - FeeRange.SetRange("Currency Code", "Currency Code"); - FeeRange.SetRange("Type of Fee", "Type of Fee"); - FeeRange.DeleteAll(); - end; - - var - Text1100000: Label 'untitled'; - FeeRange: Record "Fee Range"; - - procedure Caption(): Text - var - BankAcc: Record "Bank Account"; - begin - if Code = '' then - exit(Text1100000); - BankAcc.Get(Code); - exit(StrSubstNo('%1 %2 %3', BankAcc."No.", BankAcc.Name, "Currency Code")); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/OperationFees.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/OperationFees.Page.al deleted file mode 100644 index 4fd36e4564b..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/OperationFees.Page.al +++ /dev/null @@ -1,59 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 7000026 "Operation Fees" -{ - Caption = 'Operation Fees'; - DataCaptionExpression = Rec.Caption(); - DataCaptionFields = "Currency Code"; - PageType = List; - SourceTable = "Operation Fee"; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("Type of Fee"; Rec."Type of Fee") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of operation for which the commission is being charged.'; - } - field("Charge Amt. per Operation"; Rec."Charge Amt. per Operation") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount of commission charged for each type of commission-based operation.'; - } - } - } - } - - actions - { - area(navigation) - { - group("&Fee") - { - Caption = '&Fee'; - Image = Costs; - action("&Fee Ranges") - { - ApplicationArea = Basic, Suite; - Caption = '&Fee Ranges'; - Image = Ranges; - RunObject = Page "Fee Ranges"; - RunPageLink = Code = field(Code), - "Currency Code" = field("Currency Code"), - "Type of Fee" = field("Type of Fee"); - ToolTip = 'View itemized bank charges for document management. There are seven different types of operations in the Cartera module: receivables management, discount management, discount interests, management of outstanding debt, payment orders management, factoring without risk management, and factoring with risk management.'; - } - } - } - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PaymentDay.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PaymentDay.Table.al deleted file mode 100644 index d6fe2ea7749..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PaymentDay.Table.al +++ /dev/null @@ -1,47 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -table 10701 "Payment Day" -{ - Caption = 'Payment Day'; - DrillDownPageID = "Payment Days"; - LookupPageID = "Payment Days"; - DataClassification = CustomerContent; - - fields - { - field(1; "Table Name"; Option) - { - Caption = 'Table Name'; - OptionCaption = 'Company Information,Customer,Vendor'; - OptionMembers = "Company Information",Customer,Vendor; - } - field(2; "Code"; Code[20]) - { - Caption = 'Code'; - NotBlank = true; - } - field(3; "Day of the month"; Integer) - { - Caption = 'Day of the month'; - MaxValue = 31; - MinValue = 1; - } - } - - keys - { - key(Key1; "Table Name", "Code", "Day of the month") - { - Clustered = true; - } - } - - fieldgroups - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PaymentDays.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PaymentDays.Page.al deleted file mode 100644 index 4f8e6ed271e..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PaymentDays.Page.al +++ /dev/null @@ -1,34 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 10700 "Payment Days" -{ - Caption = 'Payment Days'; - DataCaptionFields = "Code"; - PageType = List; - SourceTable = "Payment Day"; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("Day of the month"; Rec."Day of the month") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the payment day established for the client, vendor, or the company.'; - } - } - } - } - - actions - { - } -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedBills.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedBills.Page.al deleted file mode 100644 index 8936c4565e2..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedBills.Page.al +++ /dev/null @@ -1,610 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Foundation.AuditCodes; -using Microsoft.Foundation.Navigate; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -page 7000067 "Posted Bills" -{ - Caption = 'Posted Bills'; - DataCaptionExpression = Rec.Caption(); - DataCaptionFields = Type; - DeleteAllowed = false; - InsertAllowed = false; - PageType = Worksheet; - SaveValues = true; - SourceTable = "Posted Cartera Doc."; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(ClasFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - Editable = ClasFilterEditable; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - field(StatusFilter; StatusFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Status Filter'; - Editable = StatusFilterEditable; - ToolTip = 'Specifies a filter for the status of bills that will be included.'; - - trigger OnValidate() - begin - StatusFilterOnAfterValidate(); - end; - } - } - repeater(Control1) - { - ShowCaption = false; - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of the document in a posted bill group/payment order, from which this document was generated.'; - } - field("No."; Rec."No.") - { - ApplicationArea = All; - Editable = false; - ToolTip = 'Specifies the number of a bill in a posted bill group/payment order.'; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this document in a posted bill group/payment order.'; - } - field(Status; Rec.Status) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the status of this document in a posted bill group/payment order.'; - } - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the description associated with this posted document.'; - } - field("Amt. for Collection (LCY)"; Rec."Amt. for Collection (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the amount due for this document in a posted bill group/payment order.'; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending amount in order for this document, in a posted bill group/payment order, to be settled in full.'; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the payment method code for the document number.'; - Visible = false; - } - field(Accepted; Rec.Accepted) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the Acceptance status required for this bill in a posted bill group.'; - } - field("Collection Agent"; Rec."Collection Agent") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the agent to which this document in a posted bill group/payment order was sent.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number or code of the bank to which the bill group/payment order was delivered.'; - } - field("Bill Gr./Pmt. Order No."; Rec."Bill Gr./Pmt. Order No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number assigned to this document in a bill group/payment order.'; - } - field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the date when this document in a posted bill group/payment order is settled or rejected.'; - } - field(Redrawn; Rec.Redrawn) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies a check mark to indicate that the bill has been redrawn since it was rejected when its due date arrived.'; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - } - field("Category Code"; Rec."Category Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a filter for the categories for which documents are shown.'; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the account type associated with this document in a posted bill group/payment order.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the ledger entry number associated with this posted document.'; - } - } - group(Control49) - { - ShowCaption = false; - field("TotalCurrAmt "; TotalCurrAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Total Remaining Amt. (LCY)'; - Editable = false; - ToolTip = 'Specifies the sum of amounts that remain to be paid.'; - } - } - } - } - - actions - { - area(navigation) - { - group(Bill) - { - Caption = '&Bill'; - Image = Voucher; - action(Dimensions) - { - ApplicationArea = Basic, Suite; - Caption = 'Dime&nsions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - separator(Action1100001) - { - } - action(BGPO) - { - ApplicationArea = Basic, Suite; - Caption = 'B&G/PO'; - Image = VoucherGroup; - ToolTip = 'View related bill groups or payment orders.'; - - trigger OnAction() - var - SalesPostedGroup: Record "Posted Bill Group"; - PurchasePostedGroup: Record "Posted Payment Order"; - begin - if Rec.Type = Rec.Type::Receivable then begin - SalesPostedGroup.SetRange("No.", Rec."Bill Gr./Pmt. Order No."); - PAGE.Run(PAGE::"Posted Bill Groups", SalesPostedGroup) - end else begin - PurchasePostedGroup.SetRange("No.", Rec."Bill Gr./Pmt. Order No."); - PAGE.Run(PAGE::"Posted Payment Orders", PurchasePostedGroup); - end; - end; - } - separator(Action43) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - - trigger OnAction() - begin - PAGE.RunModal(PAGE::"Posted Bills Analysis", Rec); - end; - } - action(Maturity) - { - ApplicationArea = Basic, Suite; - Caption = 'Maturity'; - Image = Aging; - ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; - - trigger OnAction() - begin - if Rec.Type = Rec.Type::Receivable then - PAGE.RunModal(PAGE::"Posted Receiv. Bills Maturity") - else - PAGE.RunModal(PAGE::"Posted Payable Bills Maturity"); - end; - } - } - } - area(processing) - { - group(Functions) - { - Caption = 'F&unctions'; - Image = "Action"; - action(Categorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Categorize'; - Ellipsis = true; - Image = Category; - ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(PostedDoc); - CarteraManagement.CategorizePostedDocs(PostedDoc); - end; - } - action(Decategorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Decategorize'; - Image = UndoCategory; - ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(PostedDoc); - CarteraManagement.DecategorizePostedDocs(PostedDoc); - end; - } - separator(Action37) - { - } - action(Settle) - { - ApplicationArea = Basic, Suite; - Caption = 'Settle'; - Image = SettleOpenTransactions; - ToolTip = 'Fully settle documents included in the posted bill group.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(PostedDoc); - if not PostedDoc.Find('=><') then - exit; - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - if not PostedDoc.Find('-') then - Error( - Text1100000 + - Text1100001); - - if PostedDoc.Type = PostedDoc.Type::Receivable then - REPORT.RunModal(REPORT::"Settle Docs. in Post. Bill Gr.", true, false, PostedDoc) - else - REPORT.RunModal(REPORT::"Settle Docs. in Posted PO", true, false, PostedDoc); - end; - } - action(Reject) - { - ApplicationArea = Basic, Suite; - Caption = 'Reject'; - Ellipsis = true; - Image = Reject; - ToolTip = 'Post document rejections.'; - - trigger OnAction() - begin - RejectDocs(); - end; - } - action(Redraw) - { - ApplicationArea = Basic, Suite; - Caption = 'Redraw'; - Image = RefreshVoucher; - ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; - - trigger OnAction() - begin - RedrawDocs(); - end; - } - separator(Action39) - { - } - action(Print) - { - ApplicationArea = Basic, Suite; - Caption = 'Print'; - Ellipsis = true; - Image = Print; - ToolTip = 'Print the document.'; - - trigger OnAction() - begin - PrintBillRec(); - end; - } - } - action(Navigate) - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Ellipsis = true; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - Option := StrMenu(Text1100002); - case Option of - 0: - exit; - 1: - CarteraManagement.NavigatePostedDoc(Rec); - 2: - begin - Navigate.SetDoc(Rec."Posting Date", Rec."Bill Gr./Pmt. Order No."); - Navigate.Run(); - end; - end; - end; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref(Navigate_Promoted; Navigate) - { - } - } - } - } - - trigger OnAfterGetRecord() - begin - AfterGetCurrentRecord(); - end; - - trigger OnDeleteRecord(): Boolean - begin - UpdateStatistics(); - end; - - trigger OnInit() - begin - StatusFilterEditable := true; - ClasFilterEditable := true; - end; - - trigger OnModifyRecord(): Boolean - begin - CODEUNIT.Run(CODEUNIT::"Posted Cartera Doc.- Edit", Rec); - UpdateStatistics(); - exit(false); - end; - - trigger OnNewRecord(BelowxRec: Boolean) - begin - AfterGetCurrentRecord(); - end; - - trigger OnOpenPage() - begin - UpdateStatistics(); - end; - - var - Text1100000: Label 'No bills have been found that can be settled. \'; - Text1100001: Label 'Please check that at least one open bill was selected.'; - Text1100002: Label 'Related to Bill,Related to Bill Group'; - Text1100003: Label 'Open|Honored|Rejected'; - Text1100004: Label 'Only Receivable Bills can be printed.'; - Text1100005: Label 'Only Receivable Bills can be rejected.'; - Text1100006: Label 'No bills have been found that can be rejected. \'; - Text1100007: Label 'No bills have been found that can be redrawn. \'; - Text1100008: Label 'Please check that at least one rejected or honored bill was selected.'; - Text1100009: Label 'Only bills can be redrawn.'; - PostedDoc: Record "Posted Cartera Doc."; - CustLedgEntry: Record "Cust. Ledger Entry"; - VendLedgEntry: Record "Vendor Ledger Entry"; - Navigate: Page Navigate; - CarteraManagement: Codeunit CarteraManagement; - CategoryFilter: Code[250]; - ActiveFilter: Text[250]; - TotalCurrAmtLCY: Decimal; - StatusFilter: Option Open,Honored,Rejected,All; - Option: Option "0","1","2"; - Call: Boolean; - ClasFilterEditable: Boolean; - StatusFilterEditable: Boolean; - - [Scope('OnPrem')] - procedure UpdateStatistics() - begin - PostedDoc.Reset(); - PostedDoc.SetCurrentKey("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, - "Category Code", Redrawn, "Due Date", "Document Type"); - PostedDoc.CopyFilters(Rec); - PostedDoc.SetRange("Document Type", PostedDoc."Document Type"::Bill); - PostedDoc.SetFilter("Category Code", CategoryFilter); - PostedDoc.CalcSums(PostedDoc."Remaining Amt. (LCY)"); - TotalCurrAmtLCY := PostedDoc."Remaining Amt. (LCY)"; - - ActiveFilter := Rec.GetFilter(Status); - case ActiveFilter of - '': - StatusFilter := StatusFilter::All; - Text1100003: - StatusFilter := StatusFilter::All - else - StatusFilter := Rec.Status.AsInteger(); - end; - - if Call = true then - CategoryFilter := Rec.GetFilter("Category Code"); - end; - - [Scope('OnPrem')] - procedure GetSelect(var NewPostedDoc: Record "Posted Cartera Doc.") - begin - CurrPage.SetSelectionFilter(NewPostedDoc); - end; - - [Scope('OnPrem')] - procedure PrintBillRec() - begin - CurrPage.SetSelectionFilter(PostedDoc); - if not PostedDoc.Find('-') then - exit; - - if PostedDoc.Type <> PostedDoc.Type::Receivable then - Error(Text1100004); - - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(PostedDoc."Entry No."); - CustLedgEntry.Mark(true); - until PostedDoc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - CustLedgEntry.PrintBill(true); - end; - - [Scope('OnPrem')] - procedure RejectDocs() - begin - CurrPage.SetSelectionFilter(PostedDoc); - if not PostedDoc.Find('=><') then - exit; - - if PostedDoc.Type <> PostedDoc.Type::Receivable then - Error(Text1100005); - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - if not PostedDoc.Find('-') then - Error( - Text1100006 + - Text1100001); - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(PostedDoc."Entry No."); - CustLedgEntry.Mark(true); - until PostedDoc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Reject Docs.", true, false, CustLedgEntry); - end; - - [Scope('OnPrem')] - procedure RedrawDocs() - begin - CurrPage.SetSelectionFilter(PostedDoc); - if not PostedDoc.Find('=><') then - exit; - - PostedDoc.SetFilter(Status, '<>%1', PostedDoc.Status::Open); - if not PostedDoc.Find('-') then - Error( - Text1100007 + - Text1100008); - - PostedDoc.SetFilter("Document Type", '<>%1', PostedDoc."Document Type"::Bill); - if PostedDoc.Find('-') then - Error(Text1100009); - PostedDoc.SetRange("Document Type"); - - if Rec.Type = Rec.Type::Receivable then begin - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(PostedDoc."Entry No."); - CustLedgEntry.Mark(true); - until PostedDoc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Redraw Receivable Bills", true, false, CustLedgEntry); - end else begin - VendLedgEntry.Reset(); - repeat - VendLedgEntry.Get(PostedDoc."Entry No."); - VendLedgEntry.Mark(true); - until PostedDoc.Next() = 0; - - VendLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Redraw Payable Bills", true, false, VendLedgEntry); - end; - end; - - [Scope('OnPrem')] - procedure Called() - begin - Call := true; - ClasFilterEditable := false; - StatusFilterEditable := false; - end; - - local procedure CategoryFilterOnAfterValidate() - begin - UpdateStatistics(); - end; - - local procedure StatusFilterOnAfterValidate() - begin - if StatusFilter = StatusFilter::All then - Rec.SetRange(Status) - else - Rec.SetRange(Status, StatusFilter); - UpdateStatistics(); - CurrPage.Update(); - end; - - local procedure AfterGetCurrentRecord() - begin - xRec := Rec; - UpdateStatistics(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDoc.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDoc.Table.al deleted file mode 100644 index f1d2832b48b..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDoc.Table.al +++ /dev/null @@ -1,301 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Vendor; -using Microsoft.Sales.Customer; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -table 7000003 "Posted Cartera Doc." -{ - Caption = 'Posted Cartera Doc.'; - DrillDownPageID = "Posted Cartera Documents"; - LookupPageID = "Posted Cartera Documents"; - DataClassification = CustomerContent; - - fields - { - field(1; Type; Enum "Cartera Document Type") - { - Caption = 'Type'; - } - field(2; "Entry No."; Integer) - { - Caption = 'Entry No.'; - } - field(3; "No."; Code[20]) - { - Caption = 'No.'; - } - field(4; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(5; "Document No."; Code[20]) - { - Caption = 'Document No.'; - } - field(6; Description; Text[100]) - { - Caption = 'Description'; - } - field(7; "Bank Account No."; Code[20]) - { - Caption = 'Bank Account No.'; - TableRelation = "Bank Account"; - } - field(8; "Dealing Type"; Enum "Cartera Dealing Type") - { - Caption = 'Dealing Type'; - Editable = false; - } - field(9; "Amount for Collection"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Amount for Collection'; - } - field(10; "Amt. for Collection (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amt. for Collection (LCY)'; - } - field(11; "Due Date"; Date) - { - Caption = 'Due Date'; - } - field(12; "Payment Method Code"; Code[10]) - { - Caption = 'Payment Method Code'; - TableRelation = "Payment Method"; - } - field(13; Accepted; Option) - { - Caption = 'Accepted'; - OptionCaption = 'Not Required,Yes'; - OptionMembers = "Not Required",Yes; - } - field(14; Place; Boolean) - { - Caption = 'Place'; - } - field(15; "Collection Agent"; Option) - { - Caption = 'Collection Agent'; - OptionCaption = 'Direct,Bank'; - OptionMembers = Direct,Bank; - } - field(16; "Bill Gr./Pmt. Order No."; Code[20]) - { - Caption = 'Bill Gr./Pmt. Order No.'; - TableRelation = if (Type = const(Receivable)) "Posted Bill Group"."No." - else - if (Type = const(Payable)) "Posted Payment Order"."No."; - } - field(17; "Category Code"; Code[10]) - { - Caption = 'Category Code'; - TableRelation = "Category Code"; - } - field(18; "Account No."; Code[20]) - { - Caption = 'Account No.'; - TableRelation = if (Type = const(Receivable)) Customer - else - if (Type = const(Payable)) Vendor; - } - field(19; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - } - field(20; "Cust./Vendor Bank Acc. Code"; Code[20]) - { - Caption = 'Cust./Vendor Bank Acc. Code'; - TableRelation = "Customer Bank Account".Code where("Customer No." = field("Account No.")); - } -#if not CLEANSCHEMA25 - field(21; "Pmt. Address Code"; Code[10]) - { - Caption = 'Pmt. Address Code'; - TableRelation = "Customer Pmt. Address".Code where("Customer No." = field("Account No.")); - ObsoleteReason = 'Address is taken from the fields Address, City, etc. of Customer/Vendor table.'; - ObsoleteState = Removed; - ObsoleteTag = '25.0'; - } -#endif - field(22; "Global Dimension 1 Code"; Code[20]) - { - CaptionClass = '1,1,1'; - Caption = 'Global Dimension 1 Code'; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(23; "Global Dimension 2 Code"; Code[20]) - { - CaptionClass = '1,1,2'; - Caption = 'Global Dimension 2 Code'; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(24; Status; Enum "Cartera Document Status") - { - Caption = 'Status'; - } - field(25; "Honored/Rejtd. at Date"; Date) - { - Caption = 'Honored/Rejtd. at Date'; - } - field(26; "Remaining Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Remaining Amount'; - } - field(27; "Remaining Amt. (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Remaining Amt. (LCY)'; - } - field(28; Redrawn; Boolean) - { - Caption = 'Redrawn'; - } - field(29; "Original Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Original Amount'; - Editable = false; - } - field(30; "Original Amt. (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Original Amt. (LCY)'; - Editable = false; - } - field(40; "Document Type"; Enum "Cartera Document Doc. Type") - { - Caption = 'Document Type'; - Editable = false; - } - field(42; Factoring; Option) - { - Caption = 'Factoring'; - Editable = false; - OptionCaption = ' ,Unrisked,Risked'; - OptionMembers = " ",Unrisked,Risked; - } - field(46; Adjusted; Boolean) - { - Caption = 'Adjusted'; - } - field(47; ReAdjusted; Boolean) - { - Caption = 'ReAdjusted'; - } - field(48; "Adjusted Amount"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Adjusted Amount'; - } - field(49; "From Journal"; Boolean) - { - Caption = 'From Journal'; - } - field(480; "Dimension Set ID"; Integer) - { - Caption = 'Dimension Set ID'; - Editable = false; - TableRelation = "Dimension Set Entry"; - - trigger OnLookup() - begin - Rec.ShowDimensions(); - end; - } - field(10700; "Original Document No."; Code[20]) - { - Caption = 'Original Document No.'; - } - } - - keys - { - key(Key1; Type, "Entry No.") - { - Clustered = true; - } - key(Key2; Type, "Document No.") - { - } - key(Key3; "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") - { - SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; - } - key(Key4; "Bank Account No.", "Dealing Type", Status, "Category Code", Redrawn, "Honored/Rejtd. at Date", "Due Date", "Document Type") - { - SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; - } - key(Key5; "Bank Account No.", "Dealing Type", Status, Redrawn, "Due Date") - { - SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; - } - key(Key6; "Bank Account No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Dealing Type", Status, "Category Code", Redrawn, "Honored/Rejtd. at Date", "Due Date") - { - Enabled = false; - SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; - } - key(Key7; "Bank Account No.", "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date", "Document Type") - { - SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; - } - key(Key8; "Bank Account No.", "Dealing Type", Status, Redrawn, "Due Date", "Document Type") - { - SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; - } - key(Key9; Type, "Bill Gr./Pmt. Order No.", "Global Dimension 1 Code", "Global Dimension 2 Code") - { - SumIndexFields = "Amount for Collection", "Remaining Amount", "Amt. for Collection (LCY)", "Remaining Amt. (LCY)"; - } - key(Key10; Type, "Original Document No.") - { - } - } - - fieldgroups - { - } - - var - Text1100000: Label 'untitled'; - - procedure Caption(): Text - var - BankAcc: Record "Bank Account"; - begin - if "Bank Account No." = '' then - exit(Text1100000); - BankAcc.Get("Bank Account No."); - exit(StrSubstNo(BankAcc.Name)); - end; - - [Scope('OnPrem')] - procedure ShowDimensions() - var - DimMgt: Codeunit DimensionManagement; - begin - DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo('%1 %2 %3', Type, "Entry No.", "Document No.")); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDocEdit.Codeunit.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDocEdit.Codeunit.al deleted file mode 100644 index 55883151151..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDocEdit.Codeunit.al +++ /dev/null @@ -1,33 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -codeunit 7000009 "Posted Cartera Doc.- Edit" -{ - Permissions = TableData "Cartera Doc." = imd, - TableData "Posted Cartera Doc." = rm; - TableNo = "Posted Cartera Doc."; - - trigger OnRun() - begin - PostedDoc := Rec; - PostedDoc.LockTable(); - PostedDoc.Find(); - PostedDoc."Category Code" := Rec."Category Code"; - PostedDoc."Due Date" := Rec."Due Date"; - OnBeforeModifyPostedCarteraDoc(PostedDoc, Rec); - PostedDoc.Modify(); - Rec := PostedDoc; - end; - - var - PostedDoc: Record "Posted Cartera Doc."; - - [IntegrationEvent(false, false)] - local procedure OnBeforeModifyPostedCarteraDoc(var PostedCarteraDoc: Record "Posted Cartera Doc."; CurrPostedCarteraDoc: Record "Posted Cartera Doc.") - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDocuments.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDocuments.Page.al deleted file mode 100644 index 12e84feb1da..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/PostedCarteraDocuments.Page.al +++ /dev/null @@ -1,138 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 7000006 "Posted Cartera Documents" -{ - Caption = 'Posted Cartera Documents'; - Editable = false; - PageType = List; - SourceTable = "Posted Cartera Doc."; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("Bill Gr./Pmt. Order No."; Rec."Bill Gr./Pmt. Order No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number assigned to this document in a bill group/payment order.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date when the creation of this document was posted.'; - Visible = false; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this document in a posted bill group/payment order.'; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the payment method code for the document number.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the document in a posted bill group/payment order, from which this document was generated.'; - } - field("No."; Rec."No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of a bill in a posted bill group/payment order.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the description associated with this posted document.'; - } - field("Amount for Collection"; Rec."Amount for Collection") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount for which this document in a posted bill group/payment order was created.'; - } - field("Amt. for Collection (LCY)"; Rec."Amt. for Collection (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount due for this document in a posted bill group/payment order.'; - Visible = false; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amount for this document, in a posted bill group/payment order, to be settled in full.'; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amount in order for this document, in a posted bill group/payment order, to be settled in full.'; - Visible = false; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - Visible = false; - } - field("Category Code"; Rec."Category Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a filter for the categories for which documents are shown.'; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the account type associated with this document in a posted bill group/payment order.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the ledger entry number associated with this posted document.'; - } - } - } - } - - actions - { - area(processing) - { - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - CarteraManagement.NavigatePostedDoc(Rec); - end; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Navigate_Promoted"; "&Navigate") - { - } - } - } - } - - var - CarteraManagement: Codeunit CarteraManagement; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/RecDocsAnalysisFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/RecDocsAnalysisFactBox.Page.al deleted file mode 100644 index 6e87e1293c8..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/RecDocsAnalysisFactBox.Page.al +++ /dev/null @@ -1,109 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -page 35290 "Rec. Docs Analysis Fact Box" -{ - Caption = 'Rec. Docs Analysis Fact Box'; - DataCaptionExpression = Rec.GetFilter(Type); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SaveValues = true; - SourceTable = "Cartera Doc."; - - layout - { - area(content) - { - field(BillCount; DocCount) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Documents'; - Editable = false; - ToolTip = 'Specifies the number of documents included.'; - } - field(Total; TotalAmt) - { - ApplicationArea = All; - AutoFormatExpression = Doc."Currency Code"; - AutoFormatType = 1; - Caption = 'Amount'; - DrillDown = true; - Editable = false; - ToolTip = 'Specifies the sum of amounts on the documents.'; - Visible = TotalVisible; - - trigger OnDrillDown() - begin - PAGE.RunModal(0, Doc); - end; - } - field(TotalLCY; TotalAmtLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amount (LCY)'; - DrillDown = true; - Editable = false; - ToolTip = 'Specifies the sum of amounts on the documents.'; - Visible = TotalLCYVisible; - - trigger OnDrillDown() - begin - PAGE.RunModal(0, Doc); - end; - } - } - } - - actions - { - } - - trigger OnInit() - begin - TotalLCYVisible := true; - TotalVisible := true; - end; - - trigger OnOpenPage() - begin - CategoryFilter := Rec.GetFilter("Category Code"); - CurrencyFilter := Rec.GetFilter("Currency Code"); - UpdateStatistics(); - end; - - var - Doc: Record "Cartera Doc."; - CategoryFilter: Code[250]; - CurrencyFilter: Code[250]; - DocCount: Integer; - TotalAmt: Decimal; - TotalAmtLCY: Decimal; - Show: Boolean; - TotalVisible: Boolean; - TotalLCYVisible: Boolean; - - local procedure UpdateStatistics() - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code"); - Doc.SetFilter("Category Code", CategoryFilter); - Doc.SetFilter("Currency Code", CurrencyFilter); - Show := Doc.CalcSums("Remaining Amount", "Remaining Amt. (LCY)"); - if Show then begin - TotalAmt := Doc."Remaining Amount"; - TotalAmtLCY := Doc."Remaining Amt. (LCY)"; - end; - DocCount := Doc.Count; - TotalVisible := Show; - TotalLCYVisible := Show; - - if Doc.Find('=><') then; // necessary to calculate decimal places - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/RejectDocs.Report.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/RejectDocs.Report.al deleted file mode 100644 index 1f319db58ad..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/RejectDocs.Report.al +++ /dev/null @@ -1,729 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.VAT.Setup; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.Customer; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -report 7000097 "Reject Docs." -{ - Caption = 'Reject Docs.'; - Permissions = TableData "Cust. Ledger Entry" = imd, - TableData "Vendor Ledger Entry" = imd, - TableData "Cartera Doc." = imd, - TableData "Posted Cartera Doc." = imd, - TableData "Closed Cartera Doc." = imd, - TableData "Posted Bill Group" = imd, - TableData "Closed Bill Group" = imd; - ProcessingOnly = true; - - dataset - { - dataitem(CustLedgEntry; "Cust. Ledger Entry") - { - DataItemTableView = sorting("Entry No.") where(Open = const(true)); - - trigger OnAfterGetRecord() - var - FromJnl: Boolean; - begin - IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("Bill No."); - DocCount := DocCount + 1; - Window.Update(1, DocCount); - - if GLSetup."Unrealized VAT" and - (("Document Type" = "Document Type"::Bill) or ("Document Type" = "Document Type"::Invoice)) - then begin - FromJnl := false; - if PostedDoc."From Journal" then - FromJnl := true; - OnBeforeCustFindVATSetup(VATPostingSetup, CustLedgEntry, FromJnl); - ExistsNoRealVAT := GenJnlPostLine.CustFindVATSetup(VATPostingSetup, CustLedgEntry, FromJnl); - end; - - if ArePostedDocs then begin - PostedDoc.Get(PostedDoc.Type::Receivable, "Entry No."); - PostedBillGr.Get(PostedDoc."Bill Gr./Pmt. Order No."); - if PostedBillGr."Dealing Type" = PostedBillGr."Dealing Type"::Discount then - Discount := true - else - Discount := false; - if PostedBillGr.Factoring = PostedBillGr.Factoring::" " then - Factoring := false - else - Factoring := true; - BankAcc.Get(PostedDoc."Bank Account No."); - BankAcc.TestField("Bank Acc. Posting Group"); - BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); - if IncludeExpenses then begin - BankAcc.TestField("Operation Fees Code"); - FeeRange.InitRejExpenses( - BankAcc."Operation Fees Code", - BankAcc."Currency Code"); - end; - end; - - CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - - if "Document Type" = "Document Type"::Bill then begin - CurrDescription := StrSubstNo(Text1100004, "Document No.", "Bill No."); - CurrDocNo := "Document No."; - CurrDocNo2 := "Bill No."; - PrepareBillRejPosting("Remaining Amount"); - end else begin - CurrDescription := StrSubstNo(Text1100005, "Document No."); - CurrDocNo := "Document No."; - CurrDocNo2 := "Bill No."; - PrepareInvoiceRejPosting("Remaining Amount"); - end; - - if ArePostedDocs then begin - PostedDoc.Get(PostedDoc.Type::Receivable, "Entry No."); - PostedDoc.Status := PostedDoc.Status::Rejected; - PostedDoc."Honored/Rejtd. at Date" := PostingDate; - PostedDoc.Modify(); - "Document Status" := "Document Status"::Rejected; - Modify(); - if IncludeExpenses then - FeeRange.CalcRejExpensesAmt( - BankAcc."Operation Fees Code", - BankAcc."Currency Code", - "Remaining Amount", - "Entry No."); - end else begin - Doc.Get(Doc.Type::Receivable, "Entry No."); - ClosedDoc.TransferFields(Doc); - ClosedDoc.Status := ClosedDoc.Status::Rejected; - ClosedDoc."Honored/Rejtd. at Date" := PostingDate; - ClosedDoc."Bill Gr./Pmt. Order No." := ''; - ClosedDoc."Remaining Amount" := Doc."Remaining Amount"; - ClosedDoc."Remaining Amt. (LCY)" := Doc."Remaining Amt. (LCY)"; - ClosedDoc."Amount for Collection" := 0; - ClosedDoc."Amt. for Collection (LCY)" := 0; - ClosedDoc.Insert(true); - Doc.Delete(); - "Document Status" := "Document Status"::Rejected; - "Document Situation" := "Document Situation"::"Closed Documents"; - Modify(); - end; - - DocPost.InsertDtldCustLedgEntry( - CustLedgEntry, - "Remaining Amount", - "Remaining Amt. (LCY)", - EntryType::Rejection, - PostingDate); - - if GLSetup."Unrealized VAT" and - ExistsNoRealVAT and - (not IsRedrawn) - then begin - CarteraManagement.CustUnrealizedVAT2( - CustLedgEntry, - "Remaining Amt. (LCY)", - GenJnlLine, - ExistVATEntry, - FirstVATEntryNo, - LastVATEntryNo, - NoRealVATBuffer, - FromJnl, - "Document No."); - - TempCurrCode := "Currency Code"; - "Currency Code" := ''; - - if NoRealVATBuffer.Find('-') then - repeat - FindInClosedBills := true; - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer.Account, - -NoRealVATBuffer.Amount, - "Dimension Set ID"); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer."Balance Account", - NoRealVATBuffer.Amount, - "Dimension Set ID"); - FindInClosedBills := false; - until NoRealVATBuffer.Next() = 0; - - "Currency Code" := TempCurrCode; - end; - - if IncludeExpenses and ArePostedDocs then begin - CurrDescription := Text1100006; - CurrDocNo := PostedBillGr."No."; - CurrDocNo2 := ''; - if (FeeRange.GetTotalRejExpensesAmt() <> 0) or (UseJournal = UseJournal::AuxJournal) then begin - BankAccPostingGr.TestField("Rejection Expenses Acc."); - NoRegs := FeeRange.NoRegRejExpenses(); - for i := 0 to NoRegs - 1 do begin - FeeRange.GetRejExpensesAmt(MemIntReg, i); - Get(MemIntReg."Entry No."); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - BankAccPostingGr."Rejection Expenses Acc.", - MemIntReg.Amount, - "Dimension Set ID"); - InsertGenJournalLine( - GenJnlLine."Account Type"::"Bank Account", - BankAcc."No.", - -MemIntReg.Amount, - "Dimension Set ID"); - end; - end; - end; - - if (FeeRange.GetTotalRejExpensesAmt() <> 0) and ArePostedDocs then begin - PostedBillGr."Rejection Expenses Amt." := PostedBillGr."Rejection Expenses Amt." + FeeRange.GetTotalRejExpensesAmt(); - PostedBillGr.Modify(); - end; - end; - - trigger OnPostDataItem() - var - PostedDoc2: Record "Posted Cartera Doc."; - SkipMessage: Boolean; - begin - if GenJnlLine.Find('-') then - repeat - if ArePostedDocs then begin - PostedDoc2.SetRange("Document No.", GenJnlLine."Document No."); - if PostedDoc2.Find('-') then - repeat - PostedBillGr.Get(PostedDoc2."Bill Gr./Pmt. Order No."); - DocPost.CloseBillGroupIfEmpty(PostedBillGr, PostingDate); - until PostedDoc2.Next() = 0; - end; - until GenJnlLine.Next() = 0; - - PostGenJournal(); - if ExistVATEntry then begin - GLReg.FindLast(); - GLReg."From VAT Entry No." := FirstVATEntryNo; - GLReg."To VAT Entry No." := LastVATEntryNo; - GLReg.Modify(); - end; - - Commit(); - - SkipMessage := false; - OnPostDataItemCustLedgEntryOnBeforeShowCompletationMessage(DocCount, SkipMessage); - if not SkipMessage then - Message(Text1100007, DocCount); - end; - - trigger OnPreDataItem() - begin - DocPost.CheckPostingDate(PostingDate); - - Find('-'); - ArePostedDocs := "Document Situation" = "Document Situation"::"Posted BG/PO"; - - if UseJournal = UseJournal::AuxJournal then begin - GenJnlBatch.Get(TemplName, BatchName); - ReasonCode := GenJnlBatch."Reason Code"; - GenJnlTemplate.Get(TemplName); - SourceCode := GenJnlTemplate."Source Code"; - end else begin - ReasonCode := ''; - SourceCodeSetup.Get(); - SourceCode := SourceCodeSetup."Cartera Journal" - end; - - case "Document Type" of - "Document Type"::Bill: - Window.Open( - Text1100001); - "Document Type"::Invoice: - Window.Open( - Text1100002); - else - Window.Open( - Text1100003); - end; - - DocCount := 0; - GenJnlLineNextNo := 0; - ExistVATEntry := false; - end; - } - } - - requestpage - { - SaveValues = true; - SourceTable = Customer; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(PostingDate; PostingDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Posting Date'; - ToolTip = 'Specifies the posting date.'; - } - field(IncludeExpenses; IncludeExpenses) - { - ApplicationArea = Basic, Suite; - Caption = 'Include Expenses'; - ToolTip = 'Specifies if you want to include the expenses resulting from document rejections. If expenses are included, the amount will be calculated as it was defined under fees for the operation called Rejection Expenses.'; - } - field(UseJournal; UseJournal) - { - ApplicationArea = Basic, Suite; - Caption = 'Post'; - OptionCaption = 'Direct,Auxiliary Journal'; - ToolTip = 'Specifies where to post the ledger entries associated with the document rejection. Direct: Will post directly to the Ledger Entries table. Auxiliary Journal: Will post through a journal that you specify.'; - - trigger OnValidate() - begin - if UseJournal = UseJournal::Direct then begin - BatchName := ''; - TemplName := ''; - end; - end; - } - group("Auxiliary Journal") - { - Caption = 'Auxiliary Journal'; - field(TemplateName; TemplName) - { - ApplicationArea = Basic, Suite; - Caption = 'Template Name'; - TableRelation = "Gen. Journal Template".Name where(Type = const(Cartera), - Recurring = const(false)); - ToolTip = 'Specifies the template that will be used when posting. By default, the CARTERA template is selected.'; - - trigger OnValidate() - begin - if TemplName = '' then - BatchName := '' - else - if UseJournal = UseJournal::Direct then - Error(Text1100008); - end; - } - field(BatchName; BatchName) - { - ApplicationArea = Basic, Suite; - Caption = 'Batch Name'; - TableRelation = "Gen. Journal Batch".Name; - ToolTip = 'Specifies the name of the journal batch.'; - - trigger OnLookup(var Text: Text): Boolean - begin - if TemplName = '' then - exit; - - if GenJnlBatch.Get(TemplName, Text) then; - GenJnlBatch.SetRange("Journal Template Name", TemplName); - if PAGE.RunModal(PAGE::"General Journal Batches", GenJnlBatch) = ACTION::LookupOK then - BatchName := GenJnlBatch.Name; - end; - - trigger OnValidate() - begin - if TemplName = '' then - BatchName := ''; - end; - } - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - PostingDate := WorkDate(); - end; - } - - labels - { - } - - trigger OnPreReport() - begin - OnBeforeOnPreReport(PostingDate, IncludeExpenses, UseJournal, TemplName, BatchName); - - GLSetup.Get(); - - if UseJournal = UseJournal::AuxJournal then begin - if not GenJnlBatch.Get(TemplName, BatchName) then - Error(Text1100000); - ReasonCode := GenJnlBatch."Reason Code"; - GenJnlTemplate.Get(TemplName); - SourceCode := GenJnlTemplate."Source Code"; - end; - end; - - var - Text1100000: Label 'Please fill in both the Template Name and the Batch Name of the Auxiliary Journal with correct values.'; - Text1100001: Label 'Rejecting receivable bills #1######'; - Text1100002: Label 'Rejecting receivable invoices #1######'; - Text1100003: Label 'Rejecting receivable documents #1######'; - Text1100004: Label 'Rejected Bill %1/%2'; - Text1100005: Label 'Rejected Document %1'; - Text1100006: Label 'Document Rejection Expenses'; - Text1100007: Label '%1 documents have been rejected.'; - Text1100008: Label 'This field must be blank for Direct Posting.'; - GenJnlTemplate: Record "Gen. Journal Template"; - GenJnlBatch: Record "Gen. Journal Batch"; - PostedBillGr: Record "Posted Bill Group"; - GenJnlLine: Record "Gen. Journal Line" temporary; - BankAcc: Record "Bank Account"; - SourceCodeSetup: Record "Source Code Setup"; - CustPostingGr: Record "Customer Posting Group"; - BankAccPostingGr: Record "Bank Account Posting Group"; - Doc: Record "Cartera Doc."; - PostedDoc: Record "Posted Cartera Doc."; - ClosedDoc: Record "Closed Cartera Doc."; - FeeRange: Record "Fee Range"; - GLSetup: Record "General Ledger Setup"; - GLReg: Record "G/L Register"; - Currency: Record Currency; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - DocPost: Codeunit "Document-Post"; - CarteraManagement: Codeunit CarteraManagement; - GenJnlManagement: Codeunit GenJnlManagement; - CarteraJnlForm: Page "Cartera Journal"; - Window: Dialog; - IncludeExpenses: Boolean; - PostingDate: Date; - PostingDate2: Date; - TransactionNo: Integer; - CurrDescription: Text[250]; - CurrDocNo: Code[20]; - CurrDocNo2: Code[20]; - UseJournal: Option Direct,AuxJournal; - BatchName: Code[10]; - TemplName: Code[10]; - Discount: Boolean; - SourceCode: Code[10]; - GenJnlLineNextNo: Integer; - DocCount: Integer; - BalanceAccNo: Code[20]; - ArePostedDocs: Boolean; - ReasonCode: Code[10]; - Factoring: Boolean; - VATPostingSetup: Record "VAT Posting Setup"; - NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; - FirstVATEntryNo: Integer; - LastVATEntryNo: Integer; - ExistVATEntry: Boolean; - IsRedrawn: Boolean; - GainLossAmt: Decimal; - TempCurrCode: Code[10]; - NoRegs: Integer; - i: Integer; - MemIntReg: Record "BG/PO Post. Buffer"; - EntryType: Option " ","Initial Entry",Application,"Unrealized Loss","Unrealized Gain","Realized Loss","Realized Gain","Payment Discount","Payment Discount (VAT Excl.)","Payment Discount (VAT Adjustment)","Appln. Rounding","Correction of Remaining Amount",,,,,,,,,Settlement,Rejection,Redrawal,Expenses; - ExistsNoRealVAT: Boolean; - FindInClosedBills: Boolean; - - local procedure PrepareBillRejPosting(RemainingAmt: Decimal) - var - TempCurrencyCode: Code[10]; - Type: Option Receivable,Payable; - begin - CustPostingGr.Get(CustLedgEntry."Customer Posting Group"); - CustPostingGr.TestField("Rejected Bills Acc."); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - CustPostingGr."Rejected Bills Acc.", - RemainingAmt, - CustLedgEntry."Dimension Set ID"); - if ArePostedDocs then - if Discount then begin - CustPostingGr.TestField("Discted. Bills Acc."); - BalanceAccNo := CustPostingGr."Discted. Bills Acc."; - end else begin - CustPostingGr.TestField("Bills on Collection Acc."); - BalanceAccNo := CustPostingGr."Bills on Collection Acc."; - end - else begin - CustPostingGr.TestField("Bills Account"); - BalanceAccNo := CustPostingGr."Bills Account"; - end; - OnAfterGetBillsBalanceAccNo(GenJnlLine, CustLedgEntry, BalanceAccNo); - - PostingDate2 := 0D; - GainLossAmt := 0; - if CustLedgEntry."Currency Code" <> '' then begin - Currency.Get(CustLedgEntry."Currency Code"); - if ArePostedDocs then - PostingDate2 := CarteraManagement.GetLastDate(CustLedgEntry."Currency Code", PostedBillGr."Posting Date", Type::Receivable) - else - PostingDate2 := CarteraManagement.GetLastDate(CustLedgEntry."Currency Code", CustLedgEntry."Posting Date", Type::Receivable); - - GainLossAmt := CarteraManagement.GetGainLoss( - PostingDate2, - PostingDate, - RemainingAmt, - CustLedgEntry."Currency Code"); - end; - - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - BalanceAccNo, - -RemainingAmt, - CustLedgEntry."Dimension Set ID"); - - if GainLossAmt <> 0 then begin - TempCurrencyCode := CustLedgEntry."Currency Code"; - CustLedgEntry."Currency Code" := ''; - if GainLossAmt > 0 then begin - Currency.TestField("Realized Gains Acc."); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - Currency."Realized Gains Acc.", - -GainLossAmt, - CustLedgEntry."Dimension Set ID"); - end else begin - Currency.TestField("Realized Losses Acc."); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - Currency."Realized Losses Acc.", - -GainLossAmt, - CustLedgEntry."Dimension Set ID"); - end; - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - BalanceAccNo, - GainLossAmt, - CustLedgEntry."Dimension Set ID"); - - CustLedgEntry."Currency Code" := TempCurrencyCode; - end; - - if Discount then begin - BankAccPostingGr.TestField("Liabs. for Disc. Bills Acc."); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - BankAccPostingGr."Liabs. for Disc. Bills Acc.", - RemainingAmt, - CustLedgEntry."Dimension Set ID"); - - InsertGenJournalLine( - GenJnlLine."Account Type"::"Bank Account", - BankAcc."No.", - -RemainingAmt, - CustLedgEntry."Dimension Set ID"); - end; - end; - - local procedure PrepareInvoiceRejPosting(RemainingAmt: Decimal) - var - TempCurrencyCode: Code[10]; - Type: Option Receivable,Payable; - begin - CustPostingGr.Get(CustLedgEntry."Customer Posting Group"); - CustPostingGr.TestField("Rejected Factoring Acc."); - - PostingDate2 := 0D; - GainLossAmt := 0; - if CustLedgEntry."Currency Code" <> '' then begin - Currency.Get(CustLedgEntry."Currency Code"); - if ArePostedDocs then - PostingDate2 := CarteraManagement.GetLastDate(CustLedgEntry."Currency Code", PostedBillGr."Posting Date", Type::Receivable) - else - PostingDate2 := CarteraManagement.GetLastDate(CustLedgEntry."Currency Code", CustLedgEntry."Posting Date", Type::Receivable); - GainLossAmt := CarteraManagement.GetGainLoss( - PostingDate2, - PostingDate, - RemainingAmt, - CustLedgEntry."Currency Code"); - end; - - if ArePostedDocs then begin - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - CustPostingGr."Rejected Factoring Acc.", - RemainingAmt, - CustLedgEntry."Dimension Set ID"); - if ArePostedDocs then - if Discount then begin - CustPostingGr.TestField("Factoring for Discount Acc."); - BalanceAccNo := CustPostingGr."Factoring for Discount Acc."; - end else begin - CustPostingGr.TestField("Factoring for Collection Acc."); - BalanceAccNo := CustPostingGr."Factoring for Collection Acc."; - end; - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - BalanceAccNo, - -RemainingAmt, - CustLedgEntry."Dimension Set ID"); - end; - - if GainLossAmt <> 0 then begin - TempCurrencyCode := CustLedgEntry."Currency Code"; - CustLedgEntry."Currency Code" := ''; - if GainLossAmt > 0 then begin - Currency.TestField("Realized Gains Acc."); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - Currency."Realized Gains Acc.", - -GainLossAmt, - CustLedgEntry."Dimension Set ID"); - end else begin - Currency.TestField("Realized Losses Acc."); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - Currency."Realized Losses Acc.", - -GainLossAmt, - CustLedgEntry."Dimension Set ID"); - end; - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - BalanceAccNo, - GainLossAmt, - CustLedgEntry."Dimension Set ID"); - - CustLedgEntry."Currency Code" := TempCurrencyCode; - end; - - if Discount then begin - BankAccPostingGr.TestField("Liabs. for Factoring Acc."); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - BankAccPostingGr."Liabs. for Factoring Acc.", - DocPost.FindDisctdAmt(RemainingAmt, CustLedgEntry."Customer No.", BankAcc."No."), - CustLedgEntry."Dimension Set ID"); - - InsertGenJournalLine( - GenJnlLine."Account Type"::"Bank Account", - BankAcc."No.", - -DocPost.FindDisctdAmt(RemainingAmt, CustLedgEntry."Customer No.", BankAcc."No."), - CustLedgEntry."Dimension Set ID"); - end; - end; - - local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal; DimSetID: Integer) - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - if UseJournal = UseJournal::AuxJournal then begin - GenJnlLine."Journal Template Name" := TemplName; - GenJnlLine."Journal Batch Name" := BatchName; - end; - GenJnlLine."Document No." := CurrDocNo; - GenJnlLine."Bill No." := CurrDocNo2; - GenJnlLine.Validate("Account Type", AccType); - GenJnlLine.Validate("Account No.", AccNo); - GenJnlLine.Description := CopyStr(CurrDescription, 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", CustLedgEntry."Currency Code"); - GenJnlLine.Validate(Amount, Amount2); - if AccType = GenJnlLine."Account Type"::"G/L Account" then begin - GenJnlLine."Source No." := CustLedgEntry."Customer No."; - GenJnlLine."Source Type" := GenJnlLine."Source Type"::Customer; - end; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."Reason Code" := ReasonCode; - GenJnlLine."Dimension Set ID" := - CarteraManagement.GetCombinedDimSetID(GenJnlLine, DimSetID); - if UseJournal = UseJournal::AuxJournal then - GenJnlLine."System-Created Entry" := false - else - GenJnlLine."System-Created Entry" := true; - GenJnlLine.Insert(); - end; - - local procedure PostGenJournal() - var - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - GenJnlLine2: Record "Gen. Journal Line"; - LastLineNo: Integer; - begin - OnBeforePostGenJournal(GenJnlLine, CustLedgEntry); - Window.Close(); - - if not GenJnlLine.Find('-') then - exit; - - if UseJournal = UseJournal::AuxJournal then begin - GenJnlLine2.LockTable(); - GenJnlLine2.SetRange("Journal Template Name", TemplName); - GenJnlLine2.SetRange("Journal Batch Name", BatchName); - if GenJnlLine2.FindLast() then begin - LastLineNo := GenJnlLine2."Line No."; - TransactionNo := GenJnlLine2."Transaction No." + 1; - end; - repeat - GenJnlLine2 := GenJnlLine; - GenJnlLine2."Line No." := GenJnlLine2."Line No." + LastLineNo; - GenJnlLine2."Transaction No." := TransactionNo; - GenJnlLine2.Insert(); - until GenJnlLine.Next() = 0; - Commit(); - GenJnlLine2.Reset(); - GenJnlTemplate.Get(TemplName); - GenJnlLine2.FilterGroup := 2; - GenJnlLine2.SetRange("Journal Template Name", TemplName); - GenJnlLine2.FilterGroup := 0; - GenJnlManagement.SetName(BatchName, GenJnlLine2); - CarteraJnlForm.SetTableView(GenJnlLine2); - CarteraJnlForm.SetRecord(GenJnlLine2); - CarteraJnlForm.AllowClosing(true); - CarteraJnlForm.RunModal(); - end - else - repeat - GenJnlLine2 := GenJnlLine; - GenJnlPostLine.RunWithCheck(GenJnlLine2); - until GenJnlLine.Next() = 0; - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCustFindVATSetup(var VATPostingSetup: Record "VAT Posting Setup"; CustLedgEntry: Record "Cust. Ledger Entry"; var IsFromJnl: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterGetBillsBalanceAccNo(var GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry"; var BalanceAccNo: Code[20]) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforePostGenJournal(var GenJournalLine: Record "Gen. Journal Line"; CustLedgerEntry: Record "Cust. Ledger Entry") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeOnPreReport(var PostingDate: Date; var IncludeExpenses: Boolean; var UseJournal: Option; var TemplName: Code[10]; var BatchName: Code[10]) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnPostDataItemCustLedgEntryOnBeforeShowCompletationMessage(DocumentCount: Integer; var SkipMessage: Boolean) - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ReportSelectionCartera.Page.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ReportSelectionCartera.Page.al deleted file mode 100644 index 9cfe590e318..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ReportSelectionCartera.Page.al +++ /dev/null @@ -1,116 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using System.Globalization; -using System.Reflection; - -page 7000045 "Report Selection - Cartera" -{ - AboutTitle = 'About report selection for cartera'; - AboutText = 'On this page, you set up the default reports that are used when printing cartera documents such as bill groups, payment orders, and bills. Use the Usage field to select the type of document, then specify which reports to use in the list below.'; - AdditionalSearchTerms = 'Cartera Report Selections'; - ApplicationArea = Basic, Suite; - Caption = 'Report Selection - Cartera'; - PageType = Worksheet; - SaveValues = true; - SourceTable = "Cartera Report Selections"; - UsageCategory = Administration; - - layout - { - area(content) - { - field(ReportUsage2; ReportUsage2) - { - ApplicationArea = Basic, Suite; - Caption = 'Usage'; - ToolTip = 'Specifies the business purpose of the report.'; - - trigger OnValidate() - begin - SetUsageFilter(); - ReportUsage2OnAfterValidate(); - end; - } - repeater(Control1) - { - ShowCaption = false; - field(Sequence; Rec.Sequence) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the order number or the sequence in which you want to print this report.'; - } - field("Report ID"; Rec."Report ID") - { - ApplicationArea = Basic, Suite; - LookupPageID = Objects; - ToolTip = 'Specifies the number of the report to be printed.'; - } - field("Report Name"; Rec."Report Name") - { - ApplicationArea = Basic, Suite; - DrillDown = false; - ToolTip = 'Specifies the number of the report you want to print.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - ObjTransl.TranslateObject(ObjTransl."Object Type"::Report, Rec."Report ID"); - end; - - trigger OnNewRecord(BelowxRec: Boolean) - begin - Rec.NewRecord(); - end; - - trigger OnOpenPage() - begin - SetUsageFilter(); - end; - - var - ObjTransl: Record "Object Translation"; - ReportUsage2: Enum "Report Selection Usage Cartera"; - - local procedure SetUsageFilter() - begin - Rec.FilterGroup(2); - case ReportUsage2 of - "Report Selection Usage Cartera"::"Bill Group": - Rec.SetRange(Usage, Rec.Usage::"Bill Group"); - "Report Selection Usage Cartera"::"Posted Bill Group": - Rec.SetRange(Usage, Rec.Usage::"Posted Bill Group"); - "Report Selection Usage Cartera"::"Closed Bill Group": - Rec.SetRange(Usage, Rec.Usage::"Closed Bill Group"); - "Report Selection Usage Cartera"::Bill: - Rec.SetRange(Usage, Rec.Usage::Bill); - "Report Selection Usage Cartera"::"Bill Group - Test": - Rec.SetRange(Usage, Rec.Usage::"Bill Group - Test"); - "Report Selection Usage Cartera"::"Payment Order": - Rec.SetRange(Usage, Rec.Usage::"Payment Order"); - "Report Selection Usage Cartera"::"Posted Payment Order": - Rec.SetRange(Usage, Rec.Usage::"Posted Payment Order"); - "Report Selection Usage Cartera"::"Payment Order - Test": - Rec.SetRange(Usage, Rec.Usage::"Payment Order - Test"); - "Report Selection Usage Cartera"::"Closed Payment Order": - Rec.SetRange(Usage, Rec.Usage::"Closed Payment Order"); - end; - Rec.FilterGroup(0); - end; - - local procedure ReportUsage2OnAfterValidate() - begin - CurrPage.Update(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ReportSelectionUsageCartera.Enum.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ReportSelectionUsageCartera.Enum.al deleted file mode 100644 index d160f4ec8ff..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/ReportSelectionUsageCartera.Enum.al +++ /dev/null @@ -1,21 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -enum 7000045 "Report Selection Usage Cartera" -{ - Extensible = true; - AssignmentCompatibility = true; - - value(0; "Bill Group") { Caption = 'Bill Group'; } - value(1; "Posted Bill Group") { Caption = 'Posted Bill Group'; } - value(2; "Closed Bill Group") { Caption = 'Closed Bill Group'; } - value(3; "Bill") { Caption = 'Bill'; } - value(4; "Bill Group - Test") { Caption = 'Bill Group - Test'; } - value(5; "Payment Order") { Caption = 'Payment Order'; } - value(6; "Posted Payment Order") { Caption = 'Posted Payment Order'; } - value(7; "Payment Order - Test") { Caption = 'Payment Order - Test'; } - value(8; "Closed Payment Order") { Caption = 'Closed Payment Order'; } -} diff --git a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/SalesPurchBookVATBuffer.Table.al b/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/SalesPurchBookVATBuffer.Table.al deleted file mode 100644 index e33622737b0..00000000000 --- a/src/Layers/ES/BaseApp/Local/Finance/ReceivablesPayables/SalesPurchBookVATBuffer.Table.al +++ /dev/null @@ -1,95 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Finance.ReceivablesPayables; - -using Microsoft.Finance.VAT.Ledger; -using Microsoft.Finance.VAT.Setup; - -table 10704 "Sales/Purch. Book VAT Buffer" -{ - Caption = 'Sales/Purch. Book VAT Buffer'; - LookupPageID = "VAT Entries"; - DataClassification = CustomerContent; - - fields - { - field(1; "VAT %"; Decimal) - { - AutoFormatType = 0; - Caption = 'VAT %'; - DataClassification = SystemMetadata; - } - field(2; "EC %"; Decimal) - { - AutoFormatType = 0; - Caption = 'EC %'; - DataClassification = SystemMetadata; - } - field(3; Base; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Base'; - DataClassification = SystemMetadata; - } - field(4; Amount; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amount'; - DataClassification = SystemMetadata; - } - field(5; "EC Amount"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'EC Amount'; - DataClassification = SystemMetadata; - } - field(6; "Non-Deductible VAT %"; Decimal) - { - AutoFormatType = 0; - Caption = 'Non-Deductible VAT %'; - DataClassification = SystemMetadata; - } - field(7; "Non-Deductible VAT Base"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Non-Deductible VAT Base'; - DataClassification = SystemMetadata; - } - field(8; "Non-Deductible VAT Amount"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Non-Deductible VAT Amount'; - DataClassification = SystemMetadata; - } - } - - keys - { - key(Key1; "VAT %", "EC %") - { - Clustered = true; - } - } - - fieldgroups - { - } - - trigger OnInsert() - begin - VATPostingSetup.Get("EC %", Base); - "VAT %" := VATPostingSetup."VAT %"; - "EC %" := VATPostingSetup."EC %"; - end; - - var - VATPostingSetup: Record "VAT Posting Setup"; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostPOAnalysisLCYFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostPOAnalysisLCYFactBox.Page.al deleted file mode 100644 index 0434bae7121..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostPOAnalysisLCYFactBox.Page.al +++ /dev/null @@ -1,174 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Finance.ReceivablesPayables; - -page 35299 "Post. PO Analysis LCY Fact Box" -{ - Caption = 'Post. PO Analysis LCY Fact Box'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SourceTable = "Posted Payment Order"; - - layout - { - area(content) - { - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code associated with this posted payment order.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this posted payment order.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; - } - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoOpen; NoOpen) - { - ApplicationArea = Basic, Suite; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - group("Amount (LCY)") - { - Caption = 'Amount (LCY)'; - field(OpenAmtLCY; OpenAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmtLCY; HonoredAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(RejectedAmtLCY; RejectedAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmtLCY; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - PostedDoc: Record "Posted Cartera Doc."; - OpenAmt: Decimal; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - OpenAmtLCY: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoOpen: Integer; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); - PostedDoc.SetRange(Type, PostedDoc.Type::Payable); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); - Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - OpenAmt := PostedDoc."Amount for Collection"; - OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoOpen := PostedDoc.Count; - - PostedDoc.SetRange(Status); - PostedDoc.SetRange(Redrawn, true); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := PostedDoc."Amount for Collection"; - RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRedrawn := PostedDoc.Count; - PostedDoc.SetRange(Redrawn); - - PostedDoc.SetRange(Status, PostedDoc.Status::Honored); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; - HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; - NoHonored := PostedDoc.Count - NoRedrawn; - - PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RejectedAmt := PostedDoc."Amount for Collection"; - RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRejected := PostedDoc.Count; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostPOAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostPOAnalysisNonLCYFB.Page.al deleted file mode 100644 index 3677c68a7bc..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostPOAnalysisNonLCYFB.Page.al +++ /dev/null @@ -1,174 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Finance.ReceivablesPayables; - -page 35300 "Post. PO Analysis Non LCY FB" -{ - Caption = 'Post. PO Analysis Non LCY FB'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SourceTable = "Posted Payment Order"; - - layout - { - area(content) - { - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code associated with this posted payment order.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this posted payment order.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; - } - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoOpen; NoOpen) - { - ApplicationArea = Basic, Suite; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - group(Amount) - { - Caption = 'Amount'; - field(OpenAmt; OpenAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmt; HonoredAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(RejectedAmt; RejectedAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmt; RedrawnAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - PostedDoc: Record "Posted Cartera Doc."; - OpenAmt: Decimal; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - OpenAmtLCY: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoOpen: Integer; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); - PostedDoc.SetRange(Type, PostedDoc.Type::Payable); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); - Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - OpenAmt := PostedDoc."Amount for Collection"; - OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoOpen := PostedDoc.Count; - - PostedDoc.SetRange(Status); - PostedDoc.SetRange(Redrawn, true); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := PostedDoc."Amount for Collection"; - RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRedrawn := PostedDoc.Count; - PostedDoc.SetRange(Redrawn); - - PostedDoc.SetRange(Status, PostedDoc.Status::Honored); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; - HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; - NoHonored := PostedDoc.Count - NoRedrawn; - - PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RejectedAmt := PostedDoc."Amount for Collection"; - RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRejected := PostedDoc.Count; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostPaymentOrdersAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostPaymentOrdersAnalysis.Page.al deleted file mode 100644 index aaf04bd4a5c..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostPaymentOrdersAnalysis.Page.al +++ /dev/null @@ -1,241 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000059 "Post. Payment Orders Analysis" -{ - Caption = 'Post. Payment Orders Analysis'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SourceTable = "Posted Payment Order"; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field("Category Filter"; Rec."Category Filter") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a category filter for the documents included in this posted payment order.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - } - group(Control16) - { - ShowCaption = false; - fixed(Control1902454701) - { - ShowCaption = false; - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoOpen; NoOpen) - { - ApplicationArea = Basic, Suite; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code associated with this posted payment order.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this posted payment order.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; - } - } - group(Amount) - { - Caption = 'Amount'; - field(OpenAmt; OpenAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmt; HonoredAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Closed'; - Editable = false; - ToolTip = 'Specifies if the document is closed.'; - } - field(RejectedAmt; RejectedAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmt; RedrawnAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - } - group("Amount (LCY)") - { - Caption = 'Amount (LCY)'; - field(OpenAmtLCY; OpenAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmtLCY; HonoredAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Closed'; - Editable = false; - ToolTip = 'Specifies if the document is closed.'; - } - field(RejectedAmtLCY; RejectedAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmtLCY; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - } - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - PostedDoc: Record "Posted Cartera Doc."; - OpenAmt: Decimal; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - OpenAmtLCY: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoOpen: Integer; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); - PostedDoc.SetRange(Type, PostedDoc.Type::Payable); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); - Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - OpenAmt := PostedDoc."Amount for Collection"; - OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoOpen := PostedDoc.Count; - - PostedDoc.SetRange(Status); - PostedDoc.SetRange(Redrawn, true); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := PostedDoc."Amount for Collection"; - RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRedrawn := PostedDoc.Count; - PostedDoc.SetRange(Redrawn); - - PostedDoc.SetRange(Status, PostedDoc.Status::Honored); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; - HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; - NoHonored := PostedDoc.Count - NoRedrawn; - - PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RejectedAmt := PostedDoc."Amount for Collection"; - RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRejected := PostedDoc.Count; - end; - - local procedure CategoryFilterOnAfterValidate() - begin - UpdateStatistics(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostPmtOrdMaturityLin.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostPmtOrdMaturityLin.Page.al deleted file mode 100644 index a214eb0255f..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostPmtOrdMaturityLin.Page.al +++ /dev/null @@ -1,139 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Enums; -using Microsoft.Foundation.Period; -using System.Utilities; - -page 7000058 "Post. Pmt. Ord. Maturity Lin." -{ - Caption = 'Lines'; - PageType = ListPart; - SourceTable = Date; - - layout - { - area(content) - { - repeater(Control1) - { - Editable = false; - ShowCaption = false; - field("Period Start"; Rec."Period Start") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the starting date of the period that you want to view.'; - } - field("Period Name"; Rec."Period Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name of the period shown on the line.'; - } - field(DocAmount; DocAmount) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = PostedPmtOrd."Currency Code"; - AutoFormatType = 1; - Caption = 'Amount'; - DrillDown = true; - ToolTip = 'Specifies the amount for the posted payment order for the period.'; - - trigger OnDrillDown() - begin - ShowDocEntries(); - end; - } - field(DocAmountLCY; DocAmountLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amount (LCY)'; - DrillDown = true; - ToolTip = 'Specifies the amount for the posted payment order for the period.'; - - trigger OnDrillDown() - begin - ShowDocEntries(); - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - SetDateFilter(); - if PostedPmtOrd."No." <> '' then begin - PostedPmtOrd.CalcFields("Amount Grouped", "Amount Grouped (LCY)"); - DocAmount := PostedPmtOrd."Amount Grouped"; - DocAmountLCY := PostedPmtOrd."Amount Grouped (LCY)"; - end else begin - DocAmount := 0; - DocAmountLCY := 0; - end; - end; - - trigger OnFindRecord(Which: Text): Boolean - begin - exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); - end; - - trigger OnNextRecord(Steps: Integer): Integer - begin - exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); - end; - - trigger OnOpenPage() - begin - Rec.Reset(); - end; - - var - PostedPmtOrd: Record "Posted Payment Order"; - PostedDoc: Record "Posted Cartera Doc."; - PeriodPageManagement: Codeunit PeriodPageManagement; - PeriodLength: Enum "Analysis Period Type"; - AmountType: Enum "Analysis Amount Type"; - DocAmount: Decimal; - DocAmountLCY: Decimal; - - [Scope('OnPrem')] - procedure Set(var NewPostedPmtOrd: Record "Posted Payment Order"; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") - begin - PostedPmtOrd.Copy(NewPostedPmtOrd); - PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); - AmountType := "Analysis Amount Type".FromInteger(NewAmountType); - CurrPage.Update(false); - end; - - [Scope('OnPrem')] - procedure SetDateFilter() - begin - if AmountType = AmountType::"Net Change" then - PostedPmtOrd.SetRange("Due Date Filter", Rec."Period Start", Rec."Period End") - else - PostedPmtOrd.SetRange("Due Date Filter", 0D, Rec."Period End"); - end; - - local procedure ShowDocEntries() - begin - SetDateFilter(); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", PostedPmtOrd."No."); - PostedDoc.SetRange("Collection Agent", PostedDoc."Collection Agent"::Bank); - PostedDoc.SetFilter("Due Date", PostedPmtOrd.GetFilter("Due Date Filter")); - PostedDoc.SetFilter("Global Dimension 1 Code", PostedPmtOrd.GetFilter("Global Dimension 1 Filter")); - PostedDoc.SetFilter("Global Dimension 2 Code", PostedPmtOrd.GetFilter("Global Dimension 2 Filter")); - PostedDoc.SetFilter("Category Code", PostedPmtOrd.GetFilter("Category Filter")); - PAGE.RunModal(0, PostedDoc); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrder.Table.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrder.Table.al deleted file mode 100644 index bab77954500..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrder.Table.al +++ /dev/null @@ -1,244 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -table 7000021 "Posted Payment Order" -{ - Caption = 'Posted Payment Order'; - DrillDownPageID = "Posted Payment Orders List"; - LookupPageID = "Posted Payment Orders List"; - DataClassification = CustomerContent; - - fields - { - field(2; "No."; Code[20]) - { - Caption = 'No.'; - } - field(3; "Bank Account No."; Code[20]) - { - Caption = 'Bank Account No.'; - TableRelation = "Bank Account"; - } - field(4; "Bank Account Name"; Text[100]) - { - CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); - Caption = 'Bank Account Name'; - Editable = false; - FieldClass = FlowField; - } - field(5; "Posting Description"; Text[100]) - { - Caption = 'Posting Description'; - } - field(7; Amount; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Payable))); - Caption = 'Amount'; - Editable = false; - FieldClass = FlowField; - } - field(8; "Reason Code"; Code[10]) - { - Caption = 'Reason Code'; - TableRelation = "Reason Code"; - } - field(9; "No. Printed"; Integer) - { - Caption = 'No. Printed'; - } - field(10; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(11; Comment; Boolean) - { - CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), - Type = filter(Payable))); - Caption = 'Comment'; - Editable = false; - FieldClass = FlowField; - } - field(12; "Category Filter"; Code[10]) - { - Caption = 'Category Filter'; - FieldClass = FlowFilter; - TableRelation = "Category Code"; - ValidateTableRelation = false; - } - field(13; "Due Date Filter"; Date) - { - Caption = 'Due Date Filter'; - FieldClass = FlowFilter; - } - field(14; "Global Dimension 1 Filter"; Code[20]) - { - CaptionClass = '1,3,1'; - Caption = 'Global Dimension 1 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(15; "Global Dimension 2 Filter"; Code[20]) - { - CaptionClass = '1,3,2'; - Caption = 'Global Dimension 2 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(16; "Amount Grouped"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Payable))); - Caption = 'Amount Grouped'; - Editable = false; - FieldClass = FlowField; - } - field(17; "Remaining Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Payable))); - Caption = 'Remaining Amount'; - Editable = false; - FieldClass = FlowField; - } - field(18; "Status Filter"; Enum "Cartera Document Status") - { - Caption = 'Status Filter'; - FieldClass = FlowFilter; - } - field(29; "Payment Order Expenses Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Payment Order Expenses Amt.'; - } - field(33; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - Editable = false; - TableRelation = Currency; - } - field(34; "Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Payable))); - Caption = 'Amount (LCY)'; - Editable = false; - FieldClass = FlowField; - } - field(35; "Amount Grouped (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Posted Cartera Doc."."Amt. for Collection (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Payable))); - Caption = 'Amount Grouped (LCY)'; - Editable = false; - FieldClass = FlowField; - } - field(36; "Remaining Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Payable))); - Caption = 'Remaining Amount (LCY)'; - Editable = false; - FieldClass = FlowField; - } - } - - keys - { - key(Key1; "No.") - { - Clustered = true; - } - key(Key2; "Bank Account No.", "Posting Date") - { - SumIndexFields = "Payment Order Expenses Amt."; - } - key(Key3; "Bank Account No.", "Posting Date", "Currency Code") - { - SumIndexFields = "Payment Order Expenses Amt."; - } - } - - fieldgroups - { - } - - var - Text1100000: Label 'untitled'; - PostedPmtOrd: Record "Posted Payment Order"; - - [Scope('OnPrem')] - procedure PrintRecords(ShowRequestForm: Boolean) - var - CarteraReportSelection: Record "Cartera Report Selections"; - begin - PostedPmtOrd.Copy(Rec); - CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Posted Payment Order"); - CarteraReportSelection.SetFilter("Report ID", '<>0'); - CarteraReportSelection.Find('-'); - repeat - REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, PostedPmtOrd); - until CarteraReportSelection.Next() = 0; - end; - - procedure Caption(): Text - begin - if "No." = '' then - exit(Text1100000); - CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrderListing.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrderListing.Report.al deleted file mode 100644 index e84f0fe794c..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrderListing.Report.al +++ /dev/null @@ -1,414 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Foundation.Company; -using Microsoft.Purchases.Vendor; -using System.Utilities; - -report 7000011 "Posted Payment Order Listing" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Purchases/History/PostedPaymentOrderListing.rdlc'; - ApplicationArea = Basic, Suite; - Caption = 'Posted Payment Order Listing'; - Permissions = TableData "Posted Payment Order" = r; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem(PostedPmtOrd; "Posted Payment Order") - { - DataItemTableView = sorting("No."); - PrintOnlyIfDetail = true; - RequestFilterFields = "No."; - column(PostedPmtOrd_No_; "No.") - { - } - dataitem(CopyLoop; "Integer") - { - DataItemTableView = sorting(Number); - dataitem(PageLoop; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(PostedPmtOrd__No__; PostedPmtOrd."No.") - { - } - column(STRSUBSTNO_Text1100001_CopyText_; StrSubstNo(Text1100001, CopyText)) - { - } - column(CompanyAddr_1_; CompanyAddr[1]) - { - } - column(CompanyAddr_2_; CompanyAddr[2]) - { - } - column(CompanyAddr_3_; CompanyAddr[3]) - { - } - column(CompanyAddr_4_; CompanyAddr[4]) - { - } - column(CompanyAddr_5_; CompanyAddr[5]) - { - } - column(CompanyAddr_6_; CompanyAddr[6]) - { - } - column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") - { - } - column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") - { - } - column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") - { - } - column(PostedPmtOrd__Posting_Date_; Format(PostedPmtOrd."Posting Date")) - { - } - column(BankAccAddr_4_; BankAccAddr[4]) - { - } - column(BankAccAddr_5_; BankAccAddr[5]) - { - } - column(BankAccAddr_6_; BankAccAddr[6]) - { - } - column(BankAccAddr_7_; BankAccAddr[7]) - { - } - column(BankAccAddr_3_; BankAccAddr[3]) - { - } - column(BankAccAddr_2_; BankAccAddr[2]) - { - } - column(BankAccAddr_1_; BankAccAddr[1]) - { - } - column(PostedPmtOrd__Currency_Code_; PostedPmtOrd."Currency Code") - { - } - column(PrintAmountsInLCY; PrintAmountsInLCY) - { - } - column(OutputNo; OutputNo) - { - } - column(PageLoop_Number; Number) - { - } - column(PostedPmtOrd__No__Caption; PostedPmtOrd__No__CaptionLbl) - { - } - column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) - { - } - column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) - { - } - column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) - { - } - column(PostedPmtOrd__Posting_Date_Caption; PostedPmtOrd__Posting_Date_CaptionLbl) - { - } - column(PostedPmtOrd__Currency_Code_Caption; PostedPmtOrd__Currency_Code_CaptionLbl) - { - } - column(PageCaption; PageCaptionLbl) - { - } - dataitem(PostedDoc; "Posted Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = PostedPmtOrd; - DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where("Collection Agent" = const(Bank), Type = const(Payable)); - column(AmtForCollection; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(AmtForCollection_Control32; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Vendor_City; Vendor.City) - { - } - column(Vendor_County; Vendor.County) - { - } - column(Vendor__Post_Code_; Vendor."Post Code") - { - } - column(Vendor_Name; Vendor.Name) - { - } - column(PostedDoc__Account_No__; "Account No.") - { - } - column(PostedDoc__Honored_Rejtd__at_Date_; "Honored/Rejtd. at Date") - { - } - column(PostedDoc_Status; Status) - { - } - column(PostedDoc__Document_No__; "Document No.") - { - } - column(PostedDoc__Document_Type_; "Document Type") - { - } - column(PostedDoc__Due_Date_; Format("Due Date")) - { - } - column(Vendor_Name_Control28; Vendor.Name) - { - } - column(Vendor_City_Control30; Vendor.City) - { - } - column(AmtForCollection_Control31; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Vendor_County_Control35; Vendor.County) - { - } - column(PostedDoc__Document_No___Control3; "Document No.") - { - } - column(PostedDoc__No__; "No.") - { - } - column(Vendor__Post_Code__Control9; Vendor."Post Code") - { - } - column(PostedDoc_Status_Control78; Status) - { - } - column(PostedDoc__Honored_Rejtd__at_Date__Control80; "Honored/Rejtd. at Date") - { - } - column(PostedDoc__Due_Date__Control8; Format("Due Date")) - { - } - column(PostedDoc__Account_No___Control1; "Account No.") - { - } - column(PostedDoc__Document_Type__Control23; "Document Type") - { - } - column(AmtForCollection_Control36; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(AmtForCollection_Control39; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(PostedDoc_Type; Type) - { - } - column(PostedDoc_Entry_No_; "Entry No.") - { - } - column(PostedDoc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") - { - } - column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) - { - } - column(Document_No_Caption; Document_No_CaptionLbl) - { - } - column(Bill_No_Caption; Bill_No_CaptionLbl) - { - } - column(Vendor_Name_Control28Caption; Vendor_Name_Control28CaptionLbl) - { - } - column(Vendor__Post_Code__Control9Caption; Vendor__Post_Code__Control9CaptionLbl) - { - } - column(Vendor_City_Control30Caption; Vendor_City_Control30CaptionLbl) - { - } - column(AmtForCollection_Control31Caption; AmtForCollection_Control31CaptionLbl) - { - } - column(Vendor_County_Control35Caption; Vendor_County_Control35CaptionLbl) - { - } - column(PostedDoc_Status_Control78Caption; FieldCaption(Status)) - { - } - column(PostedDoc__Honored_Rejtd__at_Date__Control80Caption; FieldCaption("Honored/Rejtd. at Date")) - { - } - column(PostedDoc__Due_Date__Control8Caption; PostedDoc__Due_Date__Control8CaptionLbl) - { - } - column(PostedDoc__Account_No___Control1Caption; PostedDoc__Account_No___Control1CaptionLbl) - { - } - column(PostedDoc__Document_Type__Control23Caption; FieldCaption("Document Type")) - { - } - column(ContinuedCaption; ContinuedCaptionLbl) - { - } - column(EmptyStringCaption; EmptyStringCaptionLbl) - { - } - column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) - { - } - column(TotalCaption; TotalCaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - Vendor.Get("Account No."); - if PrintAmountsInLCY then - AmtForCollection := "Amt. for Collection (LCY)" - else - AmtForCollection := "Amount for Collection"; - end; - - trigger OnPreDataItem() - begin - Clear(AmtForCollection); - end; - } - } - - trigger OnAfterGetRecord() - begin - if Number > 1 then - CopyText := Text1100000; - OutputNo := OutputNo + 1; - end; - - trigger OnPreDataItem() - begin - NoOfLoops := Abs(NoOfCopies) + 1; - CopyText := ''; - SetRange(Number, 1, NoOfLoops); - - OutputNo := 1; - end; - } - - trigger OnAfterGetRecord() - begin - BankAcc.Get(PostedPmtOrd."Bank Account No."); - FormatAddress.FormatAddr( - BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", - BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - FormatAddress.Company(CompanyAddr, CompanyInfo); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(NoOfCopies; NoOfCopies) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Copies'; - ToolTip = 'Specifies how many copies of the document to print.'; - } - field(PrintAmountsInLCY; PrintAmountsInLCY) - { - ApplicationArea = Basic, Suite; - Caption = 'Show amounts in LCY'; - ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - var - Text1100000: Label 'COPY'; - Text1100001: Label 'Payment Order %1'; - CompanyInfo: Record "Company Information"; - BankAcc: Record "Bank Account"; - Vendor: Record Vendor; - FormatAddress: Codeunit "Format Address"; - BankAccAddr: array[8] of Text[100]; - CompanyAddr: array[8] of Text[100]; - NoOfLoops: Integer; - NoOfCopies: Integer; - CopyText: Text[30]; - PrintAmountsInLCY: Boolean; - AmtForCollection: Decimal; - OutputNo: Integer; - PostedPmtOrd__No__CaptionLbl: Label 'Payment Order No.'; - CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; - CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; - CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; - PostedPmtOrd__Posting_Date_CaptionLbl: Label 'Date'; - PostedPmtOrd__Currency_Code_CaptionLbl: Label 'Currency Code'; - PageCaptionLbl: Label 'Page'; - All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; - Document_No_CaptionLbl: Label 'Document No.'; - Bill_No_CaptionLbl: Label 'Bill No.'; - Vendor_Name_Control28CaptionLbl: Label 'Name'; - Vendor__Post_Code__Control9CaptionLbl: Label 'Post Code'; - Vendor_City_Control30CaptionLbl: Label 'City /'; - AmtForCollection_Control31CaptionLbl: Label 'Amount for Collection'; - Vendor_County_Control35CaptionLbl: Label 'County'; - PostedDoc__Due_Date__Control8CaptionLbl: Label 'Due Date'; - PostedDoc__Account_No___Control1CaptionLbl: Label 'Vendor No.'; - ContinuedCaptionLbl: Label 'Continued'; - EmptyStringCaptionLbl: Label '/', Locked = true; - ContinuedCaption_Control15Lbl: Label 'Continued'; - TotalCaptionLbl: Label 'Total'; - - [Scope('OnPrem')] - procedure GetCurrencyCode(): Code[10] - begin - if PrintAmountsInLCY then - exit(''); - - exit(PostedDoc."Currency Code"); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrderListing.rdlc b/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrderListing.rdlc deleted file mode 100644 index 7250213ae68..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrderListing.rdlc +++ /dev/null @@ -1,2595 +0,0 @@ - - - 0 - - - - SQL - - - None - f19ae7ed-0570-45ae-9fdc-fb2bc3080634 - - - - - - - - - - - 18.50001cm - - - - - 12.49197cm - - - - - - - - - - 1.4cm - - - 1.35cm - - - 1.35cm - - - 0.3cm - - - 0.7cm - - - 0.7cm - - - 1.9cm - - - 1.5cm - - - 3.3cm - - - 1.5cm - - - 2.6cm - - - 1.9cm - - - - - 0.423cm - - - - - true - true - - - - - =First(Fields!All_amounts_are_in_LCYCaption.Value) - - - - - - All_amounts_are_in_LCYCaption - 48 - - - 8 - - - - - - - - - - - - - true - true - - - - - - - - - - - textbox12 - 47 - - - 4 - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!PostedDoc__Due_Date__Control8Caption.Value) - - - - - - - 46 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_Type__Control23Caption.Value - - - - - - 45 - - - - - - - - true - - - - - =First(Fields!Document_No_Caption.Value) - - - - - - - 44 - - - - - - - - true - true - - - - - - - - - - - - textbox2 - 43 - - - - - - - - true - - - - - =First(Fields!Bill_No_Caption.Value) - - - - - - - 42 - - - - - - - - true - - - - - =First(Fields!PostedDoc_Status_Control78Caption.Value) - - - - - - 41 - - - - - - - - true - - - - - =First(Fields!PostedDoc__Honored_Rejtd__at_Date__Control80Caption.Value) - - - - - - - 40 - - - - - - - - true - - - - - =First(Fields!PostedDoc__Account_No___Control1Caption.Value) - - - - - - - 39 - - - - - - - - true - - - - - =First(Fields!Vendor_Name_Control28Caption.Value) - - - - - - 38 - - - - - - - - true - - - - - =First(Fields!Vendor__Post_Code__Control9Caption.Value) - - - - - - 37 - - - - - - - - true - - - - - =First(Fields!Vendor_City_Control30Caption.Value) + Chr(10) + First(Fields!Vendor_County_Control35Caption.Value) - - - - - - 36 - - - - - - - - true - - - - - =First(Fields!AmtForCollection_Control31Caption.Value) - - - - - - - 35 - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - 12 - - - - - - - - - - - - - - - - - 0.425cm - - - - - true - - - - - =Fields!PostedDoc__Due_Date_.Value - - - - - - 33 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_Type_.Value - - - - - - 32 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_No__.Value - - - - - - - 31 - - - - - - - - true - true - - - - - - - - - - - - - true - true - - - - - - - - - - - - - true - - - - - =Fields!PostedDoc_Status.Value - - - - - - 28 - - - - - - - - true - - - - - =Fields!PostedDoc__Honored_Rejtd__at_Date_.Value - - - - - - 27 - - - - - - - - true - - - - - =Fields!PostedDoc__Account_No__.Value - - - - - - - 26 - - - - - - - - true - - - - - =Fields!Vendor_Name.Value - - - - - - 25 - - - - - - - - true - - - - - =Fields!Vendor__Post_Code_.Value - - - - - - - 24 - - - - - - - - true - - - - - =Fields!Vendor_City.Value - - - - - - 23 - - - - - - - - true - true - - - - - =Fields!AmtForCollection.Value - - - - - - 22 - - - - - - - - 0.425cm - - - - - true - - - - - - - - 10 - - - - - - - - - - - - - - - true - - - - - =Fields!Vendor_County.Value - - - - - - 20 - - - - - - - - true - - - - - - - - - - - - - 0.425cm - - - - - true - - - - - =Fields!PostedDoc__Due_Date_.Value - - - - - - 18 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_Type_.Value - - - - - - 17 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_No__.Value - - - - - - - 16 - - - - - - - - true - true - - - - - =Fields!EmptyStringCaption.Value - - - - - - - textbox6 - 15 - - - - - - - - true - - - - - = Fields!PostedDoc__No__.Value - - - - - - 14 - - - - - - - - true - - - - - =Fields!PostedDoc_Status.Value - - - - - - 13 - - - - - - - - true - - - - - =Fields!PostedDoc__Honored_Rejtd__at_Date_.Value - - - - - - 12 - - - - - - - - true - - - - - =Fields!PostedDoc__Account_No__.Value - - - - - - - 11 - - - - - - - - true - - - - - =Fields!Vendor_Name.Value - - - - - - 10 - - - - - - - - true - - - - - =Fields!Vendor__Post_Code_.Value - - - - - - - 9 - - - - - - - - true - - - - - =Fields!Vendor_City.Value - - - - - - 8 - - - - - - - - true - true - - - - - =Fields!AmtForCollection.Value - - - - - - 7 - - - - - - - - 0.425cm - - - - - true - true - - - - - - - - 10 - - - - - - - - - - - - - - - true - - - - - =Fields!Vendor_County.Value - - - - - - 1 - - - - - - - - true - - - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - 12 - - - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =First(Fields!TotalCaption.Value) - - - - - - 6 - - - 5 - - - - - - - - - - true - true - - - - - - - - - - - textbox62 - 5 - - - 6 - - - - - - - - - - - true - true - - - - - =Sum(Fields!AmtForCollection.Value) - - - - - - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =IIF(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) - - After - true - true - - - After - true - true - - - - - =1 - - - - - - - Fields!PostedPmtOrd__No__.Value - =Fields!OutputNo.Value - - - - - After - true - true - - - - Detail - - - - - =IIF(Fields!PostedDoc__Document_Type_.Value="Bill",TRUE,FALSE) - - - - - =IIF(Fields!PostedDoc__Document_Type_.Value="Bill",TRUE,FALSE) - - - - - =IIF(Fields!PostedDoc__Document_Type_.Value="Bill",FALSE,TRUE) - - - - - =IIF(Fields!PostedDoc__Document_Type_.Value="Bill",FALSE,TRUE) - - - - Detail_Collection - Output - true - - - - - Before - true - - - Before - true - - - - - - DataSet_Result - 8.25397cm - 27 - - - true - - - - - =Fields!BankAccAddr_7_.Value - - - - - - 3.80952cm - 0.423cm - 7.61905cm - 26 - - - - true - - - - - =Fields!PostedPmtOrd__No__.Value - - - - - - - 5.50152cm - 15.2381cm - 0.423cm - 2.99048cm - 25 - - - - true - - - - - =Fields!STRSUBSTNO_Text1100001_CopyText_.Value - - - - - - 0.00252cm - 12.0881cm - 0.423cm - 24 - - - - true - - - - - =Fields!CompanyAddr_1_.Value - - - - - - 1.27152cm - 12.0881cm - 0.423cm - 23 - - - - true - - - - - =Fields!CompanyAddr_2_.Value - - - - - - 1.69452cm - 12.0881cm - 0.423cm - 22 - - - - true - - - - - =Fields!CompanyAddr_3_.Value - - - - - - 2.11752cm - 12.0881cm - 0.423cm - 21 - - - - true - - - - - =Fields!CompanyAddr_4_.Value - - - - - - 2.54052cm - 12.0881cm - 0.423cm - 20 - - - - true - - - - - =Fields!CompanyAddr_5_.Value - - - - - - 2.96352cm - 12.0881cm - 0.423cm - 19 - - - - true - - - - - =Fields!CompanyAddr_6_.Value - - - - - - 3.38652cm - 12.0881cm - 0.423cm - 18 - - - - true - - - - - =Fields!CompanyInfo__Phone_No__.Value - - - - - - 3.80952cm - 14.1881cm - 0.423cm - 17 - - - - true - - - - - =Fields!CompanyInfo__Fax_No__.Value - - - - - - 4.23252cm - 14.1881cm - 0.423cm - 16 - - - - true - - - - - =Fields!CompanyInfo__VAT_Registration_No__.Value - - - - - - 4.65552cm - 14.1881cm - 0.423cm - 15 - - - - true - - - - - =Fields!PostedPmtOrd__Posting_Date_.Value - - - - - - - 7.19352cm - 15.2381cm - 0.423cm - 2.99048cm - 14 - - - - true - - - - - =Fields!BankAccAddr_4_.Value - - - - - - 2.54052cm - 0.423cm - 7.61905cm - 13 - - - - true - - - - - =Fields!BankAccAddr_5_.Value - - - - - - 2.96352cm - 0.423cm - 7.61905cm - 12 - - - - true - - - - - =Fields!BankAccAddr_6_.Value - - - - - - 3.38652cm - 0.423cm - 7.61905cm - 11 - - - - true - - - - - =Fields!BankAccAddr_3_.Value - - - - - - 2.11752cm - 0.423cm - 7.61905cm - 9 - - - - true - - - - - =Fields!BankAccAddr_2_.Value - - - - - - 1.69452cm - 0.423cm - 7.61905cm - 8 - - - - true - - - - - =Fields!BankAccAddr_1_.Value - - - - - - 1.27152cm - 0.423cm - 7.61905cm - 7 - - - - true - - - - - =Fields!PostedPmtOrd__Currency_Code_.Value - - - - - - - 5.92452cm - 15.2381cm - 0.423cm - 2.99048cm - 6 - - - - true - - - - - =Fields!PostedPmtOrd__No__Caption.Value - - - - - - 5.50152cm - 12.0881cm - 0.423cm - 3cm - 5 - - - - true - - - - - =Fields!CompanyInfo__Phone_No__Caption.Value - - - - - - 3.80952cm - 12.0881cm - 0.423cm - 1.89cm - 4 - - - - true - - - - - =Fields!CompanyInfo__Fax_No__Caption.Value - - - - - - 4.23252cm - 12.0881cm - 0.423cm - 1.89cm - 3 - - - - true - - - - - =Fields!CompanyInfo__VAT_Registration_No__Caption.Value - - - - - - 4.65552cm - 12.0881cm - 0.423cm - 1.89cm - 2 - - - - true - - - - - =Fields!PostedPmtOrd__Posting_Date_Caption.Value - - - - - - 7.19352cm - 12.0881cm - 0.423cm - 3cm - 1 - - - - true - - - - - =Fields!PostedPmtOrd__Currency_Code_Caption.Value - - - - - - 5.92452cm - 12.0881cm - 0.423cm - 3cm - - - - true - - - - - - - - - - - - - - - - - - =Fields!PostedPmtOrd__No__.Value - =Fields!OutputNo.Value - - - Between - - - Output - true - - - - DataSet_Result - - End - - - - 12.49197cm - - 18.50001cm - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - - -Shared offset as Integer -Shared newPage as Object -Shared currentgroup1 as Object -Shared currentgroup2 as Object -Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object - If NewPage - offset = pagenumber - 1 - End If - Return pagenumber - offset -End Function - -Public Function IsNewPage(group1 as Object, group2 as Object) As Boolean -newPage = FALSE -If Not (group1 = currentgroup1) - newPage = TRUE - currentgroup1 = group1 - currentgroup2 = group2 - ELSE - If Not (group2 = currentgroup2) - newPage = TRUE - currentgroup2 = group2 - End If - End If - Return newPage -End Function - =User!Language - true - Invalid - 33d566bc-8b9e-434c-a911-4a72eee9beca - - - - - PostedPmtOrd_No_ - - - PostedPmtOrd__No__ - - - STRSUBSTNO_Text1100001_CopyText_ - - - CompanyAddr_1_ - - - CompanyAddr_2_ - - - CompanyAddr_3_ - - - CompanyAddr_4_ - - - CompanyAddr_5_ - - - CompanyAddr_6_ - - - CompanyInfo__Phone_No__ - - - CompanyInfo__Fax_No__ - - - CompanyInfo__VAT_Registration_No__ - - - PostedPmtOrd__Posting_Date_ - - - BankAccAddr_4_ - - - BankAccAddr_5_ - - - BankAccAddr_6_ - - - BankAccAddr_7_ - - - BankAccAddr_3_ - - - BankAccAddr_2_ - - - BankAccAddr_1_ - - - PostedPmtOrd__Currency_Code_ - - - PrintAmountsInLCY - - - OutputNo - - - PageLoop_Number - - - PostedPmtOrd__No__Caption - - - CompanyInfo__Phone_No__Caption - - - CompanyInfo__Fax_No__Caption - - - CompanyInfo__VAT_Registration_No__Caption - - - PostedPmtOrd__Posting_Date_Caption - - - PostedPmtOrd__Currency_Code_Caption - - - PageCaption - - - AmtForCollection - - - AmtForCollectionFormat - - - AmtForCollection_Control32 - - - AmtForCollection_Control32Format - - - Vendor_City - - - Vendor_County - - - Vendor__Post_Code_ - - - Vendor_Name - - - PostedDoc__Account_No__ - - - PostedDoc__Honored_Rejtd__at_Date_ - - - PostedDoc_Status - - - PostedDoc__Document_No__ - - - PostedDoc__Document_Type_ - - - PostedDoc__Due_Date_ - - - Vendor_Name_Control28 - - - Vendor_City_Control30 - - - AmtForCollection_Control31 - - - AmtForCollection_Control31Format - - - Vendor_County_Control35 - - - PostedDoc__Document_No___Control3 - - - PostedDoc__No__ - - - Vendor__Post_Code__Control9 - - - PostedDoc_Status_Control78 - - - PostedDoc__Honored_Rejtd__at_Date__Control80 - - - PostedDoc__Due_Date__Control8 - - - PostedDoc__Account_No___Control1 - - - PostedDoc__Document_Type__Control23 - - - AmtForCollection_Control36 - - - AmtForCollection_Control36Format - - - AmtForCollection_Control39 - - - AmtForCollection_Control39Format - - - PostedDoc_Type - - - PostedDoc_Entry_No_ - - - PostedDoc_Bill_Gr__Pmt__Order_No_ - - - All_amounts_are_in_LCYCaption - - - Document_No_Caption - - - Bill_No_Caption - - - Vendor_Name_Control28Caption - - - Vendor__Post_Code__Control9Caption - - - Vendor_City_Control30Caption - - - AmtForCollection_Control31Caption - - - Vendor_County_Control35Caption - - - PostedDoc_Status_Control78Caption - - - PostedDoc__Honored_Rejtd__at_Date__Control80Caption - - - PostedDoc__Due_Date__Control8Caption - - - PostedDoc__Account_No___Control1Caption - - - PostedDoc__Document_Type__Control23Caption - - - ContinuedCaption - - - EmptyStringCaption - - - ContinuedCaption_Control15 - - - TotalCaption - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrders.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrders.Page.al deleted file mode 100644 index 21cfb641705..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrders.Page.al +++ /dev/null @@ -1,252 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Navigate; -using Microsoft.Purchases.Payables; - -page 7000054 "Posted Payment Orders" -{ - Caption = 'Posted Payment Orders'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - PageType = Document; - RefreshOnActivate = true; - SourceTable = "Posted Payment Order"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("No."; Rec."No.") - { - ApplicationArea = All; - Editable = false; - ToolTip = 'Specifies the number of this posted payment order.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number or code of the bank where the posted payment order was delivered.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the name associated with the bank code or bank number where the posted payment order was delivered.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - Importance = Promoted; - ToolTip = 'Specifies the payment order posting date.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code associated with this posted payment order.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this posted payment order.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; - } - field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the grouped amount for this posted payment order.'; - } - field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the pending amounts yet to be paid for the documents associated with this posted payment order.'; - } - } - part(Docs; "Docs. in Posted PO Subform") - { - ApplicationArea = Basic, Suite; - SubPageLink = "Bill Gr./Pmt. Order No." = field("No."); - SubPageView = sorting("Bill Gr./Pmt. Order No.") - where(Type = const(Payable)); - } - group(Expenses) - { - Caption = 'Expenses'; - field("Payment Order Expenses Amt."; Rec."Payment Order Expenses Amt.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the amount to be paid for payable document expenses.'; - } - } - group(Auditing) - { - Caption = 'Auditing'; - field("Reason Code"; Rec."Reason Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; - } - field("No. Printed"; Rec."No. Printed") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of printed copies of this posted payment order.'; - } - } - } - area(factboxes) - { - part(Control1901420407; "Post. PO Analysis LCY Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1903433407; "Post. PO Analysis Non LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Pmt. O&rd.") - { - Caption = 'Pmt. O&rd.'; - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."), - Type = const(Payable); - ToolTip = 'View or create a comment.'; - } - separator(Action20) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Enabled = true; - Image = "Report"; - RunObject = Page "Post. Payment Orders Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action58) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Enabled = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - PostedPmtOrd.Copy(Rec); - PostedPmtOrd.SetRecFilter(); - REPORT.Run(REPORT::"Posted Payment Order Listing", true, false, PostedPmtOrd); - end; - end; - } - } - } - area(processing) - { - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Enabled = true; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - var - begin - Navigate.SetDoc(Rec."Posting Date", Rec."No."); - Navigate.Run(); - end; - } - action("Page Posted Payment Orders Maturity Process") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Payment Orders Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Posted Payment Orders Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Navigate_Promoted"; "&Navigate") - { - } - actionref("Page Posted Payment Orders Maturity Process_Promoted"; "Page Posted Payment Orders Maturity Process") - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - PostedPmtOrd: Record "Posted Payment Order"; - Navigate: Page Navigate; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersList.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersList.Page.al deleted file mode 100644 index 118d7e1150f..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersList.Page.al +++ /dev/null @@ -1,185 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000055 "Posted Payment Orders List" -{ - ApplicationArea = Basic, Suite; - Caption = 'Posted Payment Orders'; - CardPageID = "Posted Payment Orders"; - Editable = false; - PageType = List; - RefreshOnActivate = true; - SourceTable = "Posted Payment Order"; - UsageCategory = Lists; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of this posted payment order.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank where the posted payment order was delivered.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name associated with the bank code or bank number where the posted payment order was delivered.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code associated with this posted payment order.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the sum total of the documents included in this posted payment order.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount of all of the documents included in this posted payment order.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; - } - field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amounts yet to be paid for the documents associated with this posted payment order.'; - } - } - } - area(factboxes) - { - part(Control1901420407; "Post. PO Analysis LCY Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1903433407; "Post. PO Analysis Non LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Pmt. O&rd.") - { - Caption = 'Pmt. O&rd.'; - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."), - Type = filter(Payable); - ToolTip = 'View or create a comment.'; - } - separator(Action21) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - RunObject = Page "Post. Payment Orders Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action24) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - PostedPmtOrd.Copy(Rec); - PostedPmtOrd.SetRecFilter(); - REPORT.Run(REPORT::"Posted Payment Order Listing", true, false, PostedPmtOrd); - end; - end; - } - } - } - area(processing) - { - action("Page Posted Payment Orders Maturity Process") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Payment Orders Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Posted Payment Orders Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("Page Posted Payment Orders Maturity Process_Promoted"; "Page Posted Payment Orders Maturity Process") - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - PostedPmtOrd: Record "Posted Payment Order"; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersMaturity.Page.al deleted file mode 100644 index ccd65ff352d..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersMaturity.Page.al +++ /dev/null @@ -1,188 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -page 7000057 "Posted Payment Orders Maturity" -{ - Caption = 'Posted Payment Orders Maturity'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - PageType = List; - SaveValues = true; - SourceTable = "Posted Payment Order"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("Category Filter"; Rec."Category Filter") - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - } - group(Options) - { - Caption = 'Options'; - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View by'; - OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - if PeriodType = PeriodType::Period then - PeriodPeriodTypeOnValidate(); - if PeriodType = PeriodType::Year then - YearPeriodTypeOnValidate(); - if PeriodType = PeriodType::Quarter then - QuarterPeriodTypeOnValidate(); - if PeriodType = PeriodType::Month then - MonthPeriodTypeOnValidate(); - if PeriodType = PeriodType::Week then - WeekPeriodTypeOnValidate(); - if PeriodType = PeriodType::Day then - DayPeriodTypeOnValidate(); - end; - } - field(AmountType; AmountType) - { - ApplicationArea = Basic, Suite; - Caption = 'View as'; - OptionCaption = 'Net Change,Balance at Date'; - ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; - - trigger OnValidate() - begin - if AmountType = AmountType::"Balance at Date" then - BalanceatDateAmountTypeOnValid(); - if AmountType = AmountType::"Net Change" then - NetChangeAmountTypeOnValidate(); - end; - } - } - part(MaturityLines; "Post. Pmt. Ord. Maturity Lin.") - { - ApplicationArea = Basic, Suite; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateSubForm(); - end; - - trigger OnOpenPage() - begin - UpdateSubForm(); - end; - - var - PeriodType: Option Day,Week,Month,Quarter,Year,Period; - AmountType: Option "Net Change","Balance at Date"; - - local procedure UpdateSubForm() - begin - CurrPage.MaturityLines.PAGE.Set(Rec, PeriodType, AmountType); - end; - - local procedure DayPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure WeekPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure MonthPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure QuarterPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure YearPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure PeriodPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure BalanceatDateAmountTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure NetChangeAmountTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure DayPeriodTypeOnValidate() - begin - DayPeriodTypeOnPush(); - end; - - local procedure WeekPeriodTypeOnValidate() - begin - WeekPeriodTypeOnPush(); - end; - - local procedure MonthPeriodTypeOnValidate() - begin - MonthPeriodTypeOnPush(); - end; - - local procedure QuarterPeriodTypeOnValidate() - begin - QuarterPeriodTypeOnPush(); - end; - - local procedure YearPeriodTypeOnValidate() - begin - YearPeriodTypeOnPush(); - end; - - local procedure PeriodPeriodTypeOnValidate() - begin - PeriodPeriodTypeOnPush(); - end; - - local procedure NetChangeAmountTypeOnValidate() - begin - NetChangeAmountTypeOnPush(); - end; - - local procedure BalanceatDateAmountTypeOnValid() - begin - BalanceatDateAmountTypeOnPush(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersSelect.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersSelect.Page.al deleted file mode 100644 index bf05796fe30..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/History/PostedPaymentOrdersSelect.Page.al +++ /dev/null @@ -1,385 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.History; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Navigate; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.History; -using System.Text; - -page 7000065 "Posted Payment Orders Select." -{ - ApplicationArea = Basic, Suite; - Caption = 'Posted Payment Orders'; - DeleteAllowed = false; - Editable = true; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Worksheet; - Permissions = TableData "Posted Bill Group" = rm; - SaveValues = true; - SourceTable = "Posted Payment Order"; - UsageCategory = Tasks; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(DueDateFilter; DueDateFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Due Date Filter'; - ToolTip = 'Specifies a due date or a range of due dates that documents must contain to be included in the selection.'; - - trigger OnValidate() - begin - DueDateFilterOnAfterValidate(); - end; - } - field(BankAccFilter; BankAccFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Bank Account Filter'; - TableRelation = "Bank Account"."No."; - ToolTip = 'Specifies which bank accounts the values are shown for.'; - - trigger OnValidate() - begin - BankAccFilterOnAfterValidate(); - end; - } - field(CurrCodeFilter; CurrCodeFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Currency Code Filter'; - TableRelation = Currency; - ToolTip = 'Specifies the currencies that the data is included for.'; - - trigger OnValidate() - begin - CurrCodeFilterOnAfterValidate(); - end; - } - } - repeater(Control1) - { - Editable = false; - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of this posted payment order.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank where the posted payment order was delivered.'; - } - field("Posting Description"; Rec."Posting Description") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the posting description related to this posted payment order.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the payment order posting date.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this posted payment order.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amounts left to pay for documents that are part of this posted payment order.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code associated with this posted payment order.'; - } - field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this posted payment order.'; - } - field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the pending amounts yet to be paid for the documents associated with this posted payment order.'; - } - } - group(Control49) - { - ShowCaption = false; - field(CurrTotalAmount; CurrTotalAmountLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Total Rmg. Amt. (LCY)'; - Editable = false; - ToolTip = 'Specifies the sum of amounts that remain to be paid.'; - Visible = CurrTotalAmountVisible; - - trigger OnValidate() - begin - CurrTotalAmountLCYOnAfterValid(); - end; - } - } - } - area(factboxes) - { - part(Control1901420407; "Post. PO Analysis LCY Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1903433407; "Post. PO Analysis Non LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Pmt. O&rd.") - { - Caption = 'Pmt. O&rd.'; - action(Card) - { - ApplicationArea = Basic, Suite; - Caption = 'Card'; - Image = EditLines; - RunObject = Page "Posted Payment Orders"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Status Filter" = field("Status Filter"); - ShortCutKey = 'Shift+F7'; - ToolTip = 'View or change detailed information about the record that is being processed on the document or journal line.'; - } - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."); - ToolTip = 'View or create a comment.'; - } - separator(Action39) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - RunObject = Page "Post. Payment Orders Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action44) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - PostedPmtOrd.Copy(Rec); - PostedPmtOrd.SetRecFilter(); - REPORT.Run(REPORT::"Posted Payment Order Listing", true, false, PostedPmtOrd); - end; - end; - } - } - } - area(processing) - { - group("F&unctions") - { - Caption = 'F&unctions'; - Image = "Action"; - action(BatchSettlement) - { - ApplicationArea = Basic, Suite; - Caption = 'Batch &Settlement'; - Ellipsis = true; - Image = ApplyEntries; - ToolTip = 'Fully settle the documents that are included in the selected posted bill groups.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(PostedPmtOrd2); - if not PostedPmtOrd2.Find('=><') then - exit; - REPORT.RunModal(REPORT::"Batch Settl. Posted POs", true, false, PostedPmtOrd2); - UpdateStatistics(); - CurrPage.Update(false); - end; - } - } - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - Navigate.SetDoc(Rec."Posting Date", Rec."No."); - Navigate.Run(); - end; - } - action("Posted Payment Orders Maturity") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Payment Orders Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Posted Payment Orders Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref(BatchSettlement_Promoted; BatchSettlement) - { - } - actionref("&Navigate_Promoted"; "&Navigate") - { - } - actionref("Posted Payment Orders Maturity_Promoted"; "Posted Payment Orders Maturity") - { - } - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - trigger OnInit() - begin - CurrTotalAmountVisible := true; - end; - - trigger OnOpenPage() - begin - Rec.SetCurrentKey("Bank Account No.", "Posting Date", "Currency Code"); - CurrCodeFilter := Rec.GetFilter("Currency Code"); - BankAccFilter := Rec.GetFilter("Bank Account No."); - UpdateStatistics(); - end; - - var - PostedPmtOrd: Record "Posted Payment Order"; - PostedPmtOrd2: Record "Posted Payment Order"; - Navigate: Page Navigate; - CurrTotalAmountLCY: Decimal; - ShowCurrent: Boolean; - CurrCodeFilter: Code[250]; - BankAccFilter: Code[250]; - CurrTotalAmountVisible: Boolean; - DueDateFilter: Text[30]; - - procedure UpdateStatistics() - begin - PostedPmtOrd.Copy(Rec); - CurrTotalAmountLCY := 0; - UpdateStatistics2(PostedPmtOrd, CurrTotalAmountLCY, ShowCurrent); - CurrTotalAmountVisible := true; - end; - - procedure GetSelected(var NewPostedPmtOrd: Record "Posted Payment Order") - begin - CurrPage.SetSelectionFilter(NewPostedPmtOrd); - end; - - procedure UpdateStatistics2(var PostedPmtOrd2: Record "Posted Payment Order"; var CurrTotalAmount: Decimal; var ShowCurrent: Boolean) - begin - PostedPmtOrd2.SetCurrentKey("Bank Account No.", "Posting Date", "Currency Code"); - if PostedPmtOrd2.Find('-') then; - repeat - PostedPmtOrd2.CalcFields("Remaining Amount (LCY)"); - CurrTotalAmount := CurrTotalAmount + PostedPmtOrd2."Remaining Amount (LCY)"; - until PostedPmtOrd2.Next() = 0; - ShowCurrent := (CurrTotalAmount <> 0); - end; - - local procedure CurrTotalAmountLCYOnAfterValid() - begin - UpdateStatistics(); - end; - - local procedure CurrCodeFilterOnAfterValidate() - begin - Rec.SetFilter("Currency Code", CurrCodeFilter); - CurrPage.Update(false); - UpdateStatistics(); - end; - - local procedure BankAccFilterOnAfterValidate() - begin - Rec.SetFilter("Bank Account No.", BankAccFilter); - CurrPage.Update(false); - UpdateStatistics(); - end; - - local procedure DueDateFilterOnAfterValidate() - var - FilterTokens: Codeunit "Filter Tokens"; - begin - FilterTokens.MakeDateFilter(DueDateFilter); - Rec.SetFilter("Due Date Filter", DueDateFilter); - DueDateFilter := Rec.GetFilter("Due Date Filter"); - CurrPage.Update(false); - UpdateStatistics(); - Rec.SetFilter(Amount, '<>0'); - CurrPage.Update(false); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/BankCatPostPayBillsMatrix.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/BankCatPostPayBillsMatrix.Page.al deleted file mode 100644 index b91cbf2df34..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/BankCatPostPayBillsMatrix.Page.al +++ /dev/null @@ -1,515 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using System.Utilities; - -page 36850 "Bank Cat.Post.Pay.Bills Matrix" -{ - Caption = 'Bank Cat.Post.Pay.Bills Matrix'; - Editable = false; - PageType = List; - SourceTable = "Bank Account"; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of the posted payables bill. '; - } - field(Name; Rec.Name) - { - ApplicationArea = All; - ToolTip = 'Specifies if the name of the bill.'; - } - field(Field1; MATRIX_CellData[1]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[1]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(1); - end; - } - field(Field2; MATRIX_CellData[2]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[2]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(2); - end; - } - field(Field3; MATRIX_CellData[3]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[3]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(3); - end; - } - field(Field4; MATRIX_CellData[4]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[4]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(4); - end; - } - field(Field5; MATRIX_CellData[5]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[5]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(5); - end; - } - field(Field6; MATRIX_CellData[6]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[6]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(6); - end; - } - field(Field7; MATRIX_CellData[7]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[7]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(7); - end; - } - field(Field8; MATRIX_CellData[8]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[8]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(8); - end; - } - field(Field9; MATRIX_CellData[9]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[9]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(9); - end; - } - field(Field10; MATRIX_CellData[10]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[10]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(10); - end; - } - field(Field11; MATRIX_CellData[11]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[11]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(11); - end; - } - field(Field12; MATRIX_CellData[12]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[12]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(12); - end; - } - field(Field13; MATRIX_CellData[13]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[13]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(13); - end; - } - field(Field14; MATRIX_CellData[14]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[14]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(14); - end; - } - field(Field15; MATRIX_CellData[15]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[15]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(15); - end; - } - field(Field16; MATRIX_CellData[16]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[16]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(16); - end; - } - field(Field17; MATRIX_CellData[17]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[17]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(17); - end; - } - field(Field18; MATRIX_CellData[18]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[18]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(18); - end; - } - field(Field19; MATRIX_CellData[19]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[19]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(19); - end; - } - field(Field20; MATRIX_CellData[20]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[20]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(20); - end; - } - field(Field21; MATRIX_CellData[21]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[21]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(21); - end; - } - field(Field22; MATRIX_CellData[22]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[22]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(22); - end; - } - field(Field23; MATRIX_CellData[23]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[23]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(23); - end; - } - field(Field24; MATRIX_CellData[24]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[24]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(24); - end; - } - field(Field25; MATRIX_CellData[25]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[25]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(25); - end; - } - field(Field26; MATRIX_CellData[26]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[26]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(26); - end; - } - field(Field27; MATRIX_CellData[27]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[27]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(27); - end; - } - field(Field28; MATRIX_CellData[28]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[28]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(28); - end; - } - field(Field29; MATRIX_CellData[29]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[29]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(29); - end; - } - field(Field30; MATRIX_CellData[30]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[30]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(30); - end; - } - field(Field31; MATRIX_CellData[31]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[31]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(31); - end; - } - field(Field32; MATRIX_CellData[32]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[32]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(32); - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - var - MATRIX_CurrentColumnOrdinal: Integer; - MATRIX_NoOfColumns: Integer; - begin - MATRIX_CurrentColumnOrdinal := 1; - MATRIX_NoOfColumns := ArrayLen(MATRIX_CellData); - - while MATRIX_CurrentColumnOrdinal <= MATRIX_NoOfColumns do begin - MATRIX_OnAfterGetRecord(MATRIX_CurrentColumnOrdinal); - MATRIX_CurrentColumnOrdinal := MATRIX_CurrentColumnOrdinal + 1; - end; - end; - - var - CalcAmt: Decimal; - CategoryFilter: Code[250]; - StatusFilterOption: Option Open,Honored,Rejected,All; - MatrixRecords: array[32] of Record Date; - MATRIX_ColumnCaption: array[32] of Text[1024]; - MATRIX_CellData: array[32] of Decimal; - - local procedure SetDateFilter(ColumnID: Integer) - begin - if CategoryFilter = '' then - Rec.SetRange("Category Filter") - else - Rec.SetFilter("Category Filter", CategoryFilter); - if StatusFilterOption = StatusFilterOption::All then - Rec.SetFilter("Status Filter", '%1|%2|%3', - StatusFilterOption::Open, - StatusFilterOption::Honored, - StatusFilterOption::Rejected) - else - Rec.SetRange("Status Filter", StatusFilterOption); - - if MatrixRecords[ColumnID]."Period Start" = MatrixRecords[ColumnID]."Period End" then - Rec.SetRange("Due Date Filter", MatrixRecords[ColumnID]."Period Start") - else - Rec.SetRange("Due Date Filter", MatrixRecords[ColumnID]."Period Start", MatrixRecords[ColumnID]."Period End") - end; - - [Scope('OnPrem')] - procedure Load(MatrixColumns1: array[32] of Text[1024]; var MatrixRecords1: array[32] of Record Date; CategoryFilter1: Code[20]; StatusFilter: Text[30]) - begin - CopyArray(MATRIX_ColumnCaption, MatrixColumns1, 1); - CopyArray(MatrixRecords, MatrixRecords1, 1); - CategoryFilter := CategoryFilter1; - if Evaluate(StatusFilterOption, StatusFilter) then; - end; - - local procedure MATRIX_OnDrillDown(ColumnID: Integer) - var - PostedCarteraDoc: Record "Posted Cartera Doc."; - PostedBills: Page "Posted Bills"; - begin - SetDateFilter(ColumnID); - PostedCarteraDoc.SetRange("Document Type", PostedCarteraDoc."Document Type"::Bill); - PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Payable); - - if MatrixRecords[ColumnID]."Period Start" = MatrixRecords[ColumnID]."Period End" then - PostedCarteraDoc.SetRange("Due Date", MatrixRecords[ColumnID]."Period Start") - else - PostedCarteraDoc.SetRange("Due Date", MatrixRecords[ColumnID]."Period Start", MatrixRecords[ColumnID]."Period End"); - - PostedCarteraDoc.SetFilter("Category Code", CategoryFilter); - PostedCarteraDoc.SetRange(Status, StatusFilterOption); - PostedCarteraDoc.SetRange("Bank Account No.", Rec."No."); - PostedBills.SetTableView(PostedCarteraDoc); - PostedBills.RunModal(); - end; - - local procedure MATRIX_OnAfterGetRecord(ColumnID: Integer) - begin - SetDateFilter(ColumnID); - Rec.SetFilter("Category Filter", CategoryFilter); - if StatusFilterOption = StatusFilterOption::All then - Rec.SetFilter("Status Filter", '%1|%2|%3', - StatusFilterOption::Open, - StatusFilterOption::Honored, - StatusFilterOption::Rejected) - else - Rec.SetRange("Status Filter", StatusFilterOption); - Rec.CalcFields("Posted Pay. Bills Amt. (LCY)"); - CalcAmt := Rec."Posted Pay. Bills Amt. (LCY)"; - MATRIX_CellData[ColumnID] := Rec."Posted Pay. Bills Amt. (LCY)"; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/BankCatPostedPayableBills.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/BankCatPostedPayableBills.Page.al deleted file mode 100644 index 2d54d423fab..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/BankCatPostedPayableBills.Page.al +++ /dev/null @@ -1,165 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Analysis; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Foundation.Enums; -using System.Utilities; - -page 7000071 "Bank Cat. Posted Payable Bills" -{ - Caption = 'Bank Cat. Posted Payable Bills'; - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SaveValues = true; - SourceTable = "Bank Account"; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - } - field(StatusFilterOption; StatusFilterOption) - { - ApplicationArea = Basic, Suite; - Caption = 'Status Filter'; - OptionCaption = 'Open,Honored,Rejected,All'; - ToolTip = 'Specifies a filter for the status of bills that will be included.'; - } - } - group("Matrix Options") - { - Caption = 'Matrix Options'; - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View By'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - SetColumns(SetWanted::Initial); - end; - } - field(ColumnSet; ColumnSet) - { - ApplicationArea = Basic, Suite; - Caption = 'Column Set'; - Editable = false; - ToolTip = 'Specifies the column setting based on how you have selected to view the matrix.'; - } - } - } - } - - actions - { - area(processing) - { - action("&Show Matrix") - { - ApplicationArea = Basic, Suite; - Caption = '&Show Matrix'; - Image = ShowMatrix; - ToolTip = 'View the data overview according to the selected filters and options.'; - - trigger OnAction() - var - MatrixForm: Page "Bank Cat.Post.Pay.Bills Matrix"; - begin - StatusFilter := Format(StatusFilterOption, 0, ''); - MatrixForm.Load(MatrixColumnCaptions, MatrixRecords, CategoryFilter, StatusFilter); - MatrixForm.RunModal(); - end; - } - action("Next Set") - { - ApplicationArea = Basic, Suite; - Caption = 'Next Set'; - Image = NextSet; - ToolTip = 'Go to the next set of data.'; - - trigger OnAction() - begin - SetColumns(SetWanted::Next); - end; - } - action("Previous Set") - { - ApplicationArea = Basic, Suite; - Caption = 'Previous Set'; - Image = PreviousSet; - ToolTip = 'Go to the previous data set.'; - - trigger OnAction() - begin - SetColumns(SetWanted::Previous); - end; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Show Matrix_Promoted"; "&Show Matrix") - { - } - actionref("Next Set_Promoted"; "Next Set") - { - } - actionref("Previous Set_Promoted"; "Previous Set") - { - } - } - } - } - - trigger OnOpenPage() - begin - SetColumns(SetWanted::Initial); - if Rec.HasFilter then begin - CategoryFilter := Rec.GetFilter("Category Filter"); - StatusFilter := Rec.GetFilter("Status Filter"); - if Evaluate(StatusFilterOption, StatusFilter) then; - end; - end; - - var - MatrixRecords: array[32] of Record Date; - CategoryFilter: Code[20]; - StatusFilterOption: Option Open,Honored,Rejected,All; - PeriodType: Enum "Analysis Period Type"; - SetWanted: Option Initial,Previous,Same,Next; - MatrixColumnCaptions: array[32] of Text[1024]; - ColumnSet: Text[1024]; - PKFirstRecInCurrSet: Text[100]; - StatusFilter: Text[30]; - CurrSetLength: Integer; - - [Scope('OnPrem')] - procedure SetColumns(SetWanted: Option Initial,Previous,Same,Next) - var - MatrixMgt: Codeunit "Matrix Management"; - begin - MatrixMgt.GeneratePeriodMatrixData(SetWanted, 32, false, PeriodType, '', - PKFirstRecInCurrSet, MatrixColumnCaptions, ColumnSet, CurrSetLength, MatrixRecords); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/BatchSettlPostedPOs.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/BatchSettlPostedPOs.Report.al deleted file mode 100644 index 25d6deb207e..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/BatchSettlPostedPOs.Report.al +++ /dev/null @@ -1,517 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Finance.VAT.Ledger; -using Microsoft.Finance.VAT.Setup; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.History; -using Microsoft.Sales.Receivables; - -report 7000087 "Batch Settl. Posted POs" -{ - Caption = 'Batch Settl. Posted POs'; - Permissions = TableData "Cust. Ledger Entry" = imd, - TableData "Vendor Ledger Entry" = imd, - TableData "G/L Register" = m, - TableData "Posted Cartera Doc." = imd, - TableData "Closed Cartera Doc." = imd, - TableData "Posted Payment Order" = imd, - TableData "Closed Payment Order" = imd; - ProcessingOnly = true; - - dataset - { - dataitem(PostedPmtOrd; "Posted Payment Order") - { - DataItemTableView = sorting("No.") order(ascending); - dataitem(PostedDoc; "Posted Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where(Status = const(Open), Type = const(Payable)); - - trigger OnAfterGetRecord() - var - FromJnl: Boolean; - begin - IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("No."); - if "Document Type" = "Document Type"::Invoice then - ExistInvoice := true; - BankAcc.Get(PostedPmtOrd."Bank Account No."); - Delay := BankAcc."Delay for Notices"; - - if DueOnly and (PostingDate < "Due Date" + Delay) then - CurrReport.Skip(); - - TotalDocCount := TotalDocCount + 1; - DocCount := DocCount + 1; - - if not SupressWindows then begin - Window.Update(3, Round(DocCount / TotalDoc * 10000, 1)); - Window.Update(4, StrSubstNo('%1 %2', "Document Type", "Document No.")); - end; - - case "Document Type" of - "Document Type"::Invoice, "Document Type"::"Credit Memo": - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine."Document Date" := GenJnlLine."Document Date"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); - VendLedgEntry.Get(PostedDoc."Entry No."); - OnBeforeValidateInvoiceAccountNo(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, FromJnl, ExistsNoRealVAT); - GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine.Description := CopyStr( - StrSubstNo(Text1100004, PostedDoc."Document No."), - 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount"); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry, PostedPmtOrd); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - OnAfterInvoiceGenJnlLineInsert( - GenJnlLine, VendLedgEntry, PostedDoc, PostedPmtOrd, - FromJnl, ExistsNoRealVAT, ExistVATEntry, FirstVATEntryNo, LastVATEntryNo, NoRealVATBuffer); - GroupAmount := GroupAmount + "Remaining Amount"; - GroupAmountLCY := GroupAmountLCY + "Remaining Amt. (LCY)"; - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - VendLedgEntry.Modify(); - end; - "Document Type"::Bill: - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); - VendLedgEntry.Get(PostedDoc."Entry No."); - - if GLSetup."Unrealized VAT" then begin - FromJnl := false; - if PostedDoc."From Journal" then - FromJnl := true; - ExistsNoRealVAT := GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry, FromJnl); - end; - - GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); - GenJnlLine.Description := CopyStr( - StrSubstNo(Text1100005, PostedDoc."Document No.", PostedDoc."No."), - 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount"); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; - GenJnlLine."Posting Group" := VendLedgEntry."Vendor Posting Group"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry, PostedPmtOrd); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - if GLSetup."Unrealized VAT" and - ExistsNoRealVAT and - (not IsRedrawn) - then begin - VendLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - OnBeforeVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); - CarteraManagement.VendUnrealizedVAT2( - VendLedgEntry, - VendLedgEntry."Remaining Amt. (LCY)", - GenJnlLine, - ExistVATEntry, - FirstVATEntryNo, - LastVATEntryNo, - NoRealVATBuffer, - FromJnl, - "Document No."); - OnAfterVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); - - if NoRealVATBuffer.Find('-') then begin - repeat - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer.Account, - NoRealVATBuffer.Amount); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer."Balance Account", - -NoRealVATBuffer.Amount); - until NoRealVATBuffer.Next() = 0; - NoRealVATBuffer.DeleteAll(); - end; - end; - - GroupAmount := GroupAmount + "Remaining Amount"; - GroupAmountLCY := GroupAmountLCY + "Remaining Amt. (LCY)"; - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - VendLedgEntry.Modify(); - end; - end; - if BGPOPostBuffer.Get('', '', VendLedgEntry."Entry No.") then begin - BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; - BGPOPostBuffer.Modify(); - end else begin - BGPOPostBuffer.Init(); - BGPOPostBuffer."Entry No." := VendLedgEntry."Entry No."; - BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; - BGPOPostBuffer.Insert(); - end; - end; - - trigger OnPostDataItem() - var - VendLedgEntry2: Record "Vendor Ledger Entry"; - DimensionManagement: Codeunit DimensionManagement; - DimesionSetIds: array[10] of Integer; - begin - if (DocCount = 0) or (GroupAmount = 0) then - CurrReport.Skip(); - - VendLedgEntry2.Get(BGPOPostBuffer."Entry No."); - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); - GenJnlLine.Validate("Account No.", BankAcc."No."); - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedPmtOrd."No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedPmtOrd."Currency Code"); - GenJnlLine.Validate(Amount, -GroupAmount); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - DimesionSetIds[1] := GenJnlLine."Dimension Set ID"; - DimesionSetIds[2] := VendLedgEntry."Dimension Set ID"; - GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; - GenJnlLine.Validate("Dimension Set ID", DimensionManagement.GetCombinedDimensionSetID(DimesionSetIds, VendLedgEntry."Global Dimension 1 Code", VendLedgEntry."Global Dimension 2 Code")); - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry2, PostedPmtOrd); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - - if PostedPmtOrd."Currency Code" <> '' then - if SumLCYAmt <> 0 then begin - Currency.SetFilter(Code, PostedPmtOrd."Currency Code"); - Currency.FindFirst(); - if SumLCYAmt > 0 then begin - Currency.TestField("Residual Gains Account"); - Acct := Currency."Residual Gains Account"; - end else begin - Currency.TestField("Residual Losses Account"); - Acct := Currency."Residual Losses Account"; - end; - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); - GenJnlLine.Validate("Account No.", Acct); - GenJnlLine.Description := Text1100010; - GenJnlLine.Validate("Currency Code", ''); - GenJnlLine.Validate(Amount, -SumLCYAmt); - DimesionSetIds[1] := GenJnlLine."Dimension Set ID"; - DimesionSetIds[2] := VendLedgEntry."Dimension Set ID"; - GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; - GenJnlLine.Validate("Dimension Set ID", DimensionManagement.GetCombinedDimensionSetID(DimesionSetIds, VendLedgEntry."Global Dimension 1 Code", VendLedgEntry."Global Dimension 2 Code")); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry2, PostedPmtOrd); - GenJnlLine.Insert(); - end; - - DocPost.PostSettlement(GenJnlLine); - GenJnlLine.DeleteAll(); - - DocPost.ClosePmtOrdIfEmpty(PostedPmtOrd, PostingDate); - - if (Counter > 1) and GLSetup."Unrealized VAT" and - ExistVATEntry and ExistInvoice - then begin - if VATEntry.FindLast() then - ToVATEntryNo := VATEntry."Entry No."; - GLReg.FindLast(); - GLReg."From VAT Entry No." := FromVATEntryNo; - GLReg."To VAT Entry No." := ToVATEntryNo; - GLReg.Modify(); - end else - if ExistVATEntry then begin - GLReg.FindLast(); - GLReg."From VAT Entry No." := FirstVATEntryNo; - GLReg."To VAT Entry No." := LastVATEntryNo; - GLReg.Modify(); - end; - end; - - trigger OnPreDataItem() - begin - SumLCYAmt := 0; - GenJnlLineNextNo := 0; - TotalDoc := Count; - DocCount := 0; - ExistInvoice := false; - Counter := Count; - if (Counter > 1) and GLSetup."Unrealized VAT" then begin - VATEntry.LockTable(); - if VATEntry.FindLast() then - FromVATEntryNo := VATEntry."Entry No." + 1; - end; - - FirstVATEntryNo := 0; - LastVATEntryNo := 0; - end; - } - - trigger OnAfterGetRecord() - begin - PmtOrdCount := PmtOrdCount + 1; - - if not SupressWindows then begin - Window.Update(1, Round(PmtOrdCount / TotalPmtOrd * 10000, 1)); - Window.Update(2, StrSubstNo('%1', "No.")); - Window.Update(3, 0); - end; - - GroupAmount := 0; - end; - - trigger OnPostDataItem() - begin - Window.Close(); - - Commit(); - - if not SupressWindows then - Message( - Text1100003, - TotalDocCount, PmtOrdCount, GroupAmountLCY); - end; - - trigger OnPreDataItem() - begin - DocPost.CheckPostingDate(PostingDate); - - SourceCodeSetup.Get(); - SourceCode := SourceCodeSetup."Cartera Journal"; - - GroupAmountLCY := 0; - PmtOrdCount := 0; - DocCount := 0; - TotalDocCount := 0; - TotalPmtOrd := Count; - ExistVATEntry := false; - - if not SupressWindows then - Window.Open( - Text1100000 + - Text1100001 + - Text1100002); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(PostingDate; PostingDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Posting Date'; - NotBlank = true; - ToolTip = 'Specifies the posting date.'; - } - field(DueOnly; DueOnly) - { - ApplicationArea = Basic, Suite; - Caption = 'Due bills only'; - ToolTip = 'Specifies if you want to only include documents that have become overdue. If it does not matter if a document is overdue at the time of settlement, leave this field blank.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - trigger OnInitReport() - begin - PostingDate := WorkDate(); - end; - - trigger OnPreReport() - begin - GLSetup.Get(); - end; - - var - Text1100000: Label 'Settling @1@@@@@@@@@@@@@@@@@@@@@@@\\'; - Text1100001: Label 'Payment Order No. #2###### @3@@@@@@@@@@@@@\'; - Text1100002: Label 'Payable document #4######'; - Text1100003: Label '%1 Documents in %2 Payment Orders totaling %3 (LCY) have been settled.'; - Text1100004: Label 'Payable document settlement %1'; - Text1100005: Label 'Payable bill settlement %1/%2'; - Text1100009: Label 'Payment order settlement %1'; - Text1100010: Label 'Residual adjust generated by rounding Amount'; - Text1100011: Label 'Payable document settlement %1/%2'; - SourceCodeSetup: Record "Source Code Setup"; - GenJnlLine: Record "Gen. Journal Line" temporary; - VendLedgEntry: Record "Vendor Ledger Entry"; - BankAcc: Record "Bank Account"; - Currency: Record Currency; - GLReg: Record "G/L Register"; - GLSetup: Record "General Ledger Setup"; - VATPostingSetup: Record "VAT Posting Setup"; - VATEntry: Record "VAT Entry"; - DocPost: Codeunit "Document-Post"; - CarteraManagement: Codeunit CarteraManagement; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - Window: Dialog; - PostingDate: Date; - DueOnly: Boolean; - SupressWindows: Boolean; - Delay: Decimal; - SourceCode: Code[10]; - Acct: Code[20]; - DocCount: Integer; - TotalDocCount: Integer; - GroupAmount: Decimal; - GroupAmountLCY: Decimal; - GenJnlLineNextNo: Integer; - SumLCYAmt: Decimal; - PmtOrdCount: Integer; - TotalPmtOrd: Integer; - TotalDoc: Integer; - ExistVATEntry: Boolean; - FirstVATEntryNo: Integer; - LastVATEntryNo: Integer; - IsRedrawn: Boolean; - ExistInvoice: Boolean; - FromVATEntryNo: Integer; - ToVATEntryNo: Integer; - Counter: Integer; - BGPOPostBuffer: Record "BG/PO Post. Buffer" temporary; - NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; - ExistsNoRealVAT: Boolean; - - local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal) - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Account Type" := AccType; - GenJnlLine."Account No." := AccNo; - if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then - GenJnlLine.Description := CopyStr( - StrSubstNo(Text1100011, PostedDoc."Document No.", PostedDoc."No."), - 1, MaxStrLen(GenJnlLine.Description)) - else - GenJnlLine.Description := CopyStr( - StrSubstNo(Text1100011, PostedDoc."Document No.", PostedDoc."No."), - 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, -Amount2); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := ''; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, VendLedgEntry, PostedPmtOrd); - GenJnlLine.Insert(); - end; - - procedure SetPostingDate(NewPostingDate: Date) - begin - PostingDate := NewPostingDate; - end; - - procedure SetSupressWindows(NewSupressWindows: Boolean) - begin - SupressWindows := NewSupressWindows; - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterInvoiceGenJnlLineInsert(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeGenJournalLineInsert(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var VendorLedgerEntry2: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeValidateInvoiceAccountNo(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/CarteraPayablesStatisticsFB.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/CarteraPayablesStatisticsFB.Page.al deleted file mode 100644 index 9649ec98ded..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/CarteraPayablesStatisticsFB.Page.al +++ /dev/null @@ -1,214 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Purchases.Vendor; - -page 35305 "Cartera Payables Statistics FB" -{ - Caption = 'Cartera Payables Statistics FB'; - Editable = false; - PageType = CardPart; - SourceTable = Vendor; - - layout - { - area(content) - { - group("No. of Documents") - { - Caption = 'No. of Documents'; - field("NoOpen[1]"; NoOpen[1]) - { - ApplicationArea = Basic, Suite; - Caption = 'Open Documents'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - } - field("NoOpen[2]"; NoOpen[2]) - { - ApplicationArea = Basic, Suite; - Caption = 'Open Docs. in Payment Order'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - } - field("NoOpen[3]"; NoOpen[3]) - { - ApplicationArea = Basic, Suite; - Caption = 'Open Docs. in Posted Payment Order'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - } - field("NoHonored[3]"; NoHonored[3]) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored Docs. in Posted Payment Order'; - Editable = false; - ToolTip = 'Specifies settled payments.'; - } - } - group("Remaining Amt. (LCY)") - { - Caption = 'Remaining Amt. (LCY)'; - field("OpenRemainingAmtLCY[1]"; OpenRemainingAmtLCY[1]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open Documents'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - - trigger OnDrillDown() - begin - DrillDownOpen(4); // Cartera - end; - } - field("OpenRemainingAmtLCY[2]"; OpenRemainingAmtLCY[2]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open Docs. in Payment Order'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - - trigger OnDrillDown() - begin - DrillDownOpen(3); // Payment Order - end; - } - field("OpenRemainingAmtLCY[3]"; OpenRemainingAmtLCY[3]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open Docs. in Posted Payment Order'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - - trigger OnDrillDown() - begin - DrillDownOpen(1); // Posted Payment Order - end; - } - field("HonoredRemainingAmtLCY[3]"; HonoredRemainingAmtLCY[3]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Honored Docs. in Posted Payment Order'; - Editable = false; - ToolTip = 'Specifies settled payments.'; - - trigger OnDrillDown() - begin - DrillDownHonored(1); // Posted Payment Order - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateBillStatistics(); - end; - - var - j: Integer; - NoOpen: array[3] of Integer; - NoHonored: array[3] of Integer; - OpenAmtLCY: array[3] of Decimal; - OpenRemainingAmtLCY: array[3] of Decimal; - HonoredAmtLCY: array[3] of Decimal; - HonoredRemainingAmtLCY: array[3] of Decimal; - DocumentSituationFilter: array[3] of Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; - - [Scope('OnPrem')] - procedure UpdateBillStatistics() - var - VendLedgEntry: Record "Vendor Ledger Entry"; - begin - DocumentSituationFilter[1] := DocumentSituationFilter::Cartera; - DocumentSituationFilter[2] := DocumentSituationFilter::"BG/PO"; - DocumentSituationFilter[3] := DocumentSituationFilter::"Posted BG/PO"; - - VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); - VendLedgEntry.SetRange("Vendor No.", Rec."No."); - for j := 1 to 3 do begin - VendLedgEntry.SetRange("Document Situation", DocumentSituationFilter[j]); - VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Open); - VendLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - OpenAmtLCY[j] := VendLedgEntry."Amount (LCY) stats."; - OpenRemainingAmtLCY[j] := VendLedgEntry."Remaining Amount (LCY) stats."; - NoOpen[j] := VendLedgEntry.Count; - VendLedgEntry.SetRange("Document Status"); - - VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Honored); - VendLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - HonoredAmtLCY[j] := VendLedgEntry."Amount (LCY) stats."; - HonoredRemainingAmtLCY[j] := VendLedgEntry."Remaining Amount (LCY) stats."; - NoHonored[j] := VendLedgEntry.Count; - VendLedgEntry.SetRange("Document Status"); - - VendLedgEntry.SetRange("Document Situation"); - end; - end; - - [Scope('OnPrem')] - procedure DrillDownOpen(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents") - var - VendLedgEntry: Record "Vendor Ledger Entry"; - VendLedgEntriesForm: Page "Vendor Ledger Entries"; - begin - VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); - VendLedgEntry.SetRange("Vendor No.", Rec."No."); - case Situation of - Situation::Cartera: - VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"Posted BG/PO"); - end; - VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Open); - VendLedgEntriesForm.SetTableView(VendLedgEntry); - VendLedgEntriesForm.SetRecord(VendLedgEntry); - VendLedgEntriesForm.RunModal(); - VendLedgEntry.SetRange("Document Status"); - VendLedgEntry.SetRange("Document Situation"); - end; - - [Scope('OnPrem')] - procedure DrillDownHonored(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents") - var - VendLedgEntry: Record "Vendor Ledger Entry"; - VendLedgEntriesForm: Page "Vendor Ledger Entries"; - begin - VendLedgEntry.SetCurrentKey("Vendor No.", "Document Type", "Document Situation", "Document Status"); - VendLedgEntry.SetRange("Vendor No.", Rec."No."); - case Situation of - Situation::Cartera: - VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - VendLedgEntry.SetRange("Document Situation", VendLedgEntry."Document Situation"::"Posted BG/PO"); - end; - - VendLedgEntry.SetRange("Document Status", VendLedgEntry."Document Status"::Honored); - VendLedgEntriesForm.SetTableView(VendLedgEntry); - VendLedgEntriesForm.SetRecord(VendLedgEntry); - VendLedgEntriesForm.RunModal(); - VendLedgEntry.SetRange("Document Status"); - VendLedgEntry.SetRange("Document Situation"); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPOAnalysisLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPOAnalysisLCYFB.Page.al deleted file mode 100644 index e00d533870d..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPOAnalysisLCYFB.Page.al +++ /dev/null @@ -1,126 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 35301 "Closed PO Analysis LCY FB" -{ - Caption = 'Closed PO Analysis LCY FB'; - DataCaptionExpression = Rec.Caption(); - Editable = false; - PageType = CardPart; - SourceTable = "Closed Payment Order"; - - layout - { - area(content) - { - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code in which the payment order was generated.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this closed payment order.'; - } - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - group("Amount (LCY)") - { - Caption = 'Amount (LCY)'; - field(Honored; HonoredAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(Rejected; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - ClosedDoc: Record "Closed Cartera Doc."; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); - ClosedDoc.SetRange(Type, ClosedDoc.Type::Payable); - ClosedDoc.SetRange("Collection Agent", ClosedDoc."Collection Agent"::Bank); - ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Global Dimension 1 Filter", ClosedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", ClosedDoc."Global Dimension 2 Code"); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); - ClosedDoc.SetRange(Redrawn, true); - ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := ClosedDoc."Amount for Collection"; - RedrawnAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; - NoRedrawn := ClosedDoc.Count; - - ClosedDoc.SetRange(Redrawn, false); - ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := ClosedDoc."Amount for Collection"; - HonoredAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; - NoHonored := ClosedDoc.Count; - ClosedDoc.SetRange(Redrawn); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); - ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RejectedAmt := ClosedDoc."Amount for Collection"; - RejectedAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; - NoRejected := ClosedDoc.Count; - ClosedDoc.SetRange(Status); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPOAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPOAnalysisNonLCYFB.Page.al deleted file mode 100644 index d67f89caa96..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPOAnalysisNonLCYFB.Page.al +++ /dev/null @@ -1,126 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 35302 "Closed PO Analysis Non LCY FB" -{ - Caption = 'Closed PO Analysis Non LCY FB'; - DataCaptionExpression = Rec.Caption(); - Editable = false; - PageType = CardPart; - SourceTable = "Closed Payment Order"; - - layout - { - area(content) - { - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code in which the payment order was generated.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this closed payment order.'; - } - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - group(Amount) - { - Caption = 'Amount'; - field(Honored; HonoredAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(Rejected; RedrawnAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - ClosedDoc: Record "Closed Cartera Doc."; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); - ClosedDoc.SetRange(Type, ClosedDoc.Type::Payable); - ClosedDoc.SetRange("Collection Agent", ClosedDoc."Collection Agent"::Bank); - ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Global Dimension 1 Filter", ClosedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", ClosedDoc."Global Dimension 2 Code"); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); - ClosedDoc.SetRange(Redrawn, true); - ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := ClosedDoc."Amount for Collection"; - RedrawnAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; - NoRedrawn := ClosedDoc.Count; - - ClosedDoc.SetRange(Redrawn, false); - ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := ClosedDoc."Amount for Collection"; - HonoredAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; - NoHonored := ClosedDoc.Count; - ClosedDoc.SetRange(Redrawn); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); - ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RejectedAmt := ClosedDoc."Amount for Collection"; - RejectedAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; - NoRejected := ClosedDoc.Count; - ClosedDoc.SetRange(Status); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrder.Table.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrder.Table.al deleted file mode 100644 index d57fe71ec0a..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrder.Table.al +++ /dev/null @@ -1,180 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -table 7000022 "Closed Payment Order" -{ - Caption = 'Closed Payment Order'; - DrillDownPageID = "Closed Payment Orders List"; - LookupPageID = "Closed Payment Orders List"; - DataClassification = CustomerContent; - - fields - { - field(2; "No."; Code[20]) - { - Caption = 'No.'; - } - field(3; "Bank Account No."; Code[20]) - { - Caption = 'Bank Account No.'; - TableRelation = "Bank Account"; - } - field(4; "Bank Account Name"; Text[100]) - { - CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); - Caption = 'Bank Account Name'; - Editable = false; - FieldClass = FlowField; - } - field(5; "Posting Description"; Text[100]) - { - Caption = 'Posting Description'; - } - field(8; "Reason Code"; Code[10]) - { - Caption = 'Reason Code'; - TableRelation = "Reason Code"; - } - field(9; "No. Printed"; Integer) - { - Caption = 'No. Printed'; - } - field(10; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(11; Comment; Boolean) - { - CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), - Type = filter(Payable))); - Caption = 'Comment'; - Editable = false; - FieldClass = FlowField; - } - field(14; "Global Dimension 1 Filter"; Code[20]) - { - CaptionClass = '1,3,1'; - Caption = 'Global Dimension 1 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(15; "Global Dimension 2 Filter"; Code[20]) - { - CaptionClass = '1,3,2'; - Caption = 'Global Dimension 2 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(16; "Amount Grouped"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - Type = const(Payable))); - Caption = 'Amount Grouped'; - Editable = false; - FieldClass = FlowField; - } - field(18; "Status Filter"; Enum "Cartera Document Status") - { - Caption = 'Status Filter'; - Editable = false; - FieldClass = FlowFilter; - } - field(20; "Closing Date"; Date) - { - Caption = 'Closing Date'; - } - field(29; "Payment Order Expenses Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Payment Order Expenses Amt.'; - } - field(33; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - Editable = false; - TableRelation = Currency; - } - field(35; "Amount Grouped (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Closed Cartera Doc."."Amt. for Collection (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - Type = const(Payable))); - Caption = 'Amount Grouped (LCY)'; - Editable = false; - FieldClass = FlowField; - } - } - - keys - { - key(Key1; "No.") - { - Clustered = true; - } - key(Key2; "Bank Account No.", "Posting Date") - { - SumIndexFields = "Payment Order Expenses Amt."; - } - } - - fieldgroups - { - } - - trigger OnDelete() - begin - ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", "No."); - ClosedDoc.DeleteAll(); - - BGPOCommentLine.SetRange("BG/PO No.", "No."); - BGPOCommentLine.DeleteAll(); - end; - - var - Text1100000: Label 'untitled'; - ClosedPmtOrd: Record "Closed Payment Order"; - ClosedDoc: Record "Closed Cartera Doc."; - BGPOCommentLine: Record "BG/PO Comment Line"; - - [Scope('OnPrem')] - procedure PrintRecords(ShowRequestForm: Boolean) - var - CarteraReportSelection: Record "Cartera Report Selections"; - begin - ClosedPmtOrd.Copy(Rec); - CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Closed Payment Order"); - CarteraReportSelection.SetFilter("Report ID", '<>0'); - CarteraReportSelection.Find('-'); - repeat - REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, ClosedPmtOrd); - until CarteraReportSelection.Next() = 0; - end; - - procedure Caption(): Text - begin - if "No." = '' then - exit(Text1100000); - CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrderListing.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrderListing.Report.al deleted file mode 100644 index a02fb696348..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrderListing.Report.al +++ /dev/null @@ -1,415 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Foundation.Company; -using Microsoft.Purchases.Vendor; -using System.Utilities; - -report 7000012 "Closed Payment Order Listing" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Purchases/Payables/ClosedPaymentOrderListing.rdlc'; - ApplicationArea = Basic, Suite; - Caption = 'Closed Payment Order Listing'; - Permissions = TableData "Closed Payment Order" = r; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem(ClosedPmtOrd; "Closed Payment Order") - { - DataItemTableView = sorting("No."); - PrintOnlyIfDetail = true; - RequestFilterFields = "No."; - column(ClosedPmtOrd_No_; "No.") - { - } - dataitem(CopyLoop; "Integer") - { - DataItemTableView = sorting(Number); - dataitem(PageLoop; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(ClosedPmtOrd__No__; ClosedPmtOrd."No.") - { - } - column(STRSUBSTNO_Text1100001_CopyText_; StrSubstNo(Text1100001, CopyText)) - { - } - column(CompanyAddr_1_; CompanyAddr[1]) - { - } - column(CompanyAddr_2_; CompanyAddr[2]) - { - } - column(CompanyAddr_3_; CompanyAddr[3]) - { - } - column(CompanyAddr_4_; CompanyAddr[4]) - { - } - column(CompanyAddr_5_; CompanyAddr[5]) - { - } - column(CompanyAddr_6_; CompanyAddr[6]) - { - } - column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") - { - } - column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") - { - } - column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") - { - } - column(ClosedPmtOrd__Posting_Date_; Format(ClosedPmtOrd."Posting Date")) - { - } - column(BankAccAddr_4_; BankAccAddr[4]) - { - } - column(BankAccAddr_5_; BankAccAddr[5]) - { - } - column(BankAccAddr_6_; BankAccAddr[6]) - { - } - column(BankAccAddr_7_; BankAccAddr[7]) - { - } - column(BankAccAddr_3_; BankAccAddr[3]) - { - } - column(BankAccAddr_2_; BankAccAddr[2]) - { - } - column(BankAccAddr_1_; BankAccAddr[1]) - { - } - column(ClosedPmtOrd__Currency_Code_; ClosedPmtOrd."Currency Code") - { - } - column(PrintAmountsInLCY; PrintAmountsInLCY) - { - } - column(OutputNo; OutputNo) - { - } - column(PageLoop_Number; Number) - { - } - column(ClosedPmtOrd__No__Caption; ClosedPmtOrd__No__CaptionLbl) - { - } - column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) - { - } - column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) - { - } - column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) - { - } - column(ClosedPmtOrd__Posting_Date_Caption; ClosedPmtOrd__Posting_Date_CaptionLbl) - { - } - column(ClosedPmtOrd__Currency_Code_Caption; ClosedPmtOrd__Currency_Code_CaptionLbl) - { - } - column(PageCaption; PageCaptionLbl) - { - } - dataitem(ClosedDoc; "Closed Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = ClosedPmtOrd; - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Payable)); - column(AmtForCollection; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(AmtForCollection_Control32; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Vendor_City; Vendor.City) - { - } - column(Vendor_County; Vendor.County) - { - } - column(Vendor__Post_Code_; Vendor."Post Code") - { - } - column(Vendor_Name; Vendor.Name) - { - } - column(ClosedDoc__Account_No__; "Account No.") - { - } - column(ClosedDoc__Honored_Rejtd__at_Date_; Format("Honored/Rejtd. at Date")) - { - } - column(ClosedDoc_Status; Status) - { - } - column(ClosedDoc__Document_No__; "Document No.") - { - } - column(ClosedDoc__Document_Type_; "Document Type") - { - } - column(ClosedDoc__Due_Date_; Format("Due Date")) - { - } - column(Vendor_Name_Control28; Vendor.Name) - { - } - column(Vendor_City_Control30; Vendor.City) - { - } - column(AmtForCollection_Control31; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Vendor_County_Control35; Vendor.County) - { - } - column(ClosedDoc__Document_No___Control3; "Document No.") - { - } - column(ClosedDoc__No__; "No.") - { - } - column(Vendor__Post_Code__Control9; Vendor."Post Code") - { - } - column(ClosedDoc_Status_Control78; Status) - { - } - column(ClosedDoc__Honored_Rejtd__at_Date__Control80; Format("Honored/Rejtd. at Date")) - { - } - column(ClosedDoc__Due_Date__Control8; Format("Due Date")) - { - } - column(ClosedDoc__Account_No___Control1; "Account No.") - { - } - column(ClosedDoc__Document_Type__Control23; "Document Type") - { - } - column(AmtForCollection_Control36; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(AmtForCollection_Control39; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(ClosedDoc_Type; Type) - { - } - column(ClosedDoc_Entry_No_; "Entry No.") - { - } - column(ClosedDoc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") - { - } - column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) - { - } - column(Document_No_Caption; Document_No_CaptionLbl) - { - } - column(Bill_No_Caption; Bill_No_CaptionLbl) - { - } - column(Vendor_Name_Control28Caption; Vendor_Name_Control28CaptionLbl) - { - } - column(Vendor__Post_Code__Control9Caption; Vendor__Post_Code__Control9CaptionLbl) - { - } - column(Vendor_City_Control30Caption; Vendor_City_Control30CaptionLbl) - { - } - column(AmtForCollection_Control31Caption; AmtForCollection_Control31CaptionLbl) - { - } - column(Vendor_County_Control35Caption; Vendor_County_Control35CaptionLbl) - { - } - column(ClosedDoc_Status_Control78Caption; FieldCaption(Status)) - { - } - column(ClosedDoc__Honored_Rejtd__at_Date__Control80Caption; ClosedDoc__Honored_Rejtd__at_Date__Control80CaptionLbl) - { - } - column(ClosedDoc__Due_Date__Control8Caption; ClosedDoc__Due_Date__Control8CaptionLbl) - { - } - column(ClosedDoc__Account_No___Control1Caption; ClosedDoc__Account_No___Control1CaptionLbl) - { - } - column(ClosedDoc__Document_Type__Control23Caption; FieldCaption("Document Type")) - { - } - column(ContinuedCaption; ContinuedCaptionLbl) - { - } - column(EmptyStringCaption; EmptyStringCaptionLbl) - { - } - column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) - { - } - column(TotalCaption; TotalCaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - Vendor.Get("Account No."); - if PrintAmountsInLCY then - AmtForCollection := "Amt. for Collection (LCY)" - else - AmtForCollection := "Amount for Collection"; - end; - - trigger OnPreDataItem() - begin - Clear(AmtForCollection); - end; - } - } - - trigger OnAfterGetRecord() - begin - if Number > 1 then - CopyText := Text1100000; - OutputNo := OutputNo + 1; - end; - - trigger OnPreDataItem() - begin - NoOfLoops := Abs(NoOfCopies) + 1; - CopyText := ''; - SetRange(Number, 1, NoOfLoops); - - OutputNo := 1; - end; - } - - trigger OnAfterGetRecord() - begin - BankAcc.Get(ClosedPmtOrd."Bank Account No."); - FormatAddress.FormatAddr( - BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", - BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - FormatAddress.Company(CompanyAddr, CompanyInfo); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(NoOfCopies; NoOfCopies) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Copies'; - ToolTip = 'Specifies how many copies of the document to print.'; - } - field(PrintAmountsInLCY; PrintAmountsInLCY) - { - ApplicationArea = Basic, Suite; - Caption = 'Show amounts in LCY'; - ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - var - Text1100000: Label 'COPY'; - Text1100001: Label 'Payment Order %1'; - CompanyInfo: Record "Company Information"; - BankAcc: Record "Bank Account"; - Vendor: Record Vendor; - FormatAddress: Codeunit "Format Address"; - BankAccAddr: array[8] of Text[100]; - CompanyAddr: array[8] of Text[100]; - NoOfLoops: Integer; - NoOfCopies: Integer; - CopyText: Text[30]; - PrintAmountsInLCY: Boolean; - AmtForCollection: Decimal; - OutputNo: Integer; - ClosedPmtOrd__No__CaptionLbl: Label 'Payment Order No.'; - CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; - CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; - CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; - ClosedPmtOrd__Posting_Date_CaptionLbl: Label 'Date'; - ClosedPmtOrd__Currency_Code_CaptionLbl: Label 'Currency Code'; - PageCaptionLbl: Label 'Page'; - All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; - Document_No_CaptionLbl: Label 'Document No.'; - Bill_No_CaptionLbl: Label 'Bill No.'; - Vendor_Name_Control28CaptionLbl: Label 'Name'; - Vendor__Post_Code__Control9CaptionLbl: Label 'Post Code'; - Vendor_City_Control30CaptionLbl: Label 'City /'; - AmtForCollection_Control31CaptionLbl: Label 'Amount for Collection'; - Vendor_County_Control35CaptionLbl: Label 'County'; - ClosedDoc__Honored_Rejtd__at_Date__Control80CaptionLbl: Label 'Honored/Rejtd. at Date'; - ClosedDoc__Due_Date__Control8CaptionLbl: Label 'Due Date'; - ClosedDoc__Account_No___Control1CaptionLbl: Label 'Vendor No.'; - ContinuedCaptionLbl: Label 'Continued'; - EmptyStringCaptionLbl: Label '/', Locked = true; - ContinuedCaption_Control15Lbl: Label 'Continued'; - TotalCaptionLbl: Label 'Total'; - - [Scope('OnPrem')] - procedure GetCurrencyCode(): Code[10] - begin - if PrintAmountsInLCY then - exit(''); - - exit(ClosedDoc."Currency Code"); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrderListing.rdlc b/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrderListing.rdlc deleted file mode 100644 index e8dda64ec0e..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrderListing.rdlc +++ /dev/null @@ -1,2550 +0,0 @@ - - - 0 - - - - SQL - - - None - a1b4307e-92c2-4bcb-9fb5-b68fdfb6ddbc - - - - - - - - - - - 18.48333cm - - - - - 12.4126cm - - - - - - - - - - 1.4cm - - - 1.3cm - - - 1.25cm - - - 0.3cm - - - 0.7cm - - - 0.4cm - - - 1.92646cm - - - 1.5cm - - - 3.3cm - - - 1.5cm - - - 2.7cm - - - 2cm - - - - - 0.423cm - - - - - true - true - - - - - =First(Fields!All_amounts_are_in_LCYCaption.Value) - - - - - - All_amounts_are_in_LCYCaption - 48 - - - 8 - - - - - - - - - - - - - true - true - - - - - - - - - - - textbox11 - 47 - - - 4 - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!ClosedDoc__Due_Date__Control8Caption.Value) - - - - - - - 46 - - - - - - - - true - - - - - =First(Fields!ClosedDoc__Document_Type__Control23Caption.Value) - - - - - - 45 - - - - - - - - true - - - - - =First(Fields!Document_No_Caption.Value) - - - - - - - 44 - - - - - - - - true - true - - - - - - - - - - - - textbox2 - 43 - - - - - - - - true - - - - - =First(Fields!Bill_No_Caption.Value) - - - - - - - 42 - - - - - - - - true - - - - - =First(Fields!ClosedDoc_Status_Control78Caption.Value) - - - - - - 41 - - - - - - - - true - - - - - =First(Fields!ClosedDoc__Honored_Rejtd__at_Date__Control80Caption.Value) - - - - - - - 40 - - - - - - - - true - - - - - =First(Fields!ClosedDoc__Account_No___Control1Caption.Value) - - - - - - - 39 - - - - - - - - true - - - - - =First(Fields!Vendor_Name_Control28Caption.Value) - - - - - - 38 - - - - - - - - true - - - - - =First(Fields!Vendor__Post_Code__Control9Caption.Value) - - - - - - 37 - - - - - - - - true - - - - - =First(Fields!Vendor_City_Control30Caption.Value) + Chr(10) + First(Fields!Vendor_County_Control35Caption.Value) - - - - - - 36 - - - - - - - - true - - - - - =First(Fields!AmtForCollection_Control31Caption.Value) - - - - - - - 35 - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - 12 - - - - - - - - - - - - - - - - - 0.425cm - - - - - true - - - - - =Fields!ClosedDoc__Due_Date_.Value - - - - - - 33 - - - - - - - - true - - - - - =Fields!ClosedDoc__Document_Type_.Value - - - - - - 32 - - - - - - - - true - - - - - =Fields!ClosedDoc__Document_No__.Value - - - - - - - 31 - - - - - - - - true - true - - - - - - - - - textbox3 - 30 - - - - - - - - true - true - - - - - - - - - - - - - true - - - - - =Fields!ClosedDoc_Status.Value - - - - - - 28 - - - - - - - - true - - - - - =Fields!ClosedDoc__Honored_Rejtd__at_Date_.Value - - - - - - 27 - - - - - - - - true - - - - - =Fields!ClosedDoc__Account_No__.Value - - - - - - - 26 - - - - - - - - true - - - - - =Fields!Vendor_Name.Value - - - - - - 25 - - - - - - - - true - - - - - =Fields!Vendor__Post_Code_.Value - - - - - - - 24 - - - - - - - - true - - - - - =Fields!Vendor_City.Value - - - - - - 23 - - - - - - - - true - true - - - - - =Fields!AmtForCollection.Value - - - - - - 22 - - - - - - - - 0.425cm - - - - - true - - - - - - - - 10 - - - - - - - - - - - - - - - true - - - - - =Fields!Vendor_County.Value - - - - - - 20 - - - - - - - - true - - - - - - - - - - - - - 0.425cm - - - - - true - - - - - =Fields!ClosedDoc__Due_Date_.Value - - - - - - 18 - - - - - - - - true - - - - - =Fields!ClosedDoc__Document_Type_.Value - - - - - - 17 - - - - - - - - true - - - - - =Fields!ClosedDoc__Document_No__.Value - - - - - - - 16 - - - - - - - - true - true - - - - - =Fields!EmptyStringCaption.Value - - - - - - - textbox5 - 15 - - - - - - - - true - - - - - =Fields!ClosedDoc__No__.Value - - - - - - 14 - - - - - - - - true - - - - - =Fields!ClosedDoc_Status.Value - - - - - - 13 - - - - - - - - true - - - - - =Fields!ClosedDoc__Honored_Rejtd__at_Date_.Value - - - - - - 12 - - - - - - - - true - - - - - =Fields!ClosedDoc__Account_No__.Value - - - - - - - 11 - - - - - - - - true - - - - - =Fields!Vendor_Name.Value - - - - - - 10 - - - - - - - - true - - - - - =Fields!Vendor__Post_Code_.Value - - - - - - - 9 - - - - - - - - true - - - - - =Fields!Vendor_City.Value - - - - - - 8 - - - - - - - - true - true - - - - - =Fields!AmtForCollection.Value - - - - - - 7 - - - - - - - - 0.425cm - - - - - true - - - - - - - - 10 - - - - - - - - - - - - - - - true - - - - - =Fields!Vendor_County.Value - - - - - - 1 - - - - - - - - true - - - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - 12 - - - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =First(Fields!TotalCaption.Value) - - - - - - 6 - - - 5 - - - - - - - - - - true - true - - - - - - - - - - - textbox62 - 5 - - - 6 - - - - - - - - - - - true - true - - - - - =Sum(Fields!AmtForCollection.Value) - - - - - - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =IIF(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) - - After - true - true - - - After - true - true - - - - - =1 - - - - - - - =Fields!ClosedPmtOrd__No__.Value - =Fields!OutputNo.Value - - - - - After - true - - - - Detail - - - - - =IIF(Fields!ClosedDoc__Document_Type_.Value="Bill",TRUE,FALSE) - - - - - =IIF(Fields!ClosedDoc__Document_Type_.Value="Bill",TRUE,FALSE) - - - - - =IIF(Fields!ClosedDoc__Document_Type_.Value="Bill",FALSE,TRUE) - - - - - =IIF(Fields!ClosedDoc__Document_Type_.Value="Bill",FALSE,TRUE) - - - - Detail_Collection - Output - true - - - - - Before - true - - - Before - true - - - - - - DataSet_Result - 8.1746cm - 7.19635in - 27 - - - true - - - - - =Fields!BankAccAddr_1_.Value - - - - - - 1.27152cm - 0.423cm - 5cm - 26 - - - - true - - - - - =Fields!ClosedPmtOrd__No__.Value - - - - - - - 5.50152cm - 15.23333cm - 0.423cm - 2.99048cm - 25 - - - - true - - - - - =Fields!STRSUBSTNO_Text1100001_CopyText_.Value - - - - - - 0.00252cm - 12.08333cm - 0.423cm - 6.3cm - 24 - - - - true - - - - - =Fields!CompanyAddr_1_.Value - - - - - - 1.27152cm - 12.08333cm - 0.423cm - 6.3cm - 23 - - - - true - - - - - =Fields!CompanyAddr_2_.Value - - - - - - 1.69452cm - 12.08333cm - 0.423cm - 6.3cm - 22 - - - - true - - - - - =Fields!CompanyAddr_3_.Value - - - - - - 2.11752cm - 12.08333cm - 0.423cm - 6.3cm - 21 - - - - true - - - - - =Fields!CompanyAddr_4_.Value - - - - - - 2.54052cm - 12.08333cm - 0.423cm - 6.3cm - 20 - - - - true - - - - - =Fields!CompanyAddr_5_.Value - - - - - - 2.96352cm - 12.08333cm - 0.423cm - 6.3cm - 19 - - - - true - - - - - =Fields!CompanyAddr_6_.Value - - - - - - 3.38652cm - 12.08333cm - 0.423cm - 6.3cm - 18 - - - - true - - - - - =Fields!CompanyInfo__Phone_No__.Value - - - - - - 3.80952cm - 14.18333cm - 0.423cm - 17 - - - - true - - - - - =Fields!CompanyInfo__Fax_No__.Value - - - - - - 4.23252cm - 14.18333cm - 0.423cm - 16 - - - - true - - - - - =Fields!CompanyInfo__VAT_Registration_No__.Value - - - - - - 4.65552cm - 14.18333cm - 0.423cm - 15 - - - - true - - - - - =Fields!ClosedPmtOrd__Posting_Date_.Value - - - - - - - 7.19352cm - 15.2381cm - 0.423cm - 3.1746cm - 14 - - - - true - - - - - =Fields!BankAccAddr_4_.Value - - - - - - 2.54052cm - 0.423cm - 5cm - 13 - - - - true - - - - - =Fields!BankAccAddr_5_.Value - - - - - - 2.96352cm - 0.423cm - 5cm - 12 - - - - true - - - - - =Fields!BankAccAddr_6_.Value - - - - - - 3.38652cm - 0.423cm - 5cm - 11 - - - - true - - - - - =Fields!BankAccAddr_7_.Value - - - - - - 3.80952cm - 0.423cm - 5cm - 10 - - - - true - - - - - =Fields!BankAccAddr_3_.Value - - - - - - 2.11752cm - 0.423cm - 5cm - 9 - - - - true - - - - - =Fields!BankAccAddr_2_.Value - - - - - - 1.69452cm - 0.423cm - 5cm - 8 - - - - true - - - - - =Fields!ClosedPmtOrd__Currency_Code_.Value - - - - - - - 5.92452cm - 15.23333cm - 0.423cm - 2.99048cm - 6 - - - - true - - - - - =Fields!ClosedPmtOrd__No__Caption.Value - - - - - - 5.50152cm - 12.08333cm - 0.423cm - 3cm - 5 - - - - true - - - - - =Fields!CompanyInfo__Phone_No__Caption.Value - - - - - - 3.80952cm - 12.08333cm - 0.423cm - 1.89cm - 4 - - - - true - - - - - =Fields!CompanyInfo__Fax_No__Caption.Value - - - - - - 4.23252cm - 12.08333cm - 0.423cm - 1.89cm - 3 - - - - true - - - - - =Fields!CompanyInfo__VAT_Registration_No__Caption.Value - - - - - - 4.65552cm - 12.08333cm - 0.423cm - 1.89cm - 2 - - - - true - - - - - =Fields!ClosedPmtOrd__Posting_Date_Caption.Value - - - - - - 7.19352cm - 12.0881cm - 0.423cm - 3cm - 1 - - - - true - - - - - =Fields!ClosedPmtOrd__Currency_Code_Caption.Value - - - - - - 5.92452cm - 12.08333cm - 0.423cm - 3cm - - - - true - - - - - - - - - - - - - - - - - - =Fields!ClosedPmtOrd__No__.Value - =Fields!OutputNo.Value - - - Between - - - Output - true - - - - DataSet_Result - - End - - - - 12.4126cm - - 18.48333cm - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - =User!Language - true - Invalid - e2b18bbb-fc6a-4bc8-bfba-cae4d91c5aec - - - - - ClosedPmtOrd_No_ - - - ClosedPmtOrd__No__ - - - STRSUBSTNO_Text1100001_CopyText_ - - - CompanyAddr_1_ - - - CompanyAddr_2_ - - - CompanyAddr_3_ - - - CompanyAddr_4_ - - - CompanyAddr_5_ - - - CompanyAddr_6_ - - - CompanyInfo__Phone_No__ - - - CompanyInfo__Fax_No__ - - - CompanyInfo__VAT_Registration_No__ - - - ClosedPmtOrd__Posting_Date_ - - - BankAccAddr_4_ - - - BankAccAddr_5_ - - - BankAccAddr_6_ - - - BankAccAddr_7_ - - - BankAccAddr_3_ - - - BankAccAddr_2_ - - - BankAccAddr_1_ - - - ClosedPmtOrd__Currency_Code_ - - - PrintAmountsInLCY - - - OutputNo - - - PageLoop_Number - - - ClosedPmtOrd__No__Caption - - - CompanyInfo__Phone_No__Caption - - - CompanyInfo__Fax_No__Caption - - - CompanyInfo__VAT_Registration_No__Caption - - - ClosedPmtOrd__Posting_Date_Caption - - - ClosedPmtOrd__Currency_Code_Caption - - - PageCaption - - - AmtForCollection - - - AmtForCollectionFormat - - - AmtForCollection_Control32 - - - AmtForCollection_Control32Format - - - Vendor_City - - - Vendor_County - - - Vendor__Post_Code_ - - - Vendor_Name - - - ClosedDoc__Account_No__ - - - ClosedDoc__Honored_Rejtd__at_Date_ - - - ClosedDoc_Status - - - ClosedDoc__Document_No__ - - - ClosedDoc__Document_Type_ - - - ClosedDoc__Due_Date_ - - - Vendor_Name_Control28 - - - Vendor_City_Control30 - - - AmtForCollection_Control31 - - - AmtForCollection_Control31Format - - - Vendor_County_Control35 - - - ClosedDoc__Document_No___Control3 - - - ClosedDoc__No__ - - - Vendor__Post_Code__Control9 - - - ClosedDoc_Status_Control78 - - - ClosedDoc__Honored_Rejtd__at_Date__Control80 - - - ClosedDoc__Due_Date__Control8 - - - ClosedDoc__Account_No___Control1 - - - ClosedDoc__Document_Type__Control23 - - - AmtForCollection_Control36 - - - AmtForCollection_Control36Format - - - AmtForCollection_Control39 - - - AmtForCollection_Control39Format - - - ClosedDoc_Type - - - ClosedDoc_Entry_No_ - - - ClosedDoc_Bill_Gr__Pmt__Order_No_ - - - All_amounts_are_in_LCYCaption - - - Document_No_Caption - - - Bill_No_Caption - - - Vendor_Name_Control28Caption - - - Vendor__Post_Code__Control9Caption - - - Vendor_City_Control30Caption - - - AmtForCollection_Control31Caption - - - Vendor_County_Control35Caption - - - ClosedDoc_Status_Control78Caption - - - ClosedDoc__Honored_Rejtd__at_Date__Control80Caption - - - ClosedDoc__Due_Date__Control8Caption - - - ClosedDoc__Account_No___Control1Caption - - - ClosedDoc__Document_Type__Control23Caption - - - ContinuedCaption - - - EmptyStringCaption - - - ContinuedCaption_Control15 - - - TotalCaption - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrders.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrders.Page.al deleted file mode 100644 index d5abdcb7c45..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrders.Page.al +++ /dev/null @@ -1,234 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Navigate; - -page 7000060 "Closed Payment Orders" -{ - Caption = 'Closed Payment Orders'; - DataCaptionExpression = Rec.Caption(); - InsertAllowed = false; - PageType = Document; - RefreshOnActivate = true; - SourceTable = "Closed Payment Order"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("No."; Rec."No.") - { - ApplicationArea = All; - Editable = false; - ToolTip = 'Specifies the number related to this closed payment order.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number or code of the bank where this closed payment order was delivered.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the name associated with the bank code or bank number where the closed payment order was delivered.'; - } - field("Closing Date"; Rec."Closing Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the closing date for this closed payment order.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code in which the payment order was generated.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this closed payment order.'; - } - field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Importance = Promoted; - ToolTip = 'Specifies the grouped amount for this closed payment order.'; - } - } - part(Docs; "Docs. in Closed PO Subform") - { - ApplicationArea = Basic, Suite; - SubPageLink = Type = const(Payable), - "Collection Agent" = const(Bank), - "Bill Gr./Pmt. Order No." = field("No."); - SubPageView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); - } - group(Expenses) - { - Caption = 'Expenses'; - field("Payment Order Expenses Amt."; Rec."Payment Order Expenses Amt.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the amount of payable document expenses for this closed payment order.'; - } - } - group(Auditing) - { - Caption = 'Auditing'; - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - Importance = Promoted; - ToolTip = 'Specifies when this closed payment order was posted.'; - } - field("Reason Code"; Rec."Reason Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; - } - field("No. Printed"; Rec."No. Printed") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of printed copies of this closed payment order.'; - } - } - } - area(factboxes) - { - part(Control1903433507; "Closed PO Analysis LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1903433207; "Closed PO Analysis Non LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Pmt. O&rd.") - { - Caption = 'Pmt. O&rd.'; - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."), - Type = const(Payable); - ToolTip = 'View or create a comment.'; - } - separator(Action25) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Enabled = true; - Image = "Report"; - RunObject = Page "Closed Pmt. Ord. Analysis"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action45) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Enabled = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - ClosedPmtOrd.Copy(Rec); - ClosedPmtOrd.SetRecFilter(); - REPORT.Run(REPORT::"Closed Payment Order Listing", true, false, ClosedPmtOrd); - end; - end; - } - } - } - area(processing) - { - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Enabled = true; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - var - begin - Navigate.SetDoc(Rec."Posting Date", Rec."No."); - Navigate.Run(); - end; - } - } - area(reporting) - { - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Navigate_Promoted"; "&Navigate") - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - ClosedPmtOrd: Record "Closed Payment Order"; - Navigate: Page Navigate; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrdersList.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrdersList.Page.al deleted file mode 100644 index c67af25b3d0..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPaymentOrdersList.Page.al +++ /dev/null @@ -1,154 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000061 "Closed Payment Orders List" -{ - ApplicationArea = Basic, Suite; - Caption = 'Closed Payment Orders'; - CardPageID = "Closed Payment Orders"; - Editable = false; - PageType = List; - SourceTable = "Closed Payment Order"; - UsageCategory = Lists; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number related to this closed payment order.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank where this closed payment order was delivered.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name associated with the bank code or bank number where the closed payment order was delivered.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code in which the payment order was generated.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this closed payment order.'; - } - field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - ToolTip = 'Specifies the grouped amount for this closed payment order.'; - } - } - } - area(factboxes) - { - part(Control1903433507; "Closed PO Analysis LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1903433207; "Closed PO Analysis Non LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Pmt. O&rd.") - { - Caption = 'Pmt. O&rd.'; - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."), - Type = filter(Payable); - ToolTip = 'View or create a comment.'; - } - separator(Action17) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - RunObject = Page "Closed Pmt. Ord. Analysis"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action19) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - ClosedPmtOrd.Copy(Rec); - ClosedPmtOrd.SetRecFilter(); - REPORT.Run(REPORT::"Closed Payment Order Listing", true, false, ClosedPmtOrd); - end; - end; - } - } - } - area(reporting) - { - } - area(Promoted) - { - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - ClosedPmtOrd: Record "Closed Payment Order"; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPmtOrdAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPmtOrdAnalysis.Page.al deleted file mode 100644 index 3419d2df429..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/ClosedPmtOrdAnalysis.Page.al +++ /dev/null @@ -1,148 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000062 "Closed Pmt. Ord. Analysis" -{ - Caption = 'Closed Pmt. Ord. Analysis'; - DataCaptionExpression = Rec.Caption(); - Editable = false; - PageType = Card; - SourceTable = "Closed Payment Order"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code in which the payment order was generated.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount for this closed payment order.'; - } - } - group(Control1100000) - { - ShowCaption = false; - fixed(Control1905470101) - { - ShowCaption = false; - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - group(Amount) - { - Caption = 'Amount'; - field(Honored; HonoredAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Editable = false; - } - field(Rejected; RedrawnAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Editable = false; - } - } - group("Amount (LCY)") - { - Caption = 'Amount (LCY)'; - field(Honored2; HonoredAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(Rejected2; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - } - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - ClosedDoc: Record "Closed Cartera Doc."; - HonoredAmt: Decimal; - RedrawnAmt: Decimal; - HonoredAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoHonored: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - ClosedDoc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn); - ClosedDoc.SetRange(Type, ClosedDoc.Type::Payable); - ClosedDoc.SetRange("Collection Agent", ClosedDoc."Collection Agent"::Bank); - ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Global Dimension 1 Filter", ClosedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", ClosedDoc."Global Dimension 2 Code"); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Honored); - ClosedDoc.SetRange(Redrawn, true); - ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := ClosedDoc."Amount for Collection"; - RedrawnAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; - NoRedrawn := ClosedDoc.Count; - - ClosedDoc.SetRange(Redrawn, false); - ClosedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := ClosedDoc."Amount for Collection"; - HonoredAmtLCY := ClosedDoc."Amt. for Collection (LCY)"; - NoHonored := ClosedDoc.Count; - ClosedDoc.SetRange(Redrawn); - - ClosedDoc.SetRange(Status); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinClosedPOSubform.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinClosedPOSubform.Page.al deleted file mode 100644 index 9ed3f13261b..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinClosedPOSubform.Page.al +++ /dev/null @@ -1,212 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000077 "Docs. in Closed PO Subform" -{ - Caption = 'Lines'; - Editable = false; - PageType = ListPart; - SourceTable = "Closed Cartera Doc."; - SourceTableView = where("Bill Gr./Pmt. Order No." = filter(<> ''), - Type = const(Payable)); - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date this closed document was created and posted.'; - Visible = false; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this closed document.'; - } - field(Status; Rec.Status) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the status of the closed document.'; - } - field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date of payment or rejection of this closed document.'; - Visible = false; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the payment method code defined for the document number.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the document that is the source of this closed document.'; - } - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of the closed bill.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the description associated with this closed document.'; - } - field("Original Amount"; Rec."Original Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the initial amount of this closed document.'; - } - field("Original Amount (LCY)"; Rec."Original Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the initial amount of this document, in LCY.'; - Visible = false; - } - field("Amount for Collection"; Rec."Amount for Collection") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount for which this closed document was originally drawn.'; - } - field("Amt. for Collection (LCY)"; Rec."Amt. for Collection (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount for which this closed document was originally sent.'; - Visible = false; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for this closed document to be fully applied.'; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding, in order for this closed document to be fully settled.'; - Visible = false; - } - field(Redrawn; Rec.Redrawn) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if this document, which has come due and is now rejected, has been recirculated.'; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - Visible = false; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the account number of the customer/vendor associated with this closed document.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the ledger entry number associated with the posting of this closed document.'; - } - } - } - } - - actions - { - area(processing) - { - group("&Docs.") - { - Caption = '&Docs.'; - action(Redraw) - { - ApplicationArea = Basic, Suite; - Caption = 'Redraw'; - Ellipsis = true; - Image = RefreshVoucher; - ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; - - trigger OnAction() - begin - RedrawDoc(); - end; - } - action("Dime&nsions") - { - ApplicationArea = Basic, Suite; - Caption = 'Dime&nsions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - action(Navigate) - { - ApplicationArea = Basic, Suite; - Image = Navigate; - - trigger OnAction() - begin - NavigateDoc(); - end; - } - } - } - } - - var - Text1100000: Label 'Only bills can be redrawn.'; - ClosedDoc: Record "Closed Cartera Doc."; - VendLedgEntry: Record "Vendor Ledger Entry"; - CarteraManagement: Codeunit CarteraManagement; - - [Scope('OnPrem')] - procedure NavigateDoc() - begin - CarteraManagement.NavigateClosedDoc(Rec); - end; - - local procedure RedrawDoc() - begin - CurrPage.SetSelectionFilter(ClosedDoc); - if not ClosedDoc.Find('=><') then - exit; - - ClosedDoc.SetFilter("Document Type", '<>%1', ClosedDoc."Document Type"::Bill); - if ClosedDoc.Find('-') then - Error(Text1100000); - ClosedDoc.SetRange("Document Type"); - - VendLedgEntry.Reset(); - repeat - VendLedgEntry.Get(ClosedDoc."Entry No."); - VendLedgEntry.Mark(true); - until ClosedDoc.Next() = 0; - - VendLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Redraw Payable Bills", true, false, VendLedgEntry); - CurrPage.Update(false); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinPOSubform.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinPOSubform.Page.al deleted file mode 100644 index 4a9ec2a880a..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinPOSubform.Page.al +++ /dev/null @@ -1,273 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000075 "Docs. in PO Subform" -{ - Caption = 'Lines'; - DeleteAllowed = false; - InsertAllowed = false; - PageType = ListPart; - Permissions = TableData "Cartera Doc." = m; - SourceTable = "Cartera Doc."; - SourceTableView = where(Type = const(Payable), - "Bill Gr./Pmt. Order No." = filter(<> '')); - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the when the creation of this document was posted.'; - Visible = false; - } - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this document.'; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the payment method code defined for the document number.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of the document used to generate this document.'; - } - field("No."; Rec."No.") - { - ApplicationArea = All; - Editable = false; - ToolTip = 'Specifies the number associated with a specific bill.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the description associated with this document.'; - } - field("Original Amount"; Rec."Original Amount") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the initial amount of this document.'; - Visible = false; - } - field("Original Amount (LCY)"; Rec."Original Amount (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the initial amount of this document, in LCY.'; - Visible = false; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending payment amount for the document to be settled in full.'; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending amount, in order for the document to be settled in full.'; - Visible = false; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - Visible = false; - } - field("Category Code"; Rec."Category Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a category code for this document.'; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the account number of the customer/vendor associated with this document.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the ledger entry number associated with the posting of this document.'; - } - } - } - } - - actions - { - area(processing) - { - group("&Docs.") - { - Caption = '&Docs.'; - action(Insert) - { - ApplicationArea = Basic, Suite; - Caption = 'Insert'; - Ellipsis = true; - ToolTip = 'Insert a bill group or payment order.'; - - trigger OnAction() - begin - AddPayableDocs(Rec."Bill Gr./Pmt. Order No."); - end; - } - action(Remove) - { - ApplicationArea = Basic, Suite; - Caption = 'Remove'; - Image = Cancel; - ToolTip = 'Remove the selected documents.'; - - trigger OnAction() - begin - RemoveDocs(Rec."Bill Gr./Pmt. Order No."); - end; - } - action("Dime&nsions") - { - ApplicationArea = Basic, Suite; - Caption = 'Dime&nsions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - action(Categorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Categorize'; - Ellipsis = true; - Enabled = true; - Image = Category; - ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; - - trigger OnAction() - begin - CategorizeDocs(); - end; - } - action(Decategorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Decategorize'; - Enabled = true; - Image = UndoCategory; - ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; - - trigger OnAction() - begin - DecategorizeDocs(); - end; - } - action(Navigate) - { - ApplicationArea = Basic, Suite; - Image = Navigate; - - trigger OnAction() - begin - NavigateDoc(); - end; - } - } - } - } - - trigger OnModifyRecord(): Boolean - begin - CODEUNIT.Run(CODEUNIT::"Document-Edit", Rec); - exit(false); - end; - - var - Doc: Record "Cartera Doc."; - CarteraManagement: Codeunit CarteraManagement; - - [Scope('OnPrem')] - procedure CategorizeDocs() - begin - CurrPage.SetSelectionFilter(Doc); - CarteraManagement.CategorizeDocs(Doc); - end; - - [Scope('OnPrem')] - procedure DecategorizeDocs() - begin - CurrPage.SetSelectionFilter(Doc); - CarteraManagement.DecategorizeDocs(Doc); - end; - - [Scope('OnPrem')] - procedure AddPayableDocs(BGPONo: Code[20]) - var - PaymentOrder: Record "Payment Order"; - begin - Doc.Copy(Rec); - if PaymentOrder.Get(BGPONo) then - PaymentOrder.TestField("Elect. Pmts Exported", false); - CarteraManagement.InsertPayableDocs(Doc); - end; - - [Scope('OnPrem')] - procedure RemoveDocs(BGPONo: Code[20]) - var - PaymentOrder: Record "Payment Order"; - IsHandled: Boolean; - begin - IsHandled := false; - OnBeforeRemoveDocs(Rec, BGPONo, Doc, CarteraManagement, IsHandled); - if IsHandled then - exit; - - Doc.Copy(Rec); - CurrPage.SetSelectionFilter(Doc); - if PaymentOrder.Get(BGPONo) then - PaymentOrder.TestField("Elect. Pmts Exported", false); - CarteraManagement.RemovePayableDocs(Doc); - end; - - [Scope('OnPrem')] - procedure NavigateDoc() - begin - CarteraManagement.NavigateDoc(Rec); - end; - - [IntegrationEvent(true, false)] - local procedure OnBeforeRemoveDocs(var Rec: Record "Cartera Doc."; var BGPONo: Code[20]; var Doc: Record "Cartera Doc."; var CarteraManagement: Codeunit CarteraManagement; var IsHandled: Boolean) - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinPostedPOSubform.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinPostedPOSubform.Page.al deleted file mode 100644 index 6e53216cb31..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/DocsinPostedPOSubform.Page.al +++ /dev/null @@ -1,369 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000076 "Docs. in Posted PO Subform" -{ - Caption = 'Lines'; - DeleteAllowed = false; - InsertAllowed = false; - PageType = ListPart; - SourceTable = "Posted Cartera Doc."; - SourceTableView = where(Type = const(Payable)); - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the date when the creation of this document was posted.'; - Visible = false; - } - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the due date of this document in a posted bill group/payment order.'; - } - field(Status; Rec.Status) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the status of this document in a posted bill group/payment order.'; - } - field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the date when this document in a posted bill group/payment order is settled or rejected.'; - Visible = false; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the payment method code for the document number.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of the document in a posted bill group/payment order, from which this document was generated.'; - } - field("No."; Rec."No.") - { - ApplicationArea = All; - Editable = false; - ToolTip = 'Specifies the number of a bill in a posted bill group/payment order.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the description associated with this posted document.'; - } - field("Original Amount"; Rec."Original Amount") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the initial amount of this document in a posted bill group/payment order.'; - Visible = false; - } - field("Original Amt. (LCY)"; Rec."Original Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the initial amount of this document in a posted bill group/payment order.'; - Visible = false; - } - field("Amount for Collection"; Rec."Amount for Collection") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the amount for which this document in a posted bill group/payment order was created.'; - } - field("Amt. for Collection (LCY)"; Rec."Amt. for Collection (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the amount due for this document in a posted bill group/payment order.'; - Visible = false; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending amount for this document, in a posted bill group/payment order, to be settled in full.'; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending amount in order for this document, in a posted bill group/payment order, to be settled in full.'; - Visible = false; - } - field(Redrawn; Rec.Redrawn) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies a check mark to indicate that the bill has been redrawn since it was rejected when its due date arrived.'; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - Visible = false; - } - field("Category Code"; Rec."Category Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a filter for the categories for which documents are shown.'; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the account type associated with this document in a posted bill group/payment order.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the ledger entry number associated with this posted document.'; - } - } - } - } - - actions - { - area(processing) - { - group("&Docs.") - { - Caption = '&Docs.'; - action(Dimensions) - { - ApplicationArea = Basic, Suite; - Caption = 'Dime&nsions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - action(Categorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Categorize'; - Ellipsis = true; - Image = Category; - ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; - - trigger OnAction() - begin - CategorizeDocs(); - end; - } - action(Decategorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Decategorize'; - Image = UndoCategory; - ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; - - trigger OnAction() - begin - DecategorizeDocs(); - end; - } - group(Settle) - { - Caption = 'Settle'; - Enabled = true; - Image = SettleOpenTransactions; - action(TotalSettlement) - { - ApplicationArea = Basic, Suite; - Caption = 'Total Settlement'; - Ellipsis = true; - ToolTip = 'View posted documents that were settled fully.'; - - trigger OnAction() - begin - SettleDocs(); - end; - } - action(PartialSettlement) - { - ApplicationArea = Basic, Suite; - Caption = 'P&artial Settlement'; - Ellipsis = true; - ToolTip = 'View posted documents that were settled partially.'; - - trigger OnAction() - begin - PartialSettle(); - end; - } - } - action(Redraw) - { - ApplicationArea = Basic, Suite; - Caption = 'Redraw'; - Ellipsis = true; - Enabled = true; - Image = RefreshVoucher; - ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; - - trigger OnAction() - begin - RedrawDocs(); - end; - } - action(Navigate) - { - ApplicationArea = Basic, Suite; - Image = Navigate; - - trigger OnAction() - begin - NavigateDoc(); - end; - } - } - } - } - - trigger OnModifyRecord(): Boolean - begin - CODEUNIT.Run(CODEUNIT::"Posted Cartera Doc.- Edit", Rec); - exit(false); - end; - - var - Text1100000: Label 'No documents have been found that can be settled. \'; - Text1100001: Label 'Please check that at least one open document was selected.'; - Text1100004: Label 'No documents have been found that can be redrawn. \'; - Text1100005: Label 'Please check that at least one rejected or honored document was selected.'; - Text1100006: Label 'Only bills can be redrawn.'; - Text1100007: Label 'Please check that one open document was selected.'; - Text1100008: Label 'Only one open document can be selected'; - PostedDoc: Record "Posted Cartera Doc."; - VendLedgEntry: Record "Vendor Ledger Entry"; - CarteraManagement: Codeunit CarteraManagement; - - local procedure CategorizeDocs() - begin - CurrPage.SetSelectionFilter(PostedDoc); - CarteraManagement.CategorizePostedDocs(PostedDoc); - end; - - local procedure DecategorizeDocs() - begin - CurrPage.SetSelectionFilter(PostedDoc); - CarteraManagement.DecategorizePostedDocs(PostedDoc); - end; - - local procedure SettleDocs() - begin - CurrPage.SetSelectionFilter(PostedDoc); - if not PostedDoc.Find('=><') then - exit; - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - if not PostedDoc.Find('-') then - Error( - Text1100000 + - Text1100001); - - REPORT.RunModal(REPORT::"Settle Docs. in Posted PO", true, false, PostedDoc); - CurrPage.Update(false); - end; - - local procedure RedrawDocs() - begin - CurrPage.SetSelectionFilter(PostedDoc); - if not PostedDoc.Find('=><') then - exit; - - PostedDoc.SetFilter(Status, '<>%1', PostedDoc.Status::Open); - if not PostedDoc.Find('-') then - Error( - Text1100004 + - Text1100005); - - PostedDoc.SetFilter("Document Type", '<>%1', PostedDoc."Document Type"::Bill); - if PostedDoc.Find('-') then - Error(Text1100006); - PostedDoc.SetRange("Document Type"); - - VendLedgEntry.Reset(); - repeat - VendLedgEntry.Get(PostedDoc."Entry No."); - VendLedgEntry.Mark(true); - until PostedDoc.Next() = 0; - - VendLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Redraw Payable Bills", true, false, VendLedgEntry); - CurrPage.Update(false); - end; - - local procedure NavigateDoc() - begin - CarteraManagement.NavigatePostedDoc(Rec); - end; - - local procedure PartialSettle() - var - VendLedgEntry2: Record "Vendor Ledger Entry"; - PartialSettlePayable: Report "Partial Settl. - Payable"; - begin - CurrPage.SetSelectionFilter(PostedDoc); - if not PostedDoc.Find('=><') then - exit; - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - if not PostedDoc.Find('-') then - Error( - Text1100000 + - Text1100007); - if PostedDoc.Count > 1 then - Error(Text1100008); - - Clear(PartialSettlePayable); - VendLedgEntry2.Get(PostedDoc."Entry No."); - if (WorkDate() <= VendLedgEntry2."Pmt. Discount Date") and - (PostedDoc."Document Type" = PostedDoc."Document Type"::Invoice) - then - PartialSettlePayable.SetInitValue(PostedDoc."Remaining Amount" + VendLedgEntry2."Remaining Pmt. Disc. Possible", - PostedDoc."Currency Code", PostedDoc."Entry No.") - else - PartialSettlePayable.SetInitValue(PostedDoc."Remaining Amount", - PostedDoc."Currency Code", PostedDoc."Entry No."); - PartialSettlePayable.SetTableView(PostedDoc); - PartialSettlePayable.RunModal(); - CurrPage.Update(false); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.Codeunit.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.Codeunit.al deleted file mode 100644 index 9ea5fa8eaf0..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.Codeunit.al +++ /dev/null @@ -1,27 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.GeneralLedger.Journal; - -codeunit 7000060 "PO - Export N34.1" -{ - TableNo = "Gen. Journal Line"; - - trigger OnRun() - var - PaymentOrder: Record "Payment Order"; - begin - PaymentOrder.SetRange("No.", Rec.GetFilter("Document No.")); - if PaymentOrder.IsEmpty() then - Error(ExportPaymentErr); - Commit(); - REPORT.Run(REPORT::"PO - Export N34.1", true, false, PaymentOrder); - end; - - var - ExportPaymentErr: Label 'You cannot export payments from Payment Journal with the selected Payment Export Format in Bal. Account No.'; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.Report.al deleted file mode 100644 index 45815901512..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.Report.al +++ /dev/null @@ -1,566 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.EServices.EDocument; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Foundation.Company; -using Microsoft.Purchases.Vendor; -using System.Utilities; - -report 7000060 "PO - Export N34.1" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Purchases/Payables/POExportN341.rdlc'; - ApplicationArea = Basic, Suite; - Caption = 'PO - Export N34.1'; - Permissions = TableData "Cartera Doc." = rimd, - TableData "Payment Order" = m; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem("Payment Order"; "Payment Order") - { - DataItemTableView = sorting("No.") where("Elect. Pmts Exported" = const(false)); - RequestFilterFields = "No."; - column(Payment_Order_No_; "No.") - { - } - dataitem(CopyLoop; "Integer") - { - DataItemTableView = sorting(Number); - dataitem("Cartera Doc."; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = "Payment Order"; - DataItemTableView = sorting(Type, "Bill Gr./Pmt. Order No.", "Transfer Type", "Account No.") order(ascending) where(Type = const(Payable)); - column(CompanyAddr_1_; CompanyAddr[1]) - { - } - column(CompanyAddr_2_; CompanyAddr[2]) - { - } - column(CompanyAddr_3_; CompanyAddr[3]) - { - } - column(CompanyAddr_4_; CompanyAddr[4]) - { - } - column(CompanyAddr_5_; CompanyAddr[5]) - { - } - column(CompanyAddr_6_; CompanyAddr[6]) - { - } - column(CompanyAddr_7_; CompanyAddr[7]) - { - } - column(CompanyAddr_8_; CompanyAddr[8]) - { - } - column(CopyTxt; CopyTxt) - { - } - column(PayeeAddress_1_; PayeeAddress[1]) - { - } - column(PayeeAddress_2_; PayeeAddress[2]) - { - } - column(PayeeAddress_3_; PayeeAddress[3]) - { - } - column(PayeeAddress_4_; PayeeAddress[4]) - { - } - column(PayeeAddress_5_; PayeeAddress[5]) - { - } - column(PayeeAddress_6_; PayeeAddress[6]) - { - } - column(PayeeAddress_7_; PayeeAddress[7]) - { - } - column(PayeeAddress_8_; PayeeAddress[8]) - { - } - column(STRSUBSTNO_Text1100003_PayeeCCC_VendBankAccCode__ExportAmount_; StrSubstNo(Text1100003, PayeeCCC, VendBankAccCode, ExportAmount)) - { - } - column(ExportAmount; ExportAmount) - { - } - column(VendorCCCBankNo; VendorCCCBankNo) - { - } - column(VendCCCBankBranchNo; VendCCCBankBranchNo) - { - } - column(VendCCCControlDigits; VendCCCControlDigits) - { - } - column(VendCCCAccNo; VendCCCAccNo) - { - } - column(LastRemittanceAdvNo; LastRemittanceAdvNo) - { - } - column(DeliveryDate; Format(DeliveryDate)) - { - } - column(OutputNo; OutputNo) - { - } - column(TempUserText; TempUserText) - { - } - column(TempVendCCCAccNo; TempVendCCCAccNo) - { - } - column(TempVendCCCControlDigits; TempVendCCCControlDigits) - { - } - column(Cartera_Doc___Cartera_Doc___Description; Description) - { - } - column(Cartera_Doc___Cartera_Doc____Document_No__; "Document No.") - { - } - column(Cartera_Doc___Cartera_Doc____Posting_Date_; Format("Posting Date")) - { - } - column(Cartera_Doc___Remaining_Amount_; "Remaining Amount") - { - } - column(ExportAmount_Control1100049; ExportAmount) - { - AutoFormatType = 1; - } - column(Cartera_Doc__Type; Type) - { - } - column(Cartera_Doc__Entry_No_; "Entry No.") - { - } - column(Cartera_Doc__Account_No_; "Account No.") - { - } - column(Cartera_Doc__Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") - { - } - column(To_Caption; To_CaptionLbl) - { - } - column(DescriptionCaption; DescriptionCaptionLbl) - { - } - column(Document_NumberCaption; Document_NumberCaptionLbl) - { - } - column(REMITTANCE_ADVICECaption; REMITTANCE_ADVICECaptionLbl) - { - } - column(Deposited_In_Caption; Deposited_In_CaptionLbl) - { - } - column(DateCaption; DateCaptionLbl) - { - } - column(Remittance_Advice_Number_Caption; Remittance_Advice_Number_CaptionLbl) - { - } - column(Settlement_Date_Caption; Settlement_Date_CaptionLbl) - { - } - column(AmountCaption; AmountCaptionLbl) - { - } - column(ExportAmountCaption; ExportAmountCaptionLbl) - { - } - column(Vendor_CCC_Bank_No_Caption; Vendor_CCC_Bank_No_CaptionLbl) - { - } - column(Vendor_CCC_Bank_Branch_No_Caption; Vendor_CCC_Bank_Branch_No_CaptionLbl) - { - } - column(Vendor_CCC_Control_DigitsCaption; Vendor_CCC_Control_DigitsCaptionLbl) - { - } - column(Vendor_CCC_Account_No_Caption; Vendor_CCC_Account_No_CaptionLbl) - { - } - column(Total_AmountCaption; Total_AmountCaptionLbl) - { - } - - trigger OnAfterGetRecord() - var - VendorBankAccount1: Record "Vendor Bank Account"; - begin - if PreviousAccountNo <> "Account No." then begin - TestField("Account No."); - TestField("Payment Method Code"); - DocType := DocMisc.DocType2("Payment Method Code"); - - ElectPmtMgmt.GetPayeeInfo("Account No.", VendorCCCBankNo, VendCCCBankBranchNo, VendCCCControlDigits, VendCCCAccNo, - PayeeAddress, PayeeCCC, IBAN, SwiftCode, "Transfer Type"); - - GetExportedAmount("Payment Order"."No.", "Account No."); - - if (CopyTxt = '') and not CurrReport.Preview then begin - Vendor.Get("Account No."); - VATRegVend := Vendor."VAT Registration No."; - VATRegVend := VATRegVend + PadStr('', MaxStrLen(VATRegVend) - StrLen(VATRegVend), ' '); - - if (ActualTransferType <> "Transfer Type") and - ((TotalDoc10Vend <> 0) or (TotalDoc33Vend <> 0)) - then - case ActualTransferType of - ActualTransferType::National: - ElectPmtMgmt.InsertDomesticTrailer(TotalDoc10Vend, ElectPmtMgmt.EuroAmount(TotalAmountNAC)); - ActualTransferType::International: - ElectPmtMgmt.InsertInterTransferTrailer(TotalDoc33Vend, ElectPmtMgmt.EuroAmount(TotalAmountInter)); - end; - - case "Transfer Type" of - "Transfer Type"::National: - begin - ActualTransferType := "Transfer Type"::National; - ElectPmtMgmt.InsertDomesticTransferBlock( - DocType, PmtOrderConcept, ExpensesCode, VATRegVend, - ElectPmtMgmt.EuroAmount(ExportAmount), PayeeCCC, Vendor.Name); - TotalDoc10Vend := TotalDoc10Vend + 1; - TotalAmountNAC := TotalAmountNAC + ExportAmount; - end; - "Transfer Type"::International: - begin - ActualTransferType := "Transfer Type"::International; - ElectPmtMgmt.InsertInterTransferBlock( - PmtOrderConcept, ExpensesCode, ExpensesCodeValueInter, VATRegVend, IBAN, - ElectPmtMgmt.EuroAmount(ExportAmount), - Format(VendorBankAccount."Country/Region Code"), SwiftCode, Vendor.Name); - TotalDoc33Vend := TotalDoc33Vend + 1; - TotalAmountInter := TotalAmountInter + ExportAmount; - end; - else - Error(Text1100002, "Entry No.", "Account No.", "Document No.", "Bill Gr./Pmt. Order No."); - end; - if "Document Type" = "Document Type"::Bill then - DocumentType := DocumentType::Bill - else - DocumentType := DocumentType::Invoice; - if DocType = '4' then - ElectPmtMgmt.InsertIntoCheckLedger(BankAccount."No.", DeliveryDate, DocumentType, "Document No.", - Description, "Payment Order"."Bank Account No.", ExportAmount, RecordId); - end; - end; - "Elect. Pmts Exported" := true; - "Export File Name" := EPayExportFilePath; - "Document No." := BankAccount."Last Remittance Advice No."; - Modify(); - PreviousAccountNo := "Account No."; - - VendorBankAccount1.Reset(); - VendorBankAccount1.SetRange("Vendor No.", "Account No."); - VendorBankAccount1.SetRange("Use For Electronic Payments", true); - if VendorBankAccount1.FindFirst() then begin - TempVendCCCControlDigits := VendorBankAccount1."CCC Control Digits"; - TempVendCCCAccNo := VendorBankAccount1."CCC Bank Account No."; - TempUserText := - StrSubstNo( - Text1100003, - ConvertStr(PadStr(VendorBankAccount1."CCC Bank No.", 4, ' '), ' ', '0') + - ConvertStr(PadStr(VendorBankAccount1."CCC Bank Branch No.", 4, ' '), ' ', '0') + - PadStr(VendorBankAccount1."CCC Control Digits", 2, ' ') + - ConvertStr(PadStr(VendorBankAccount1."CCC Bank Account No.", 10, ' '), ' ', '0'), - VendBankAccCode, - Format(-ExportAmount)); - end; - end; - - trigger OnPostDataItem() - begin - if (CopyTxt = '') and not CurrReport.Preview then begin - case ActualTransferType of - ActualTransferType::National: - ElectPmtMgmt.InsertDomesticTrailer(TotalDoc10Vend, ElectPmtMgmt.EuroAmount(TotalAmountNAC)); - ActualTransferType::International: - ElectPmtMgmt.InsertInterTransferTrailer(TotalDoc33Vend, ElectPmtMgmt.EuroAmount(TotalAmountInter)); - end; - - ElectPmtMgmt.InsertGeneralTrailer( - TotalDoc10Vend + TotalDoc33Vend, TotalAmountNAC + TotalAmountInter, SilentMode, SilentModeFileName); - end; - end; - - trigger OnPreDataItem() - begin - PreviousAccountNo := ''; - end; - } - - trigger OnAfterGetRecord() - begin - if Number = 1 then // Original - Clear(CopyTxt) - else begin - CopyTxt := Text1100000; - OutputNo += 1; - end; - end; - - trigger OnPreDataItem() - begin - SetRange(Number, 1, NoOfCopies + 1); - - OutputNo := 1; - end; - } - - trigger OnAfterGetRecord() - begin - TotalAmount := 0; - Amount := 0; - TotalDoc10Vend := 0; - TotalDoc33Vend := 0; - TotalAmountInter := 0; - AmountPaid := 0; - TotalAmountPaid := 0; - - TestField("Currency Code", ''); - TestField("Export Electronic Payment"); - TestField("Bank Account No."); - BankAccount.Get("Bank Account No."); - BankAccount.CalcFields(Balance); - if BankAccount.Balance < 0 then - if not Confirm(Text1100004, false, BankAccount."No.", BankAccount.Name, BankAccount.Balance) then - CurrReport.Quit(); - - ElectPmtMgmt.GetCCCBankInfo("Bank Account No.", - CCCBankNo, CCCBankBranchNo, CCCControlDigits, CCCAccNo); - - if (CopyTxt = '') and not CurrReport.Preview then begin - if CheckErrors then - Relat := '1' - else - Relat := '0'; - - ElectPmtMgmt.GetLastEPayFileCreation(EPayExportFilePath, BankAccount); - - if BankAccount."Last Remittance Advice No." <> '' then - BankAccount."Last Remittance Advice No." := IncStr(BankAccount."Last Remittance Advice No.") - else - BankAccount."Last Remittance Advice No." := Text1100001; - LastRemittanceAdvNo := BankAccount."Last Remittance Advice No."; - BankAccount.Modify(); - end else - if BankAccount."Last Remittance Advice No." <> '' then - LastRemittanceAdvNo := IncStr(BankAccount."Last Remittance Advice No.") - else - LastRemittanceAdvNo := Text1100001; - - if not CurrReport.Preview then begin - ElectPmtMgmt.InsertHeaderRecType1(DeliveryDate, "Posting Date", - CCCBankNo + CCCBankBranchNo + CCCControlDigits + CCCAccNo, Relat); - ElectPmtMgmt.InsertHeaderRecType2(); - ElectPmtMgmt.InsertHeaderRecType3(); - ElectPmtMgmt.InsertHeaderRecType4(); - "Elect. Pmts Exported" := true; - Modify(); - end; - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(DeliveryDate; DeliveryDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Delivery Date'; - ToolTip = 'Specifies a number to identify the operations declaration.'; - } - field(ExpensesCode; ExpensesCode) - { - ApplicationArea = Basic, Suite; - Caption = 'Expenses Code'; - OptionCaption = 'Payer,Payee'; - ToolTip = 'Specifies who is responsible for the payment expenses, the payer or the payee.'; - } - field(PmtOrderConcept; PmtOrderConcept) - { - ApplicationArea = Basic, Suite; - Caption = 'Payment Order Concept'; - OptionCaption = 'Payroll,Retirement Payroll,Others'; - ToolTip = 'Specifies the payment order concept.'; - } - field(CheckErrors; CheckErrors) - { - ApplicationArea = Basic, Suite; - Caption = 'Relation'; - ToolTip = 'Specifies if you want the bank to send you a detailed list of all transfer charges. Deselect the check box if you want a simple total of charges for all the transfers made.'; - } - field(NoOfCopies; NoOfCopies) - { - ApplicationArea = Basic, Suite; - Caption = 'Number Of Copies'; - ToolTip = 'Specifies the number of additional copies of the remittance advice that will be printed by this process. One document is always printed so that it can be mailed to the payee.'; - } - field(ExpensesCodeValueInter; ExpensesCodeValueInter) - { - ApplicationArea = Basic, Suite; - Caption = 'Shared (Only International Transf.)'; - ToolTip = 'Specifies if you want to share the expenses between the payer and the payee. This is only applicable for international transfers.'; - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - if DeliveryDate = 0D then - DeliveryDate := Today; - end; - } - - labels - { - } - - trigger OnInitReport() - begin - SilentMode := false; - end; - - trigger OnPreReport() - begin - CompanyInfo.Get(); - FormatAddr.Company(CompanyAddr, CompanyInfo); - - TotalDoc10Vend := 0; - TotalDoc33Vend := 0; - end; - - trigger OnPostReport() - begin - if not (CurrReport.Preview() or SilentMode) then - ElectPmtMgmt.DownloadFile(); - end; - - var - CompanyInfo: Record "Company Information"; - Vendor: Record Vendor; - BankAccount: Record "Bank Account"; - VendorBankAccount: Record "Vendor Bank Account"; - DocMisc: Codeunit "Document-Misc"; - FormatAddr: Codeunit "Format Address"; - ElectPmtMgmt: Codeunit "Elect. Pmts Management"; - CheckErrors: Boolean; - ExpensesCodeValueInter: Boolean; - VendBankAccCode: Code[20]; - DocType: Code[10]; - CopyTxt: Code[10]; - DeliveryDate: Date; - TotalAmount: Decimal; - TotalDoc10Vend: Decimal; - TotalDoc33Vend: Decimal; - TotalAmountInter: Decimal; - AmountPaid: Decimal; - TotalAmountPaid: Decimal; - ExportAmount: Decimal; - NoOfCopies: Integer; - ExpensesCode: Option Payer,Payee; - PmtOrderConcept: Option Payroll,RetPayroll,Others; - ActualTransferType: Option National,International,Special; - DocumentType: Enum "Gen. Journal Document Type"; - VATRegVend: Text[12]; - CCCBankBranchNo: Text[4]; - CCCControlDigits: Text[2]; - CCCAccNo: Text[10]; - CCCBankNo: Text[4]; - VendCCCBankBranchNo: Text[4]; - VendCCCControlDigits: Text[2]; - VendCCCAccNo: Text[10]; - VendorCCCBankNo: Text[4]; - PayeeCCC: Text[20]; - Relat: Text[1]; - IBAN: Text[34]; - SwiftCode: Text[11]; - Text1100000: Label 'COPY'; - Text1100001: Label 'REM001'; - Text1100002: Label 'Special Transfers are not allowed from Cartera. Please remove Entry No. %1, Account No. %2, Document No. %3 from Payment Order No. %4 and try again.'; - CompanyAddr: array[8] of Text[100]; - PayeeAddress: array[8] of Text[100]; - Text1100003: Label 'We would like to inform you that your Account Number %1, in %2 Bank was credited for the Amount of %3 to settle these transactions:'; - LastRemittanceAdvNo: Text[20]; - EPayExportFilePath: Text[250]; - Text1100004: Label 'Bank %1 - %2, has an overdue balance of %3. Do you still want to record the amount?'; - OutputNo: Integer; - TempVendCCCAccNo: Text[30]; - TempVendCCCControlDigits: Text[30]; - TempUserText: Text[1024]; - PreviousAccountNo: Code[20]; - TotalAmountNAC: Decimal; - To_CaptionLbl: Label 'To:'; - DescriptionCaptionLbl: Label 'Description'; - Document_NumberCaptionLbl: Label 'Document Number'; - REMITTANCE_ADVICECaptionLbl: Label 'REMITTANCE ADVICE'; - Deposited_In_CaptionLbl: Label 'Deposited In:'; - DateCaptionLbl: Label 'Date'; - Remittance_Advice_Number_CaptionLbl: Label 'Remittance Advice Number:'; - Settlement_Date_CaptionLbl: Label 'Settlement Date:'; - AmountCaptionLbl: Label 'Amount'; - ExportAmountCaptionLbl: Label 'Deposit Amount:'; - Vendor_CCC_Bank_No_CaptionLbl: Label 'Vendor CCC Bank No.'; - Vendor_CCC_Bank_Branch_No_CaptionLbl: Label 'Vendor CCC Bank Branch No.'; - Vendor_CCC_Control_DigitsCaptionLbl: Label 'Vendor CCC Control Digits'; - Vendor_CCC_Account_No_CaptionLbl: Label 'Vendor CCC Account No.'; - Total_AmountCaptionLbl: Label 'Total Amount'; - SilentMode: Boolean; - SilentModeFileName: Text; - - [Scope('OnPrem')] - procedure GetExportedAmount(PmtOrderNo: Code[20]; CustVendAccNo: Code[20]) - var - CarteraDoc: Record "Cartera Doc."; - begin - CarteraDoc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date"); - CarteraDoc.SetRange(Type, CarteraDoc.Type::Payable); - CarteraDoc.SetRange("Bill Gr./Pmt. Order No.", PmtOrderNo); - CarteraDoc.SetRange("Account No.", CustVendAccNo); - ExportAmount := 0; - if CarteraDoc.Find('-') then - repeat - ExportAmount := ExportAmount + CarteraDoc."Remaining Amount"; - until CarteraDoc.Next() = 0; - end; - - [Scope('OnPrem')] - procedure EnableSilentMode(FileName: Text) - begin - SilentMode := true; - SilentModeFileName := FileName; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.rdlc b/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.rdlc deleted file mode 100644 index 458a03c4ff7..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/POExportN341.rdlc +++ /dev/null @@ -1,1868 +0,0 @@ - - - 0 - - - - SQL - - - None - 192ea47c-a0b3-4754-aebb-dc4fc65f4294 - - - - - - - - - - - 19.32cm - - - - - 14.38203cm - - - - - - - - - - 6.4cm - - - 3.85cm - - - 3.75cm - - - 3.6cm - - - - - 0.423cm - - - - - true - - - - - =Fields!Cartera_Doc___Cartera_Doc___Description.Value - - - - - - - - - - - - - true - - - - - =Fields!Cartera_Doc___Cartera_Doc____Document_No__.Value - - - - - - - - - - - - - - true - - - - - =Fields!Cartera_Doc___Cartera_Doc____Posting_Date_.Value - - - - - - - - - - - - - true - - - - - =Fields!Cartera_Doc___Remaining_Amount_.Value - - - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox44 - - - - - - - - true - true - - - - - - - - - - - - textbox45 - - - - - - - - true - true - - - - - - - - - - - textbox46 - - - - - - - - true - true - - - - - - - - - - - textbox47 - - - - - - - - 0.16656in - - - - - true - true - - - - - - - - - - - - - true - true - - - - - - - - - - - - - true - true - - - - - - - - - - - - - true - true - - - - - - - - - - - - - 0.16656in - - - - - true - - - - - =First(Fields!Total_AmountCaption.Value) - - - - - - - - - - - - - true - true - - - - - - - - - - - - - true - true - - - - - - - - - - - - - true - - - - - =Fields!ExportAmount.Value - - - - - - - - - - - - - - - - - - - - - - - - - - Detail - - - - - - Detail_Collection - Output - true - - - Before - true - - - Before - true - - - - DataSet_Result - 4.99669in - 0.16656in - 6.93in - 39 - - - true - - - - - =Fields!DescriptionCaption.Value - - - - - - - textbox38 - 11.421cm - 0.45cm - 1.0575cm - 6cm - 38 - - - Bottom - 2pt - 2pt - 2pt - 0.2115cm - - - - true - - - - - =Fields!AmountCaption.Value - - - - - - - 4.49702in - 5.66291in - 1.0575cm - 3.6cm - 37 - - - Bottom - 2pt - 2pt - 2pt - 0.2115cm - - - - true - - - - - =Fields!DateCaption.Value - - - - - - - 4.49702in - 4.16391in - 1.0575cm - 3.15cm - 36 - - - Bottom - 2pt - 2pt - 2pt - 0.2115cm - - - - true - - - - - =Fields!Document_NumberCaption.Value - - - - - - - 4.49702in - 2.6649in - 1.0575cm - 3.45cm - 35 - - - Bottom - 2pt - 2pt - 2pt - 0.2115cm - - - - true - true - - - - - =Fields!STRSUBSTNO_Text1100003_PayeeCCC_VendBankAccCode__ExportAmount_.Value - - - - - - - textbox37 - 9.306cm - 0.45cm - 1.269cm - 17.55cm - 34 - - - - true - true - - - - - =Fields!To_Caption.Value - - - - true - - - - - =Fields!PayeeAddress_3_.Value - - - - true - - - - - =Fields!PayeeAddress_2_.Value - - - - true - - - - - =Fields!PayeeAddress_8_.Value - - - - true - - - - - =Fields!PayeeAddress_4_.Value - - - - true - - - - - =Fields!PayeeAddress_5_.Value - - - - true - - - - - =Fields!PayeeAddress_6_.Value - - - - true - - - - - =Fields!PayeeAddress_7_.Value - - - - true - - - - - =Fields!PayeeAddress_1_.Value - - - - true - - - - - =Fields!Vendor_CCC_Bank_Branch_No_Caption.Value - - - - 2.6649in - 4.08063in - 0.16667in - 5.3cm - 24 - - - - true - - - - - =Fields!Vendor_CCC_Bank_No_Caption.Value - - - - textbox29 - 2.49834in - 4.08063in - 0.16667in - 5.3cm - 23 - - - - true - - - - - =Fields!VendCCCAccNo.Value - - - - 2.99801in - 6.237in - 0.16667in - 2.52cm - 22 - - - - true - - - - - =Fields!Vendor_CCC_Control_DigitsCaption.Value - - - - 2.83146in - 4.08063in - 0.16667in - 5.3cm - 21 - - - - true - - - - - =Fields!Vendor_CCC_Account_No_Caption.Value - - - - 2.99801in - 4.08063in - 0.16667in - 5.3cm - 20 - - - - true - - - - - =Fields!VendorCCCBankNo.Value - - - - textbox33 - 6.345cm - 15.84cm - 0.16667in - 2.52cm - 19 - - - - true - - - - - =Fields!VendCCCBankBranchNo.Value - - - - 2.6649in - 6.237in - 0.16667in - 2.52cm - 18 - - - - true - - - - - =Fields!Deposited_In_Caption.Value - - - - true - - - - - =Fields!VendCCCControlDigits.Value - - - - 2.83146in - 6.237in - 0.16667in - 2.52cm - 16 - - - - true - - - - - =Fields!LastRemittanceAdvNo.Value - - - - textbox13 - 2.538cm - 16.8cm - 0.16667in - 15 - - - - true - - - - - =Fields!Remittance_Advice_Number_Caption.Value - - - - textbox12 - 2.538cm - 10.998cm - 0.16667in - 5.592cm - 14 - - - - true - - - - - =Fields!DeliveryDate.Value - - - - textbox15 - 3.384cm - 16.8cm - 0.16667in - 13 - - - - true - - - - - =Fields!Settlement_Date_Caption.Value - - - - textbox14 - 3.384cm - 10.998cm - 0.16667in - 5.592cm - 12 - - - - true - - - - - =Fields!REMITTANCE_ADVICECaption.Value - - - - true - - - - - =Fields!CopyTxt.Value - - - - true - - - - - =Fields!CompanyAddr_3_.Value - - - - 0.33311in - 0.33075in - 0.423cm - 7.35cm - 9 - - - - true - - - - - =Fields!CompanyAddr_2_.Value - - - - 0.16656in - 0.33075in - 0.423cm - 7.35cm - 8 - - - - true - - - - - =Fields!CompanyAddr_5_.Value - - - - 0.66622in - 0.33075in - 0.423cm - 7.35cm - 7 - - - - true - - - - - =Fields!CompanyAddr_4_.Value - - - - 0.49967in - 0.33075in - 0.423cm - 7.35cm - 6 - - - - true - - - - - =Fields!CompanyAddr_6_.Value - - - - 0.83278in - 0.33075in - 0.423cm - 7.35cm - 5 - - - - true - - - - - =Fields!CompanyAddr_7_.Value - - - - 0.99934in - 0.33075in - 0.423cm - 7.35cm - 4 - - - - true - - - - - =Fields!CompanyAddr_1_.Value - - - - textbox2 - 0.84cm - 0.423cm - 7.35cm - 3 - - - - true - - - - - =Fields!CompanyAddr_8_.Value - - - - 1.16589in - 0.33075in - 0.423cm - 7.35cm - 2 - - - - true - - - - - =Fields!ExportAmountCaption.Value - - - - textbox26 - 4.653cm - 10.95cm - 0.16667in - 3.78cm - 1 - - - - true - - - - - =Fields!ExportAmount.Value - - - - - - - textbox27 - 4.653cm - 15cm - 0.16667in - 3.57cm - - - - true - - - - - - - - - - - - - - - - - - =Fields!Payment_Order_No_.Value - =Fields!OutputNo.Value - =Fields!Cartera_Doc__Account_No_.Value - - - Between - - - Output - true - - - - DataSet_Result - - End - - - - =Fields!Payment_Order_No_.Value - NotEqual - - =nothing - - - - - - - 14.38203cm - - 19.32cm - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 0cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - - =User!Language - true - Invalid - e3f93763-ace4-45a2-8476-a2f54d0dd6d1 - - - - - Payment_Order_No_ - - - CompanyAddr_1_ - - - CompanyAddr_2_ - - - CompanyAddr_3_ - - - CompanyAddr_4_ - - - CompanyAddr_5_ - - - CompanyAddr_6_ - - - CompanyAddr_7_ - - - CompanyAddr_8_ - - - CopyTxt - - - PayeeAddress_1_ - - - PayeeAddress_2_ - - - PayeeAddress_3_ - - - PayeeAddress_4_ - - - PayeeAddress_5_ - - - PayeeAddress_6_ - - - PayeeAddress_7_ - - - PayeeAddress_8_ - - - STRSUBSTNO_Text1100003_PayeeCCC_VendBankAccCode__ExportAmount_ - - - ExportAmount - - - ExportAmountFormat - - - VendorCCCBankNo - - - VendCCCBankBranchNo - - - VendCCCControlDigits - - - VendCCCAccNo - - - LastRemittanceAdvNo - - - DeliveryDate - - - OutputNo - - - TempUserText - - - TempVendCCCAccNo - - - TempVendCCCControlDigits - - - Cartera_Doc___Cartera_Doc___Description - - - Cartera_Doc___Cartera_Doc____Document_No__ - - - Cartera_Doc___Cartera_Doc____Posting_Date_ - - - Cartera_Doc___Remaining_Amount_ - - - Cartera_Doc___Remaining_Amount_Format - - - ExportAmount_Control1100049 - - - ExportAmount_Control1100049Format - - - Cartera_Doc__Type - - - Cartera_Doc__Entry_No_ - - - Cartera_Doc__Account_No_ - - - Cartera_Doc__Bill_Gr__Pmt__Order_No_ - - - To_Caption - - - DescriptionCaption - - - Document_NumberCaption - - - REMITTANCE_ADVICECaption - - - Deposited_In_Caption - - - DateCaption - - - Remittance_Advice_Number_Caption - - - Settlement_Date_Caption - - - AmountCaption - - - ExportAmountCaption - - - Vendor_CCC_Bank_No_Caption - - - Vendor_CCC_Bank_Branch_No_Caption - - - Vendor_CCC_Control_DigitsCaption - - - Vendor_CCC_Account_No_Caption - - - Total_AmountCaption - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PartialSettlPayable.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PartialSettlPayable.Report.al deleted file mode 100644 index d1396a3b1a4..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PartialSettlPayable.Report.al +++ /dev/null @@ -1,513 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Finance.VAT.Setup; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.History; -using Microsoft.Sales.Receivables; - -report 7000085 "Partial Settl. - Payable" -{ - Caption = 'Partial Settl. - Payable'; - Permissions = TableData "Cust. Ledger Entry" = imd, - TableData "Vendor Ledger Entry" = imd, - TableData "G/L Register" = m, - TableData "Posted Cartera Doc." = imd, - TableData "Closed Cartera Doc." = imd, - TableData "Posted Payment Order" = imd, - TableData "Closed Payment Order" = imd; - ProcessingOnly = true; - - dataset - { - dataitem(PostedDoc; "Posted Cartera Doc.") - { - DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where(Status = const(Open)); - - trigger OnAfterGetRecord() - var - FromJnl: Boolean; - begin - IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("No."); - if PostedPmtOrd."No." = '' then begin - PostedPmtOrd.Get("Bill Gr./Pmt. Order No."); - BankAcc.Get(PostedPmtOrd."Bank Account No."); - Delay := BankAcc."Delay for Notices"; - end; - - RemainingAmt2 := "Remaining Amount" - AppliedAmt; - - DocCount := DocCount + 1; - Window.Update(1, DocCount); - - case "Document Type" of - "Document Type"::Invoice, "Document Type"::"Credit Memo": - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine."Document Date" := GenJnlLine."Document Date"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); - VendLedgEntry.Get(PostedDoc."Entry No."); - OnBeforeValidateInvoiceAccountNo(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, FromJnl, ExistsNoRealVAT); - GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100001, PostedDoc."Document No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, AppliedAmt); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - "Global Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; - GenJnlLine.Validate("Recipient Bank Account", VendLedgEntry."Recipient Bank Account"); - GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - - OnAfterInvoiceGenJnlLineInsert( - GenJnlLine, VendLedgEntry, PostedDoc, PostedPmtOrd, FromJnl, ExistsNoRealVAT, - AppliedAmt, ExistVATEntry, FirstVATEntryNo, LastVATEntryNo, NoRealVATBuffer); - if AppliedAmt = RemainingAmt then begin - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - VendLedgEntry.Modify(); - RemainingAmt2 := 0; - end; - end; - "Document Type"::Bill: - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); - VendLedgEntry.Get(PostedDoc."Entry No."); - - if GLSetup."Unrealized VAT" then begin - FromJnl := false; - if PostedDoc."From Journal" then - FromJnl := true; - ExistsNoRealVAT := GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry, FromJnl); - end; - - GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, AppliedAmt); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; - GenJnlLine.Validate("Recipient Bank Account", VendLedgEntry."Recipient Bank Account"); - GenJnlLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - if GLSetup."Unrealized VAT" and - ExistsNoRealVAT and - (not IsRedrawn) - then begin - OnBeforeVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); - CarteraManagement.VendUnrealizedVAT2( - VendLedgEntry, - -AppliedAmt, - GenJnlLine, - ExistVATEntry, - FirstVATEntryNo, - LastVATEntryNo, - NoRealVATBuffer, - FromJnl, - "Document No."); - OnAfterVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); - - if NoRealVATBuffer.Find('-') then - repeat - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer.Account, - NoRealVATBuffer.Amount); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer."Balance Account", - -NoRealVATBuffer.Amount); - until NoRealVATBuffer.Next() = 0; - end; - - if AppliedAmt = "Remaining Amount" then begin - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - VendLedgEntry.Modify(); - end; - end; - end; - - DimSetID := "Dimension Set ID"; - OnAfterPostedDocOnAfterGetRecord(PostedDoc); - end; - - trigger OnPostDataItem() - begin - if DocCount = 0 then - Error( - Text1100003 + - Text1100004); - - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); - GenJnlLine.Validate("Account No.", BankAcc."No."); - if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)) - else - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100001, PostedDoc."Document No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedPmtOrd."Currency Code"); - GenJnlLine.Validate(Amount, -AppliedAmt); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Dimension Set ID" := - CarteraManagement.GetCombinedDimSetID(GenJnlLine, DimSetID); - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - - if PostedPmtOrd."Currency Code" <> '' then - if SumLCYAmt <> 0 then begin - Currency.SetFilter(Code, PostedPmtOrd."Currency Code"); - Currency.FindFirst(); - if SumLCYAmt > 0 then begin - Currency.TestField("Residual Gains Account"); - Acct := Currency."Residual Gains Account"; - end else begin - Currency.TestField("Residual Losses Account"); - Acct := Currency."Residual Losses Account"; - end; - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); - GenJnlLine.Validate("Account No.", Acct); - GenJnlLine.Description := Text1100005; - GenJnlLine.Validate("Currency Code", ''); - GenJnlLine.Validate(Amount, -SumLCYAmt); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Dimension Set ID" := - CarteraManagement.GetCombinedDimSetID(GenJnlLine, VendLedgEntry."Dimension Set ID"); - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); - GenJnlLine.Insert(); - end; - - DocPost.PostSettlement(GenJnlLine); - - VendLedgEntry.Get("Entry No."); - Get(Type, "Entry No."); - "Honored/Rejtd. at Date" := PostingDate; - "Remaining Amount" := RemainingAmt2; - "Remaining Amt. (LCY)" := Round(CurrExchRate.ExchangeAmtFCYToLCY( - VendLedgEntry."Posting Date", - VendLedgEntry."Currency Code", - RemainingAmt2, - CurrExchRate.ExchangeRate(VendLedgEntry."Posting Date", VendLedgEntry."Currency Code")), - GLSetup."Amount Rounding Precision"); - if RemainingAmt2 = 0 then begin - "Remaining Amt. (LCY)" := 0; - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - Status := Status::Honored; - VendLedgEntry.Open := false; - end else begin - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Open; - Status := Status::Open; - VendLedgEntry.Open := true; - end; - - OnBeforePostedDocModify(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd); - VendLedgEntry.Modify(); - Modify(); - PostedPmtOrd.Modify(); - - DocPost.ClosePmtOrdIfEmpty(PostedPmtOrd, PostingDate); - - Window.Close(); - - if ExistVATEntry then begin - GLReg.FindLast(); - GLReg."From VAT Entry No." := FirstVATEntryNo; - GLReg."To VAT Entry No." := LastVATEntryNo; - GLReg.Modify(); - end; - - OnAfterPostedDocOnPostDataItem(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd); - Commit(); - - Message( - Text1100006, - DocCount, RemainingAmt, PostedPmtOrd."No.", AppliedAmt); - end; - - trigger OnPreDataItem() - begin - DocPost.CheckPostingDate(PostingDate); - - SourceCodeSetup.Get(); - SourceCode := SourceCodeSetup."Cartera Journal"; - DocCount := 0; - SumLCYAmt := 0; - GenJnlLineNextNo := 0; - ExistVATEntry := false; - Window.Open( - Text1100000); - end; - } - } - - requestpage - { - SaveValues = false; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(PostingDate; PostingDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Posting Date'; - NotBlank = true; - ToolTip = 'Specifies the posting date.'; - - trigger OnValidate() - var - VendLedgEntry2: Record "Vendor Ledger Entry"; - begin - VendLedgEntry2.Get(VendLedgEntryNo); - if VendLedgEntry2."Document Type" = VendLedgEntry2."Document Type"::Invoice then begin - VendLedgEntry2.CalcFields("Remaining Amount"); - if PostingDate > VendLedgEntry2."Pmt. Discount Date" then - RemainingAmt := -VendLedgEntry2."Remaining Amount" - else - RemainingAmt := -VendLedgEntry2."Remaining Amount" + VendLedgEntry2."Remaining Pmt. Disc. Possible"; - AppliedAmt := RemainingAmt; - end; - end; - } - field(RemainingAmt; RemainingAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = CurrencyCode; - AutoFormatType = 1; - Caption = 'Remaining Amount'; - Editable = false; - ToolTip = 'Specifies the pending, unpaid amount.'; - } - field(CurrencyCode; CurrencyCode) - { - ApplicationArea = Basic, Suite; - Caption = 'Currency Code'; - Editable = false; - TableRelation = Currency; - ToolTip = 'Specifies the currency of the amounts.'; - } - field(AppliedAmt; AppliedAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = CurrencyCode; - AutoFormatType = 1; - Caption = 'Settled Amount'; - Editable = true; - MinValue = 0; - NotBlank = true; - ToolTip = 'Specifies the amount that you wish to apply to the total amount due.'; - - trigger OnValidate() - begin - if AppliedAmt > RemainingAmt then - Error(Text1100007, RemainingAmt); - end; - } - } - } - } - - actions - { - } - } - - labels - { - } - - trigger OnInitReport() - begin - PostingDate := WorkDate(); - RemainingAmt := 0; - AppliedAmt := 0; - CurrencyCode := ''; - end; - - trigger OnPreReport() - begin - GLSetup.Get(); - end; - - var - Text1100000: Label 'Settling payable documents #1######'; - Text1100001: Label 'Partial Document settlement %1'; - Text1100002: Label 'Partial Bill settlement %1/%2'; - Text1100003: Label 'No payable documents have been found that can be settled. \'; - Text1100004: Label 'Please check that the selection is not empty and at least one payable document is open.'; - Text1100005: Label 'Residual adjust generated by rounding Amount'; - Text1100006: Label '%1 payable documents totaling %2 have been partially settled in Payment Order %3 by an amount of %4.'; - Text1100007: Label 'The maximum permitted value is %1'; - Text1100008: Label 'Partial payable document settlement %1/%2'; - Text1100009: Label 'Partial payable document settlement %1'; - SourceCodeSetup: Record "Source Code Setup"; - PostedPmtOrd: Record "Posted Payment Order"; - GenJnlLine: Record "Gen. Journal Line" temporary; - VendLedgEntry: Record "Vendor Ledger Entry"; - BankAcc: Record "Bank Account"; - CurrExchRate: Record "Currency Exchange Rate"; - Currency: Record Currency; - GLReg: Record "G/L Register"; - GLSetup: Record "General Ledger Setup"; - VATPostingSetup: Record "VAT Posting Setup"; - NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; - DocPost: Codeunit "Document-Post"; - CarteraManagement: Codeunit CarteraManagement; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - Window: Dialog; - PostingDate: Date; - Delay: Decimal; - SourceCode: Code[10]; - Acct: Code[20]; - DocCount: Integer; - GenJnlLineNextNo: Integer; - SumLCYAmt: Decimal; - CurrencyCode: Code[10]; - RemainingAmt: Decimal; - RemainingAmt2: Decimal; - AppliedAmt: Decimal; - ExistVATEntry: Boolean; - FirstVATEntryNo: Integer; - LastVATEntryNo: Integer; - IsRedrawn: Boolean; - DimSetID: Integer; - ExistsNoRealVAT: Boolean; - VendLedgEntryNo: Integer; - - procedure SetInitValue(Amount: Decimal; CurrCode: Code[10]; EntryNo: Integer) - begin - CurrencyCode := CurrCode; - RemainingAmt := Amount; - AppliedAmt := RemainingAmt; - VendLedgEntryNo := EntryNo; - end; - - local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal) - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine."Account Type" := AccType; - GenJnlLine.Validate("Account No.", AccNo); - if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100008, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)) - else - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedDoc."Document No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, -Amount2); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := ''; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Dimension Set ID" := - CarteraManagement.GetCombinedDimSetID(GenJnlLine, VendLedgEntry."Dimension Set ID"); - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd); - GenJnlLine.Insert(); - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterInvoiceGenJnlLineInsert(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var AppliedAmt: Decimal; var ExistVATEntry: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterPostedDocOnAfterGetRecord(var PostedCarteraDoc: Record "Posted Cartera Doc.") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterPostedDocOnPostDataItem(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeGenJournalLineInsert(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforePostedDocModify(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeValidateInvoiceAccountNo(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PayableClosedCarteraDocs.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PayableClosedCarteraDocs.Page.al deleted file mode 100644 index 4e387094869..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PayableClosedCarteraDocs.Page.al +++ /dev/null @@ -1,272 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Sales.Receivables; - -page 7000013 "Payable Closed Cartera Docs" -{ - ApplicationArea = Basic, Suite; - Caption = 'Closed Payables Docs'; - Editable = false; - PageType = List; - SourceTable = "Closed Cartera Doc."; - SourceTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Status, Redrawn) - where(Type = const(Payable)); - UsageCategory = Lists; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date this closed document was created and posted.'; - Visible = false; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this closed document.'; - } - field(Status; Rec.Status) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the status of the closed document.'; - } - field("Honored/Rejtd. at Date"; Rec."Honored/Rejtd. at Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the date of payment or rejection of this closed document.'; - Visible = false; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the payment method code defined for the document number.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the document that is the source of this closed document.'; - } - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of the closed bill.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the description associated with this closed document.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code in which this closed document was generated.'; - Visible = false; - } - field("Original Amount"; Rec."Original Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the initial amount of this closed document.'; - } - field("Original Amount (LCY)"; Rec."Original Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the initial amount of this document, in LCY.'; - Visible = false; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for this closed document to be fully applied.'; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding, in order for this closed document to be fully settled.'; - Visible = false; - } - field(Redrawn; Rec.Redrawn) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if this document, which has come due and is now rejected, has been recirculated.'; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - Visible = false; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the account number of the customer/vendor associated with this closed document.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the ledger entry number associated with the posting of this closed document.'; - } - } - } - area(factboxes) - { - part(Control1901421307; "Closed Docs Analysis LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = Type = const(Payable), - "Entry No." = field("Entry No."); - Visible = true; - } - part(Control1901421407; "Closed Docs Analysis NonLCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = Type = const(Payable), - "Entry No." = field("Entry No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("&Docs.") - { - Caption = '&Docs.'; - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - - trigger OnAction() - begin - ClosedDoc.Copy(Rec); - PAGE.Run(PAGE::"Closed Documents Analysis", ClosedDoc); - end; - } - action(Redraw) - { - ApplicationArea = Basic, Suite; - Caption = 'Redraw'; - Ellipsis = true; - Image = RefreshVoucher; - ToolTip = 'Create a new copy of the old bill or order, with the possibility of creating it with a new, later due date and a different payment method.'; - - trigger OnAction() - begin - RedrawDocs(); - end; - } - separator(Action1100000) - { - } - action("Dime&nsions") - { - ApplicationArea = Basic, Suite; - Caption = 'Dime&nsions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - } - } - area(processing) - { - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - CarteraManagement.NavigateClosedDoc(Rec); - end; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Navigate_Promoted"; "&Navigate") - { - } - } - } - } - - var - Text1100000: Label 'Only bills can be redrawn.'; - Text1100001: Label 'Only receivable bills can be redrawn.'; - Text1100002: Label 'No bills have been found that can be redrawn. \'; - Text1100003: Label 'Please check that at least one rejected bill was selected.'; - ClosedDoc: Record "Closed Cartera Doc."; - CustLedgEntry: Record "Cust. Ledger Entry"; - CarteraManagement: Codeunit CarteraManagement; - - [Scope('OnPrem')] - procedure RedrawDocs() - begin - CurrPage.SetSelectionFilter(ClosedDoc); - if not ClosedDoc.Find('=><') then - exit; - - ClosedDoc.SetRange("Document Type", ClosedDoc."Document Type"::Bill); - if not ClosedDoc.Find('-') then - Error( - Text1100000); - - ClosedDoc.SetRange(Type, ClosedDoc.Type::Receivable); - if not ClosedDoc.Find('-') then - Error( - Text1100001); - - ClosedDoc.SetRange(Status, ClosedDoc.Status::Rejected); - if not ClosedDoc.Find('-') then - Error( - Text1100002 + - Text1100003); - - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(ClosedDoc."Entry No."); - CustLedgEntry.Mark(true); - until ClosedDoc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Redraw Receivable Bills", true, false, CustLedgEntry); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PayablesCarteraDocs.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PayablesCarteraDocs.Page.al deleted file mode 100644 index e9a8a9ad927..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PayablesCarteraDocs.Page.al +++ /dev/null @@ -1,480 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.History; -using Microsoft.Sales.Customer; -using Microsoft.Sales.History; -using Microsoft.Sales.Receivables; - -page 7000002 "Payables Cartera Docs" -{ - ApplicationArea = Basic, Suite; - Caption = 'Payables Docs'; - DeleteAllowed = false; - InsertAllowed = false; - PageType = List; - Permissions = TableData "Cartera Doc." = m; - SaveValues = true; - SourceTable = "Cartera Doc."; - SourceTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place) - where(Type = const(Payable), - "Bill Gr./Pmt. Order No." = filter(= '')); - UsageCategory = Lists; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - } - repeater(Control1) - { - ShowCaption = false; - field("Document Type"; Rec."Document Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of document in question.'; - } - field("Collection Agent"; Rec."Collection Agent") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the agent in which this document is settled.'; - } - field(Accepted; Rec.Accepted) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the Acceptance status required for a bill.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the when the creation of this document was posted.'; - Visible = false; - } - field("Due Date"; Rec."Due Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the due date of this document.'; - } - field("Payment Method Code"; Rec."Payment Method Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the payment method code defined for the document number.'; - } - field("Document No."; Rec."Document No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of the document used to generate this document.'; - } - field("No."; Rec."No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number associated with a specific bill.'; - } - field(Description; Rec.Description) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the description associated with this document.'; - } - field("Original Amount (LCY)"; Rec."Original Amount (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the initial amount of this document, in LCY.'; - Visible = false; - } - field("Original Amount"; Rec."Original Amount") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the initial amount of this document.'; - Visible = false; - } - field("Remaining Amt. (LCY)"; Rec."Remaining Amt. (LCY)") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending amount, in order for the document to be settled in full.'; - Visible = false; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the pending payment amount for the document to be settled in full.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the currency code in which this document was generated.'; - Visible = false; - } - field(Place; Rec.Place) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies if the company bank and customer bank are in the same area.'; - Visible = false; - } - field("Category Code"; Rec."Category Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a category code for this document.'; - } - field("Transfer Type"; Rec."Transfer Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the Transfer Type on the payment journal line.'; - } - field("Account No."; Rec."Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the account number of the customer/vendor associated with this document.'; - Visible = false; - } - field("Entry No."; Rec."Entry No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the ledger entry number associated with the posting of this document.'; - } - field("Cust./Vendor Bank Acc. Code"; Rec."Cust./Vendor Bank Acc. Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the bank account code of the customer/vendor associated with this document.'; - } - } - group(Control49) - { - ShowCaption = false; - field(CurrTotalAmount; CurrTotalAmountLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Total Rmg. Amt. (LCY)'; - Editable = false; - ToolTip = 'Specifies the sum of amounts that remain to be paid.'; - Visible = CurrTotalAmountVisible; - } - } - } - area(factboxes) - { - part(Control1901421107; "Rec. Docs Analysis Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = Type = const(Payable), - "Entry No." = field("Entry No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("&Docs.") - { - Caption = '&Docs.'; - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - - trigger OnAction() - begin - Doc.Copy(Rec); - PAGE.Run(PAGE::"Documents Analysis", Doc); - end; - } - separator(Action55) - { - } - action("Dime&nsions") - { - ApplicationArea = Basic, Suite; - Caption = 'Dime&nsions'; - Image = Dimensions; - ShortCutKey = 'Shift+Ctrl+D'; - ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to journal lines to distribute costs and analyze transaction history.'; - - trigger OnAction() - begin - Rec.ShowDimensions(); - end; - } - separator(Action58) - { - } - action(Categorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Categorize'; - Ellipsis = true; - Image = Category; - ToolTip = 'Insert categories on one or more Cartera documents to facilitate analysis. For example, to count or add only some documents, to analyze their due dates, to simulate scenarios for creating bill groups, to mark documents with your initials to indicate to other accountants that you are managing them personally.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(Doc); - CarteraManagement.CategorizeDocs(Doc); - end; - } - action(Decategorize) - { - ApplicationArea = Basic, Suite; - Caption = 'Decategorize'; - Image = UndoCategory; - ToolTip = 'Remove categories applied to one or more Cartera documents to facilitate analysis.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(Doc); - CarteraManagement.DecategorizeDocs(Doc); - end; - } - separator(Action37) - { - } - action(Reject) - { - ApplicationArea = Basic, Suite; - Caption = 'Reject'; - Ellipsis = true; - Image = Reject; - ToolTip = 'Post document rejections.'; - - trigger OnAction() - var - Cust: Record Customer; - begin - if Doc.Type = Doc.Type::Receivable then - if Cust.Get(Rec."Account No.") then - Cust.CheckBlockedCustOnJnls(Cust, "Gen. Journal Document Type".FromInteger(Rec."Document Type".AsInteger()), false); - RejectDocs(); - end; - } - separator(Action39) - { - } - action(Print) - { - ApplicationArea = Basic, Suite; - Caption = 'Print'; - Ellipsis = true; - Image = Print; - ToolTip = 'Print the document.'; - - trigger OnAction() - begin - PrintDoc(); - end; - } - } - } - area(processing) - { - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - CarteraManagement.NavigateDoc(Rec); - end; - } - action("Documents Maturity") - { - ApplicationArea = Basic, Suite; - Caption = 'Documents Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Documents Maturity"; - RunPageLink = Type = filter(Payable), - "Bill Gr./Pmt. Order No." = filter(''); - ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Navigate_Promoted"; "&Navigate") - { - } - actionref("Documents Maturity_Promoted"; "Documents Maturity") - { - } - } - } - } - - trigger OnAfterGetRecord() - begin - AfterGetCurrentRecord(); - end; - - trigger OnInit() - begin - CurrTotalAmountVisible := true; - end; - - trigger OnModifyRecord(): Boolean - begin - CODEUNIT.Run(CODEUNIT::"Document-Edit", Rec); - exit(false); - end; - - trigger OnNewRecord(BelowxRec: Boolean) - begin - AfterGetCurrentRecord(); - end; - - trigger OnOpenPage() - begin - CategoryFilter := Rec.GetFilter("Category Code"); - UpdateStatistics(); - end; - - var - Text1100000: Label 'Payable Bills cannot be printed.'; - Text1100001: Label 'Only Receivable Bills can be rejected.'; - Text1100002: Label 'Only Bills can be rejected.'; - Doc: Record "Cartera Doc."; - CustLedgEntry: Record "Cust. Ledger Entry"; - SalesInvHeader: Record "Sales Invoice Header"; - PurchInvHeader: Record "Purch. Inv. Header"; - CarteraManagement: Codeunit CarteraManagement; - CategoryFilter: Code[250]; - CurrTotalAmountLCY: Decimal; - ShowCurrent: Boolean; - CurrTotalAmountVisible: Boolean; - - procedure UpdateStatistics() - begin - Doc.Copy(Rec); - CarteraManagement.UpdateStatistics(Doc, CurrTotalAmountLCY, ShowCurrent); - CurrTotalAmountVisible := ShowCurrent; - end; - - procedure GetSelected(var NewDoc: Record "Cartera Doc.") - begin - CurrPage.SetSelectionFilter(NewDoc); - end; - - procedure PrintDoc() - begin - CurrPage.SetSelectionFilter(Doc); - if not Doc.Find('-') then - exit; - - if (Doc.Type <> Doc.Type::Receivable) and (Doc."Document Type" = Doc."Document Type"::Bill) then - Error(Text1100000); - - if Doc.Type = Doc.Type::Receivable then begin - if Doc."Document Type" = Doc."Document Type"::Bill then begin - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(Doc."Entry No."); - CustLedgEntry.Mark(true); - until Doc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - CustLedgEntry.PrintBill(true); - end else begin - SalesInvHeader.Reset(); - repeat - SalesInvHeader.Get(Doc."Document No."); - SalesInvHeader.Mark(true); - until Doc.Next() = 0; - - SalesInvHeader.MarkedOnly(true); - SalesInvHeader.PrintRecords(true); - end; - end else begin - PurchInvHeader.Reset(); - repeat - PurchInvHeader.Get(Doc."Document No."); - PurchInvHeader.Mark(true); - until Doc.Next() = 0; - - PurchInvHeader.MarkedOnly(true); - PurchInvHeader.PrintRecords(true); - end; - end; - - - procedure RejectDocs() - begin - if Doc.Type <> Doc.Type::Receivable then - Error(Text1100001); - if Doc."Document Type" <> Rec."Document Type"::Bill then - Error(Text1100002); - - CurrPage.SetSelectionFilter(Doc); - if not Doc.Find('-') then - exit; - - CustLedgEntry.Reset(); - repeat - CustLedgEntry.Get(Doc."Entry No."); - CustLedgEntry.Mark(true); - until Doc.Next() = 0; - - CustLedgEntry.MarkedOnly(true); - REPORT.RunModal(REPORT::"Reject Docs.", true, false, CustLedgEntry); - end; - - local procedure CategoryFilterOnAfterValidate() - begin - Rec.SetFilter("Category Code", CategoryFilter); - CurrPage.Update(false); - UpdateStatistics(); - end; - - local procedure AfterGetCurrentRecord() - begin - xRec := Rec; - UpdateStatistics(); - end; -} diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrder.Table.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrder.Table.al deleted file mode 100644 index 3f4555a5bc3..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrder.Table.al +++ /dev/null @@ -1,421 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Foundation.NoSeries; -using Microsoft.Purchases.History; - -table 7000020 "Payment Order" -{ - Caption = 'Payment Order'; - DrillDownPageID = "Payment Orders List"; - LookupPageID = "Payment Orders List"; - Permissions = TableData "Cartera Doc." = m; - DataClassification = CustomerContent; - - fields - { - field(2; "No."; Code[20]) - { - Caption = 'No.'; - - trigger OnValidate() - var - NoSeries: Codeunit "No. Series"; - begin - if "No." = xRec."No." then - exit; - - CheckPrinted(); - ResetPrinted(); - - CarteraSetup.Get(); - NoSeries.TestManual(CarteraSetup."Payment Order Nos."); - "No. Series" := ''; - - UpdateDescription(); - CheckNoNotUsed(); - end; - } - field(3; "Bank Account No."; Code[20]) - { - Caption = 'Bank Account No.'; - TableRelation = "Bank Account"; - - trigger OnValidate() - begin - CalcFields("Bank Account Name"); - - if "Bank Account No." = '' then - exit; - - BankAcc.Get("Bank Account No."); - BankAcc.TestField(Blocked, false); - - if PmtOrdIsEmpty() then begin - Validate("Currency Code", BankAcc."Currency Code"); - exit; - end; - - BankAcc.TestField("Currency Code", "Currency Code"); - - CalcFields(Amount); - - if "Bank Account No." <> xRec."Bank Account No." then begin - CheckPrinted(); - ResetPrinted(); - end; - end; - } - field(4; "Bank Account Name"; Text[100]) - { - CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); - Caption = 'Bank Account Name'; - Editable = false; - FieldClass = FlowField; - } - field(5; "Posting Description"; Text[100]) - { - Caption = 'Posting Description'; - } - field(7; Amount; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Payable))); - Caption = 'Amount'; - Editable = false; - FieldClass = FlowField; - } - field(8; "Reason Code"; Code[10]) - { - Caption = 'Reason Code'; - TableRelation = "Reason Code"; - } - field(9; "No. Printed"; Integer) - { - Caption = 'No. Printed'; - } - field(10; "Posting Date"; Date) - { - Caption = 'Posting Date'; - - trigger OnValidate() - begin - if "Posting Date" <> xRec."Posting Date" then begin - CheckPrinted(); - ResetPrinted(); - end; - end; - } - field(11; Comment; Boolean) - { - CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), - Type = filter(Payable))); - Caption = 'Comment'; - Editable = false; - FieldClass = FlowField; - } - field(12; "Category Filter"; Code[10]) - { - Caption = 'Category Filter'; - FieldClass = FlowFilter; - TableRelation = "Category Code"; - ValidateTableRelation = false; - } - field(13; "Due Date Filter"; Date) - { - Caption = 'Due Date Filter'; - FieldClass = FlowFilter; - } - field(14; "Global Dimension 1 Filter"; Code[20]) - { - CaptionClass = '1,3,1'; - Caption = 'Global Dimension 1 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(15; "Global Dimension 2 Filter"; Code[20]) - { - CaptionClass = '1,3,2'; - Caption = 'Global Dimension 2 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(16; "No. Series"; Code[20]) - { - Caption = 'No. Series'; - Editable = false; - TableRelation = "No. Series"; - } - field(33; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - - trigger OnLookup() - begin - Currency.Reset(); - - if Currency.Get("Currency Code") then; - Currencies.SetRecord(Currency); - Currencies.LookupMode(true); - if ACTION::LookupOK = Currencies.RunModal() then begin - Currencies.GetRecord(Currency); - Clear(Currencies); - Validate("Currency Code", Currency.Code); - end else - Clear(Currencies); - end; - - trigger OnValidate() - begin - if BankAcc.Get("Bank Account No.") and ("Currency Code" <> BankAcc."Currency Code") - then - TestField("Currency Code", BankAcc."Currency Code"); - - if ("Currency Code" <> xRec."Currency Code") and not PmtOrdIsEmpty() then - FieldError("Currency Code", - StrSubstNo(Text1100001, TableCaption)); - - if "Currency Code" <> '' then begin - Currency.Reset(); - Currency.SetRange("Payment Orders", true); - Currency.Code := "Currency Code"; - if not Currency.Find() then - Error( - Text1100002, - "Currency Code"); - end; - - if "Currency Code" <> xRec."Currency Code" then begin - CheckPrinted(); - ResetPrinted(); - end; - end; - } - field(34; "Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Payable))); - Caption = 'Amount (LCY)'; - Editable = false; - FieldClass = FlowField; - } - field(35; "Elect. Pmts Exported"; Boolean) - { - Caption = 'Elect. Pmts Exported'; - - trigger OnValidate() - var - CarteraDoc: Record "Cartera Doc."; - begin - CarteraDoc.SetRange(Type, CarteraDoc.Type::Payable); - CarteraDoc.SetRange("Bill Gr./Pmt. Order No.", "No."); - CarteraDoc.ModifyAll("Elect. Pmts Exported", true); - end; - } - field(36; "Export Electronic Payment"; Boolean) - { - Caption = 'Export Electronic Payment'; - - trigger OnValidate() - begin - TestField("Elect. Pmts Exported", false); - end; - } - } - - keys - { - key(Key1; "No.") - { - Clustered = true; - } - key(Key2; "Bank Account No.") - { - } - } - - fieldgroups - { - } - - trigger OnDelete() - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No."); - Doc.SetRange(Type, Doc.Type::Payable); - Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); - if Doc.FindFirst() then - Error(Text1100000); - - BGPOCommentLine.SetRange("BG/PO No.", "No."); - BGPOCommentLine.DeleteAll(); - end; - - trigger OnInsert() - var - NoSeries: Codeunit "No. Series"; - begin - if "No." = '' then begin - CarteraSetup.Get(); - CarteraSetup.TestField("Payment Order Nos."); - "No. Series" := CarteraSetup."Payment Order Nos."; - if NoSeries.AreRelated("No. Series", xRec."No. Series") then - "No. Series" := xRec."No. Series"; - "No." := NoSeries.GetNextNo("No. Series"); - end; - - if GetFilter("Bank Account No.") <> '' then - if GetRangeMin("Bank Account No.") = GetRangeMax("Bank Account No.") then begin - BankAcc.Get(GetRangeMin("Bank Account No.")); - Validate("Currency Code", BankAcc."Currency Code"); - Validate("Bank Account No.", BankAcc."No."); - end; - - CheckNoNotUsed(); - UpdateDescription(); - "Posting Date" := WorkDate(); - end; - - var - Text1100000: Label 'This Payment Order is not empty. Remove all its bills and invoices and try again.'; - Text1100001: Label 'can only be changed when the %1 is empty'; - Text1100002: Label 'The operation is not allowed for payment order using %1. Check your currency setup.'; - Text1100003: Label 'This payment order has already been printed. Proceed anyway?'; - Text1100004: Label 'The update has been interrupted by the user.'; - Text1100005: Label 'Payment Order'; - Text1100006: Label ' is currently in use in a Posted Payment Order.'; - Text1100007: Label ' is currently in use in a Closed Payment Order.'; - Text1100008: Label 'untitled'; - PmtOrd: Record "Payment Order"; - PostedPmtOrd: Record "Posted Payment Order"; - ClosedPmtOrd: Record "Closed Payment Order"; - Doc: Record "Cartera Doc."; - CarteraSetup: Record "Cartera Setup"; - Currency: Record Currency; - BankAcc: Record "Bank Account"; - BGPOCommentLine: Record "BG/PO Comment Line"; - Currencies: Page Currencies; - ExportAgainQst: Label 'The selected payment order has already been exported. Do you want to export again?'; - - [Scope('OnPrem')] - procedure AssistEdit(OldPmtOrd: Record "Payment Order"): Boolean - var - NoSeries: Codeunit "No. Series"; - begin - PmtOrd := Rec; - CarteraSetup.Get(); - CarteraSetup.TestField("Payment Order Nos."); - if NoSeries.LookupRelatedNoSeries(CarteraSetup."Payment Order Nos.", OldPmtOrd."No. Series", PmtOrd."No. Series") then begin - PmtOrd."No." := NoSeries.GetNextNo(PmtOrd."No. Series"); - Rec := PmtOrd; - exit(true); - end; - end; - - local procedure CheckPrinted() - begin - if "No. Printed" <> 0 then - if not Confirm(Text1100003) then - Error(Text1100004); - end; - - [Scope('OnPrem')] - procedure ResetPrinted() - begin - "No. Printed" := 0; - end; - - local procedure UpdateDescription() - begin - "Posting Description" := Text1100005 + ' ' + "No."; - end; - - local procedure CheckNoNotUsed() - begin - if PostedPmtOrd.Get("No.") then - FieldError("No.", PostedPmtOrd."No." + Text1100006); - if ClosedPmtOrd.Get("No.") then - FieldError("No.", ClosedPmtOrd."No." + Text1100007); - end; - - [Scope('OnPrem')] - procedure PrintRecords(ShowRequestForm: Boolean) - var - CarteraReportSelection: Record "Cartera Report Selections"; - begin - PmtOrd.Copy(Rec); - CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Payment Order"); - CarteraReportSelection.SetFilter("Report ID", '<>0'); - CarteraReportSelection.Find('-'); - repeat - REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, PmtOrd); - until CarteraReportSelection.Next() = 0; - end; - - local procedure PmtOrdIsEmpty(): Boolean - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No."); - Doc.SetRange(Type, Doc.Type::Payable); - Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); - exit(not Doc.FindFirst()) - end; - - procedure Caption(): Text - begin - if "No." = '' then - exit(Text1100008); - CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); - end; - - [Scope('OnPrem')] - procedure FilterSourceForExport(var GenJnlLine: Record "Gen. Journal Line") - begin - GenJnlLine.SetRange("Journal Template Name", ''); - GenJnlLine.SetRange("Journal Batch Name", ''); - GenJnlLine.SetRange("Document No.", "No."); - GenJnlLine."Bal. Account No." := "Bank Account No."; - end; - - [Scope('OnPrem')] - procedure ExportToFile() - var - GenJnlLine: Record "Gen. Journal Line"; - BankAccount: Record "Bank Account"; - begin - SetRecFilter(); - TestField("Export Electronic Payment", true); - - if "Elect. Pmts Exported" then - if not Confirm(ExportAgainQst) then - exit; - - BankAccount.Get("Bank Account No."); - FilterSourceForExport(GenJnlLine); - CODEUNIT.Run(BankAccount.GetPaymentExportCodeunitID(), GenJnlLine); - Find(); - Validate("Elect. Pmts Exported", true); - Modify(); - end; -} diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderListing.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderListing.Report.al deleted file mode 100644 index 18502623861..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderListing.Report.al +++ /dev/null @@ -1,407 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Foundation.Company; -using Microsoft.Purchases.Vendor; -using System.Utilities; - -report 7000010 "Payment Order Listing" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Purchases/Payables/PaymentOrderListing.rdlc'; - ApplicationArea = Basic, Suite; - Caption = 'Payment Order Listing'; - Permissions = TableData "Payment Order" = r; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem(PmtOrd; "Payment Order") - { - DataItemTableView = sorting("No."); - PrintOnlyIfDetail = true; - RequestFilterFields = "No."; - column(PmtOrd_No_; "No.") - { - } - dataitem(CopyLoop; "Integer") - { - DataItemTableView = sorting(Number); - dataitem(PageLoop; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(PmtOrd__No__; PmtOrd."No.") - { - } - column(STRSUBSTNO_Text1100001_CopyText_; StrSubstNo(Text1100001, CopyText)) - { - } - column(CompanyAddr_1_; CompanyAddr[1]) - { - } - column(CompanyAddr_2_; CompanyAddr[2]) - { - } - column(CompanyAddr_3_; CompanyAddr[3]) - { - } - column(CompanyAddr_4_; CompanyAddr[4]) - { - } - column(CompanyAddr_5_; CompanyAddr[5]) - { - } - column(CompanyAddr_6_; CompanyAddr[6]) - { - } - column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") - { - } - column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") - { - } - column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") - { - } - column(PmtOrd__Posting_Date_; Format(PmtOrd."Posting Date")) - { - } - column(BankAccAddr_4_; BankAccAddr[4]) - { - } - column(BankAccAddr_5_; BankAccAddr[5]) - { - } - column(BankAccAddr_6_; BankAccAddr[6]) - { - } - column(BankAccAddr_7_; BankAccAddr[7]) - { - } - column(BankAccAddr_3_; BankAccAddr[3]) - { - } - column(BankAccAddr_2_; BankAccAddr[2]) - { - } - column(BankAccAddr_1_; BankAccAddr[1]) - { - } - column(PmtOrd__Currency_Code_; PmtOrd."Currency Code") - { - } - column(PrintAmountsInLCY; PrintAmountsInLCY) - { - } - column(OutputNo; OutputNo) - { - } - column(PageLoop_Number; Number) - { - } - column(PmtOrd__No__Caption; PmtOrd__No__CaptionLbl) - { - } - column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) - { - } - column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) - { - } - column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) - { - } - column(PmtOrd__Posting_Date_Caption; PmtOrd__Posting_Date_CaptionLbl) - { - } - column(PmtOrd__Currency_Code_Caption; PmtOrd__Currency_Code_CaptionLbl) - { - } - column(PageCaption; PageCaptionLbl) - { - } - dataitem("Cartera Doc."; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = PmtOrd; - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Payable)); - column(PmtOrdAmount; PmtOrdAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(PmtOrdAmount_Control23; PmtOrdAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Vend_City; Vend.City) - { - } - column(Vend_County; Vend.County) - { - } - column(Vend__Post_Code_; Vend."Post Code") - { - } - column(Vend_Name; Vend.Name) - { - } - column(Cartera_Doc___Account_No__; "Account No.") - { - } - column(Cartera_Doc___Document_No__; "Document No.") - { - } - column(Cartera_Doc___Due_Date_; Format("Due Date")) - { - } - column(Cartera_Doc___Document_Type_; "Document Type") - { - } - column(Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill; "Document Type" <> "Document Type"::Bill) - { - } - column(Vend_Name_Control28; Vend.Name) - { - } - column(Vend_City_Control30; Vend.City) - { - } - column(PmtOrdAmount_Control31; PmtOrdAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Vend_County_Control35; Vend.County) - { - } - column(Cartera_Doc___Document_No___Control3; "Document No.") - { - } - column(Cartera_Doc___No__; "No.") - { - } - column(Vend__Post_Code__Control9; Vend."Post Code") - { - } - column(Cartera_Doc___Due_Date__Control8; Format("Due Date")) - { - } - column(Cartera_Doc___Account_No___Control1; "Account No.") - { - } - column(Cartera_Doc___Document_Type__Control66; "Document Type") - { - } - column(Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill; "Document Type" = "Document Type"::Bill) - { - } - column(PmtOrdAmount_Control36; PmtOrdAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(PmtOrdAmount_Control39; PmtOrdAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Cartera_Doc__Type; Type) - { - } - column(Cartera_Doc__Entry_No_; "Entry No.") - { - } - column(Cartera_Doc__Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") - { - } - column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) - { - } - column(VendorNoCaption; VendorNoCaptionLbl) - { - } - column(Vend_Name_Control28Caption; Vend_Name_Control28CaptionLbl) - { - } - column(Vend__Post_Code__Control9Caption; Vend__Post_Code__Control9CaptionLbl) - { - } - column(Vend_City_Control30Caption; Vend_City_Control30CaptionLbl) - { - } - column(PmtOrdAmount_Control31Caption; PmtOrdAmount_Control31CaptionLbl) - { - } - column(Vend_County_Control35Caption; Vend_County_Control35CaptionLbl) - { - } - column(Cartera_Doc___Due_Date__Control8Caption; Cartera_Doc___Due_Date__Control8CaptionLbl) - { - } - column(Bill_No_Caption; Bill_No_CaptionLbl) - { - } - column(Document_No_Caption; Document_No_CaptionLbl) - { - } - column(Cartera_Doc___Document_Type__Control66Caption; FieldCaption("Document Type")) - { - } - column(ContinuedCaption; ContinuedCaptionLbl) - { - } - column(EmptyStringCaption; EmptyStringCaptionLbl) - { - } - column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) - { - } - column(TotalCaption; TotalCaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - Vend.Get("Account No."); - - if PrintAmountsInLCY then - PmtOrdAmount := "Remaining Amt. (LCY)" - else - PmtOrdAmount := "Remaining Amount"; - end; - - trigger OnPreDataItem() - begin - Clear(PmtOrdAmount); - end; - } - } - - trigger OnAfterGetRecord() - begin - if Number > 1 then begin - CopyText := Text1100000; - OutputNo += 1; - end; - end; - - trigger OnPreDataItem() - begin - NoOfLoops := Abs(NoOfCopies) + 1; - CopyText := ''; - SetRange(Number, 1, NoOfLoops); - OutputNo := 1; - end; - } - - trigger OnAfterGetRecord() - begin - BankAcc.Get(PmtOrd."Bank Account No."); - FormatAddress.FormatAddr( - BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", - BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); - - if not CurrReport.Preview then - PrintCounter.PrintCounter(DATABASE::"Payment Order", "No."); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - FormatAddress.Company(CompanyAddr, CompanyInfo); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(NoOfCopies; NoOfCopies) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Copies'; - ToolTip = 'Specifies how many copies of the document to print.'; - } - field(PrintAmountsInLCY; PrintAmountsInLCY) - { - ApplicationArea = Basic, Suite; - Caption = 'Show amounts in LCY'; - ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - var - Text1100000: Label 'COPY'; - Text1100001: Label 'Payment Order %1'; - CompanyInfo: Record "Company Information"; - BankAcc: Record "Bank Account"; - Vend: Record Vendor; - FormatAddress: Codeunit "Format Address"; - PrintCounter: Codeunit "BG/PO-Post and Print"; - BankAccAddr: array[8] of Text[100]; - CompanyAddr: array[8] of Text[100]; - NoOfLoops: Integer; - NoOfCopies: Integer; - CopyText: Text[30]; - PrintAmountsInLCY: Boolean; - PmtOrdAmount: Decimal; - OutputNo: Integer; - PmtOrd__No__CaptionLbl: Label 'Payment Order No.'; - CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; - CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; - CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; - PmtOrd__Posting_Date_CaptionLbl: Label 'Date'; - PmtOrd__Currency_Code_CaptionLbl: Label 'Currency Code'; - PageCaptionLbl: Label 'Page'; - All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; - VendorNoCaptionLbl: Label 'Vendor No.'; - Vend_Name_Control28CaptionLbl: Label 'Name'; - Vend__Post_Code__Control9CaptionLbl: Label 'Post Code'; - Vend_City_Control30CaptionLbl: Label 'City /'; - PmtOrdAmount_Control31CaptionLbl: Label 'Remaining Amount'; - Vend_County_Control35CaptionLbl: Label 'County'; - Cartera_Doc___Due_Date__Control8CaptionLbl: Label 'Due Date'; - Bill_No_CaptionLbl: Label 'Bill No.'; - Document_No_CaptionLbl: Label 'Document No.'; - ContinuedCaptionLbl: Label 'Continued'; - EmptyStringCaptionLbl: Label '/', Locked = true; - ContinuedCaption_Control15Lbl: Label 'Continued'; - TotalCaptionLbl: Label 'Total'; - - [Scope('OnPrem')] - procedure GetCurrencyCode(): Code[10] - begin - if PrintAmountsInLCY then - exit(''); - - exit("Cartera Doc."."Currency Code"); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderListing.rdlc b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderListing.rdlc deleted file mode 100644 index 63ce8be24d3..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderListing.rdlc +++ /dev/null @@ -1,2694 +0,0 @@ - - - 0 - - - - SQL - - - None - 0d7aeed8-91f0-4e82-bb5b-3a5a7c351610 - - - - - - - - - - - 17cm - - - - - 4.01892cm - - - - - - - - - - 1.425cm - - - 1.25cm - - - 1.65cm - - - 0.15cm - - - 0.7cm - - - 1.65cm - - - 3.45cm - - - 1.65cm - - - 2.35cm - - - 2.7cm - - - - - 0.423cm - - - - - true - - - - - =Fields!All_amounts_are_in_LCYCaption.Value - - - - - - 52 - - =NOT Fields!PrintAmountsInLCY.Value - - NoOutput - - - 6 - - - - - - - - - - - true - - - - - =Fields!PrintAmountsInLCY.Value - - - - - - textbox20 - 51 - - true - - - - 4 - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!Cartera_Doc___Due_Date__Control8Caption.Value) - - - - - - - 47 - - - - - - - - true - - - - - =First(Fields!Cartera_Doc___Document_Type__Control66Caption.Value) - - - - - - 46 - - - - - - - - true - - - - - =First(Fields!Document_No_Caption.Value) - - - - - - - 45 - - - - - - - - true - - - - - - - - - - - - - true - - - - - =First(Fields!Bill_No_Caption.Value) - - - - - - - 43 - - - - - - - - true - - - - - =First(Fields!VendorNoCaption.Value) - - - - - - - 42 - - - - - - - - true - - - - - =First(Fields!Vend_Name_Control28Caption.Value) - - - - - - 41 - - - - - - - - true - - - - - =First(Fields!Vend__Post_Code__Control9Caption.Value) - - - - - - 40 - - - - - - - - true - - - - - =First(Fields!Vend_City_Control30Caption.Value) + Chr(10) + First(Fields!Vend_County_Control35Caption.Value) - - - - - - 39 - - - - - - - - true - - - - - =First(Fields!PmtOrdAmount_Control31Caption.Value) - - - - - - - 38 - - - - - - - - 0.423cm - - - - - true - - - - - - - - 10 - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!Cartera_Doc___Due_Date_.Value - - - - - - 27 - - - - - - - - true - - - - - =Fields!Cartera_Doc___Document_Type_.Value - - - - - - 26 - - - - - - - - true - - - - - =Fields!Cartera_Doc___Document_No__.Value - - - - - - - 25 - - - - - - - - true - - - - - =Fields!EmptyStringCaption.Value - - - - - - 24 - - =IIF(Fields!Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill.Value,False,True) - - NoOutput - - - - - - - - true - - - - - =Fields!Cartera_Doc___No__.Value - - - - - - - 23 - - =IIF(Fields!Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill.Value,False,True) - - NoOutput - - - - - - - - true - - - - - =Fields!Cartera_Doc___Account_No__.Value - - - - - - - 22 - - - - - - - - true - - - - - =Fields!Vend_Name.Value - - - - - - 21 - - - - - - - - true - - - - - =Fields!Vend__Post_Code_.Value - - - - - - - 20 - - - - - - - - true - - - - - =Fields!Vend_City.Value - - - - - - 19 - - - - - - - - true - true - - - - - =Fields!PmtOrdAmount.Value - - - - - - 18 - - - - - - - - 0.423cm - - - - - true - - - - - - - - 8 - - - - - - - - - - - - - true - - - - - =Fields!Vend_County.Value - - - - - - 1 - - - - - - - - true - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - textbox48 - - - 10 - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =First(Fields!TotalCaption.Value) - - - - - - 17 - - - 3 - - - - - - - - true - - - - - - - - - - - textbox2 - 16 - - - 6 - - - - - - - - - - - true - true - - - - - =Sum(Fields!PmtOrdAmount.Value) - - - - - - 10 - - - - - - - - - - - - - - - - - - - - - - - - - - After - true - true - - - After - true - true - - - After - true - true - - - - - =Fields!PmtOrd_No_.Value - - - - - - Detail - - - - - - Detail_Collection - Output - true - - - Before - true - - - Before - true - - - - - - DataSet_Result - 0.63492cm - 6.68391in - 27 - - - true - - - - - =Fields!BankAccAddr_1_.Value - - - - - - 0.423cm - 0.5cm - 26 - - true - - - - - true - - - - - =Fields!PmtOrd__No__.Value - - - - - - - 14.60317cm - 0.423cm - 0.5cm - 25 - - true - - - - - true - - - - - =Fields!STRSUBSTNO_Text1100001_CopyText_.Value - - - - - - 4.44444cm - 0.423cm - 0.5cm - 24 - - true - - - - - true - - - - - =Fields!CompanyAddr_1_.Value - - - - - - 5.71429cm - 0.423cm - 0.5cm - 23 - - true - - - - - true - - - - - =Fields!CompanyAddr_2_.Value - - - - - - 6.34921cm - 0.423cm - 0.5cm - 22 - - true - - - - - true - - - - - =Fields!CompanyAddr_3_.Value - - - - - - 6.98413cm - 0.423cm - 0.5cm - 21 - - true - - - - - true - - - - - =Fields!CompanyAddr_4_.Value - - - - - - 7.61905cm - 0.423cm - 0.5cm - 20 - - true - - - - - true - - - - - =Fields!CompanyAddr_5_.Value - - - - - - 8.25397cm - 0.423cm - 0.5cm - 19 - - true - - - - - true - - - - - =Fields!CompanyAddr_6_.Value - - - - - - 8.88889cm - 0.423cm - 0.5cm - 18 - - true - - - - - true - - - - - =Fields!CompanyInfo__Phone_No__.Value - - - - - - 11.42857cm - 0.423cm - 0.5cm - 17 - - true - - - - - true - - - - - =Fields!CompanyInfo__Fax_No__.Value - - - - - - 12.06349cm - 0.423cm - 0.5cm - 16 - - true - - - - - true - - - - - =Fields!CompanyInfo__VAT_Registration_No__.Value - - - - - - 12.69841cm - 0.423cm - 0.5cm - 15 - - true - - - - - true - - - - - =Fields!PmtOrd__Posting_Date_.Value - - - - - - - 16.50794cm - 0.423cm - 14 - - true - - - - - true - - - - - =Fields!BankAccAddr_4_.Value - - - - - - 0.75in - 0.423cm - 0.5cm - 13 - - true - - - - - true - - - - - =Fields!BankAccAddr_5_.Value - - - - - - 1in - 0.423cm - 0.5cm - 12 - - true - - - - - true - - - - - =Fields!BankAccAddr_6_.Value - - - - - - 1.25in - 0.423cm - 0.5cm - 11 - - true - - - - - true - - - - - =Fields!BankAccAddr_7_.Value - - - - - - 1.5in - 0.423cm - 0.5cm - 10 - - true - - - - - true - - - - - =Fields!BankAccAddr_3_.Value - - - - - - 0.5in - 0.423cm - 0.5cm - 9 - - true - - - - - true - - - - - =Fields!BankAccAddr_2_.Value - - - - - - 0.25in - 0.423cm - 0.5cm - 8 - - true - - - - - true - - - - - =Fields!PmtOrd__Currency_Code_.Value - - - - - - - 15.2381cm - 0.423cm - 0.5cm - 7 - - true - - - - - true - - - - - =Fields!PmtOrd__No__Caption.Value - - - - - - 13.33333cm - 0.423cm - 0.5cm - 6 - - true - - - - - true - - - - - =Fields!CompanyInfo__Phone_No__Caption.Value - - - - - - 9.52381cm - 0.423cm - 0.5cm - 5 - - true - - - - - true - - - - - =Fields!CompanyInfo__Fax_No__Caption.Value - - - - - - 10.15873cm - 0.423cm - 0.5cm - 4 - - true - - - - - true - - - - - =Fields!CompanyInfo__VAT_Registration_No__Caption.Value - - - - - - 10.79365cm - 0.423cm - 0.5cm - 3 - - true - - - - - true - - - - - =Fields!PmtOrd__Posting_Date_Caption.Value - - - - - - 15.87302cm - 0.423cm - 0.5cm - 2 - - true - - - - - true - - - - - =Fields!PmtOrd__Currency_Code_Caption.Value - - - - - - 13.96825cm - 0.423cm - 0.5cm - 1 - - true - - - - - true - - - - - - - - - - - - - - - - - - =Fields!OutputNo.Value - =Fields!PmtOrd_No_.Value - - - Between - - - Output - true - - - - - End - - - - 4.01892cm - - 17cm - - - 2.83146in - true - true - - - true - - - - - =Code.SetCaption(ReportItems!PmtOrd__No__1.Value,24) - - - - - - - 5.499cm - 13.33333cm - 0.423cm - 2.7cm - 26 - - - - true - - - - - =Code.SetCaption(ReportItems!STRSUBSTNO_Text1100001_CopyText_1.Value,8) - - - - - - 10.18333cm - 0.423cm - 6.3cm - 25 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyAddr_1_1.Value,10) - - - - - - 1.269cm - 10.18333cm - 0.423cm - 6.3cm - 24 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyAddr_2_1.Value,11) - - - - - - 1.692cm - 10.18333cm - 0.423cm - 6.3cm - 23 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyAddr_3_1.Value,12) - - - - - - 2.115cm - 10.18333cm - 0.423cm - 6.3cm - 22 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyAddr_4_1.Value,13) - - - - - - 2.538cm - 10.18333cm - 0.423cm - 6.3cm - 21 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyAddr_5_1.Value,14) - - - - - - 2.961cm - 10.18333cm - 0.423cm - 6.3cm - 20 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyAddr_6_1.Value,15) - - - - - - 3.384cm - 10.18333cm - 0.423cm - 6.3cm - 19 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyInfo__Phone_No__1.Value,19) - - - - - - 3.807cm - 12.28333cm - 0.423cm - 4.2cm - 18 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyInfo__Fax_No__1.Value,20) - - - - - - 4.23cm - 12.28333cm - 0.423cm - 4.2cm - 17 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyInfo__VAT_Registration_No__1.Value,21) - - - - - - 4.653cm - 12.28333cm - 0.423cm - 4.2cm - 16 - - - - true - - - - - =Code.SetCaption(ReportItems!PmtOrd__Posting_Date_1.Value,27) - - - - - - - 6.768cm - 13.54333cm - 1.8cm - 15 - - - - true - - - - - =Code.SetCaption(ReportItems!PmtOrd__Currency_Code_1.Value,25) - - - - - - - 5.922cm - 13.33333cm - 0.423cm - 2.7cm - 14 - - =ReportItems!textbox20.Value - - NoOutput - - - - true - - - - - =Code.SetCaption(ReportItems!PmtOrd__No__Caption1.Value,22) - - - - - - 5.499cm - 10.18333cm - 0.423cm - 3cm - 13 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyInfo__Phone_No__Caption1.Value,16) - - - - - - 3.807cm - 10.18333cm - 0.423cm - 1.89cm - 12 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyInfo__Fax_No__Caption1.Value,17) - - - - - - 4.23cm - 10.18333cm - 0.423cm - 1.89cm - 11 - - - - true - - - - - =Code.SetCaption(ReportItems!CompanyInfo__VAT_Registration_No__Caption1.Value,18) - - - - - - 4.653cm - 10.18333cm - 0.423cm - 1.89cm - 10 - - - - true - - - - - =Code.SetCaption(ReportItems!PmtOrd__Posting_Date_Caption1.Value,26) - - - - - - 6.768cm - 10.18333cm - 3.15cm - 9 - - - - true - - - - - =Code.SetCaption(ReportItems!PmtOrd__Currency_Code_Caption1.Value,23) - - - - - - 5.922cm - 10.18333cm - 0.423cm - 3cm - 8 - - - - true - - - - - - - - - - - - 0.423cm - 10.63333cm - 0.423cm - 1.8cm - 7 - - - - true - - - - - =Code.SetCaption(ReportItems!BankAccAddr_1_1.Value,1) - - - - - - 1.269cm - 0.423cm - 4.5cm - 6 - - - - true - - - - - =Code.SetCaption(ReportItems!BankAccAddr_4_1.Value,4) - - - - - - 2.538cm - 0.423cm - 4.5cm - 5 - - - - true - - - - - =Code.SetCaption(ReportItems!BankAccAddr_5_1.Value,5) - - - - - - 2.961cm - 0.423cm - 4.5cm - 4 - - - - true - - - - - =Code.SetCaption(ReportItems!BankAccAddr_6_1.Value,6) - - - - - - 3.384cm - 0.423cm - 4.5cm - 3 - - - - true - - - - - =Code.SetCaption(ReportItems!BankAccAddr_7_1.Value,7) - - - - - - 3.807cm - 0.423cm - 4.5cm - 2 - - - - true - - - - - =Code.SetCaption(ReportItems!BankAccAddr_3_1.Value,3) - - - - - - 2.115cm - 0.423cm - 4.5cm - 1 - - - - true - - - - - =Code.SetCaption(ReportItems!BankAccAddr_2_1.Value,2) - - - - - - 1.692cm - 0.423cm - 4.5cm - - - - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - -Public Shared CP(27) -Public Function SetCaption(ByVal Newdata As string,ByVal Number As Integer) - if Newdata<>Nothing then - CP(Number) = Newdata - end if - Return CP(Number) -End Function - =User!Language - true - Invalid - ee8b958e-f6fc-4351-abb3-b79349c8c91d - - - - - PmtOrd_No_ - - - PmtOrd__No__ - - - STRSUBSTNO_Text1100001_CopyText_ - - - CompanyAddr_1_ - - - CompanyAddr_2_ - - - CompanyAddr_3_ - - - CompanyAddr_4_ - - - CompanyAddr_5_ - - - CompanyAddr_6_ - - - CompanyInfo__Phone_No__ - - - CompanyInfo__Fax_No__ - - - CompanyInfo__VAT_Registration_No__ - - - PmtOrd__Posting_Date_ - - - BankAccAddr_4_ - - - BankAccAddr_5_ - - - BankAccAddr_6_ - - - BankAccAddr_7_ - - - BankAccAddr_3_ - - - BankAccAddr_2_ - - - BankAccAddr_1_ - - - PmtOrd__Currency_Code_ - - - PrintAmountsInLCY - - - OutputNo - - - PageLoop_Number - - - PmtOrd__No__Caption - - - CompanyInfo__Phone_No__Caption - - - CompanyInfo__Fax_No__Caption - - - CompanyInfo__VAT_Registration_No__Caption - - - PmtOrd__Posting_Date_Caption - - - PmtOrd__Currency_Code_Caption - - - PageCaption - - - PmtOrdAmount - - - PmtOrdAmountFormat - - - PmtOrdAmount_Control23 - - - PmtOrdAmount_Control23Format - - - Vend_City - - - Vend_County - - - Vend__Post_Code_ - - - Vend_Name - - - Cartera_Doc___Account_No__ - - - Cartera_Doc___Document_No__ - - - Cartera_Doc___Due_Date_ - - - Cartera_Doc___Document_Type_ - - - Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill - - - Vend_Name_Control28 - - - Vend_City_Control30 - - - PmtOrdAmount_Control31 - - - PmtOrdAmount_Control31Format - - - Vend_County_Control35 - - - Cartera_Doc___Document_No___Control3 - - - Cartera_Doc___No__ - - - Vend__Post_Code__Control9 - - - Cartera_Doc___Due_Date__Control8 - - - Cartera_Doc___Account_No___Control1 - - - Cartera_Doc___Document_Type__Control66 - - - Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill - - - PmtOrdAmount_Control36 - - - PmtOrdAmount_Control36Format - - - PmtOrdAmount_Control39 - - - PmtOrdAmount_Control39Format - - - Cartera_Doc__Type - - - Cartera_Doc__Entry_No_ - - - Cartera_Doc__Bill_Gr__Pmt__Order_No_ - - - All_amounts_are_in_LCYCaption - - - VendorNoCaption - - - Vend_Name_Control28Caption - - - Vend__Post_Code__Control9Caption - - - Vend_City_Control30Caption - - - PmtOrdAmount_Control31Caption - - - Vend_County_Control35Caption - - - Cartera_Doc___Due_Date__Control8Caption - - - Bill_No_Caption - - - Document_No_Caption - - - Cartera_Doc___Document_Type__Control66Caption - - - ContinuedCaption - - - EmptyStringCaption - - - ContinuedCaption_Control15 - - - TotalCaption - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderTest.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderTest.Report.al deleted file mode 100644 index 9cc45f76053..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderTest.Report.al +++ /dev/null @@ -1,637 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Purchases.Vendor; -using System.Utilities; - -report 7000009 "Payment Order - Test" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Purchases/Payables/PaymentOrderTest.rdlc'; - Caption = 'Payment Order - Test'; - - dataset - { - dataitem(PmtOrd; "Payment Order") - { - RequestFilterFields = "No."; - column(PmtOrd_No_; "No.") - { - } - column(PmtOrd_Bank_Account_No_; "Bank Account No.") - { - } - column(PmtOrd_Currency_Code; "Currency Code") - { - } - dataitem(PageCounter; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(USERID; UserId) - { - } - column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) - { - } - column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) - { - } - column(PmtOrd_TABLECAPTION__________PmtOrdFilter; PmtOrd.TableCaption + ':' + PmtOrdFilter) - { - } - column(PmtOrd_TABLECAPTION_________PmtOrd__No__; PmtOrd.TableCaption + ' ' + PmtOrd."No.") - { - } - column(BankAccAddr_1_; BankAccAddr[1]) - { - } - column(BankAccAddr_2_; BankAccAddr[2]) - { - } - column(BankAccAddr_3_; BankAccAddr[3]) - { - } - column(BankAccAddr_4_; BankAccAddr[4]) - { - } - column(BankAccAddr_5_; BankAccAddr[5]) - { - } - column(BankAccAddr_6_; BankAccAddr[6]) - { - } - column(BankAccAddr_7_; BankAccAddr[7]) - { - } - column(PmtOrd__Bank_Account_Name_; PmtOrd."Bank Account Name") - { - } - column(Posting_Date; Format(PmtOrd."Posting Date")) - { - } - column(PmtOrd__Posting_Description_; PmtOrd."Posting Description") - { - } - column(PostingGroup; PostingGroup) - { - } - column(PmtOrd__Currency_Code_; PmtOrd."Currency Code") - { - } - column(PageCounter_Number; Number) - { - } - column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) - { - } - column(Payment_Order___TestCaption; Payment_Order___TestCaptionLbl) - { - } - column(PmtOrd__Bank_Account_Name_Caption; PmtOrd__Bank_Account_Name_CaptionLbl) - { - } - column(PmtOrd__Posting_Date_Caption; PmtOrd__Posting_Date_CaptionLbl) - { - } - column(PmtOrd__Posting_Description_Caption; PmtOrd__Posting_Description_CaptionLbl) - { - } - column(PostingGroupCaption; PostingGroupCaptionLbl) - { - } - column(PmtOrd__Currency_Code_Caption; PmtOrd__Currency_Code_CaptionLbl) - { - } - dataitem(HeaderErrorCounter; "Integer") - { - DataItemTableView = sorting(Number); - column(ErrorText_Number_; ErrorText[Number]) - { - } - column(HeaderErrorCounter_Number; Number) - { - } - column(ErrorText_Number_Caption; ErrorText_Number_CaptionLbl) - { - } - - trigger OnPostDataItem() - begin - ErrorCounter := 0; - end; - - trigger OnPreDataItem() - begin - SetRange(Number, 1, ErrorCounter); - end; - } - dataitem(Doc; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = PmtOrd; - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Payable)); - column(Doc__Remaining_Amount_; "Remaining Amount") - { - AutoFormatExpression = "Currency Code"; - AutoFormatType = 1; - } - column(Vend_City; Vend.City) - { - } - column(Vend_County; Vend.County) - { - } - column(Vend__Post_Code_; Vend."Post Code") - { - } - column(Vend_Name; Vend.Name) - { - } - column(Doc__Account_No__; "Account No.") - { - } - column(Doc__Document_No__; "Document No.") - { - } - column(Doc__Due_Date_; Format("Due Date")) - { - } - column(Doc__Document_Type_; "Document Type") - { - } - column(DocumentTypeBill; "Document Type" = "Document Type"::Bill) - { - } - column(DocumentTypeInvoice; "Document Type" = "Document Type"::Invoice) - { - } - column(Doc__Due_Date__Control44; Format("Due Date")) - { - } - column(Doc__Document_No___Control46; "Document No.") - { - } - column(Doc__No__; "No.") - { - } - column(Doc__Account_No___Control50; "Account No.") - { - } - column(Vend_Name_Control52; Vend.Name) - { - } - column(Vend__Post_Code__Control53; Vend."Post Code") - { - } - column(Vend_City_Control54; Vend.City) - { - } - column(Vend_County_Control55; Vend.County) - { - } - column(Doc__Remaining_Amount__Control35; "Remaining Amount") - { - AutoFormatExpression = "Currency Code"; - AutoFormatType = 1; - } - column(Doc__Document_Type__Control26; "Document Type") - { - } - column(Doc_Type; Type) - { - } - column(Doc_Entry_No_; "Entry No.") - { - } - column(Doc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") - { - } - column(Vend_Name_Control52Caption; Vend_Name_Control52CaptionLbl) - { - } - column(Post_CodeCaption; Post_CodeCaptionLbl) - { - } - column(City__Caption; City__CaptionLbl) - { - } - column(CountyCaption; CountyCaptionLbl) - { - } - column(Doc__Due_Date__Control44Caption; Doc__Due_Date__Control44CaptionLbl) - { - } - column(Doc__Document_No___Control46Caption; FieldCaption("Document No.")) - { - } - column(Doc__No__Caption; Doc__No__CaptionLbl) - { - } - column(Vendor_No_Caption; Vendor_No_CaptionLbl) - { - } - column(Doc__Remaining_Amount__Control35Caption; FieldCaption("Remaining Amount")) - { - } - column(Doc__Document_Type__Control26Caption; FieldCaption("Document Type")) - { - } - dataitem(LineErrorCounter; "Integer") - { - DataItemTableView = sorting(Number); - column(ErrorText_Number__Control56; ErrorText[Number]) - { - } - column(LineErrorCounter_Number; Number) - { - } - column(ErrorText_Number__Control56Caption; ErrorText_Number__Control56CaptionLbl) - { - } - - trigger OnPostDataItem() - begin - ErrorCounter := 0; - end; - - trigger OnPreDataItem() - begin - SetRange(Number, 1, ErrorCounter); - end; - } - - trigger OnAfterGetRecord() - begin - Vend.Get("Account No."); - - DocCount := DocCount + 1; - - if "Collection Agent" <> "Collection Agent"::Bank then - AddError(StrSubstNo(Text1100007, FieldCaption("Collection Agent"), "Collection Agent"::Bank)); - - if "Currency Code" <> PmtOrd."Currency Code" then - AddError(StrSubstNo(Text1100008, FieldCaption("Currency Code"), PmtOrd."Currency Code")); - - if "Remaining Amt. (LCY)" = 0 then - AddError(StrSubstNo(Text1100009, FieldCaption("Remaining Amt. (LCY)"))); - - if Type <> Type::Payable then - AddError(StrSubstNo(Text1100008, FieldCaption(Type), Type::Receivable)); - - if Accepted = Accepted::No then - AddError(StrSubstNo(Text1100010, FieldCaption(Accepted), false)); - - VendLedgEntry.Get("Entry No."); - VendPostingGr.Get(VendLedgEntry."Vendor Posting Group"); - if "Document Type" = "Document Type"::Bill then begin - if VendPostingGr."Bills in Payment Order Acc." = '' then - AddError( - StrSubstNo( - Text1100011, - VendPostingGr.FieldCaption("Bills in Payment Order Acc."), - VendPostingGr.TableCaption(), - VendPostingGr.Code)); - AccountNo := VendPostingGr."Bills in Payment Order Acc."; - end else begin - if VendPostingGr."Invoices in Pmt. Ord. Acc." = '' then - AddError( - StrSubstNo( - Text1100011, - VendPostingGr.FieldCaption("Invoices in Pmt. Ord. Acc."), - VendPostingGr.TableCaption(), - VendPostingGr.Code)); - AccountNo := VendPostingGr."Invoices in Pmt. Ord. Acc."; - end; - - NoOfDays := "Due Date" - PmtOrd."Posting Date"; - if NoOfDays < 0 then - NoOfDays := 0; - - if CalcExpenses then - FeeRange.CalcPmtOrdCollExpensesAmt( - BankAcc2."Operation Fees Code", - BankAcc2."Currency Code", - "Remaining Amount", - "Entry No."); - - if CheckOtherBanks then begin - if DocPostBuffer.Find('+') then; - DocPostBuffer."Entry No." := DocPostBuffer."Entry No." + 1; - DocPostBuffer."No. of Days" := NoOfDays; - DocPostBuffer.Amount := "Remaining Amt. (LCY)"; - DocPostBuffer.Insert(); - end; - - if VendPostingGr."Bills Account" = '' then - AddError( - StrSubstNo( - Text1100011, - VendPostingGr.FieldCaption("Bills Account"), - VendPostingGr.TableCaption(), - VendPostingGr.Code)); - - BalanceAccNo := VendPostingGr."Bills Account"; - if BGPOPostBuffer.Get(AccountNo, BalanceAccNo) then begin - BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; - BGPOPostBuffer.Modify(); - end else begin - BGPOPostBuffer.Account := AccountNo; - BGPOPostBuffer."Balance Account" := BalanceAccNo; - BGPOPostBuffer.Amount := "Remaining Amount"; - BGPOPostBuffer.Insert(); - end; - end; - - trigger OnPreDataItem() - begin - Clear(DocPostBuffer); - - if CalcExpenses then - FeeRange.InitPmtOrdCollExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); - - DocCount := 0; - end; - } - dataitem(Total; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(DocCount; DocCount) - { - } - column(PmtOrd_Amount; PmtOrd.Amount) - { - AutoFormatExpression = PmtOrd."Currency Code"; - AutoFormatType = 1; - } - column(Total_Number; Number) - { - } - column(No__of_DocumentsCaption; No__of_DocumentsCaptionLbl) - { - } - column(TotalCaption; TotalCaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - PmtOrd.CalcFields(Amount); - end; - } - } - dataitem("Integer"; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(Integer_Number; Number) - { - } - column(FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Caption; FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89CaptionLbl) - { - } - column(Payment_Order_Expenses_Amt_Caption; Payment_Order_Expenses_Amt_CaptionLbl) - { - } - column(BankAcc__No__Caption; BankAcc__No__CaptionLbl) - { - } - dataitem(BillGrBankAcc; "Bank Account") - { - DataItemLink = "No." = field("Bank Account No."); - DataItemLinkReference = PmtOrd; - DataItemTableView = sorting("No."); - column(FeeRange_GetTotalPmtOrdCollExpensesAmt; FeeRange.GetTotalPmtOrdCollExpensesAmt()) - { - AutoFormatExpression = PmtOrd."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalPmtOrdCollExpensesAmt_Control92; FeeRange.GetTotalPmtOrdCollExpensesAmt()) - { - AutoFormatExpression = PmtOrd."Currency Code"; - AutoFormatType = 1; - } - column(BillGrBankAcc__No__; "No.") - { - } - - trigger OnAfterGetRecord() - begin - CalcFields("Posted Receiv. Bills Rmg. Amt."); - RiskIncGr := "Posted Receiv. Bills Rmg. Amt."; - - if not CalcExpenses then - CurrReport.Break(); - end; - } - dataitem(BankAcc; "Bank Account") - { - DataItemLink = "Currency Code" = field("Currency Code"); - DataItemLinkReference = PmtOrd; - DataItemTableView = sorting("No."); - RequestFilterFields = "No."; - column(FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88; FeeRange.GetTotalPmtOrdCollExpensesAmt()) - { - AutoFormatExpression = PmtOrd."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89; FeeRange.GetTotalPmtOrdCollExpensesAmt()) - { - AutoFormatExpression = PmtOrd."Currency Code"; - AutoFormatType = 1; - } - column(BankAcc__No__; "No.") - { - } - column(BankAcc_Currency_Code; "Currency Code") - { - } - - trigger OnAfterGetRecord() - begin - if "No." = PmtOrd."Bank Account No." then - CurrReport.Skip(); - - CalcFields("Posted Receiv. Bills Rmg. Amt."); - RiskIncGr := "Posted Receiv. Bills Rmg. Amt."; - - if not DocPostBuffer.Find('-') then - CurrReport.Skip(); - - Clear(FeeRange); - if not FeeRange.Find('=<>') then - CurrReport.Skip(); - FeeRange.InitCollExpenses("Operation Fees Code", "Currency Code"); - repeat - FeeRange.CalcCollExpensesAmt( - "Operation Fees Code", - "Currency Code", - DocPostBuffer.Amount, - DocPostBuffer."Entry No."); - until DocPostBuffer.Next() = 0; - end; - } - } - - trigger OnAfterGetRecord() - begin - Clear(BankAcc2); - Clear(PostingGroup); - Clear(CalcExpenses); - - if BankAcc2.Get(PmtOrd."Bank Account No.") then begin - if BankAcc2."Currency Code" <> PmtOrd."Currency Code" then - AddError( - StrSubstNo( - Text1100000, - BankAcc2.FieldCaption("Currency Code"), - PmtOrd."Currency Code", - BankAcc2.TableCaption, - BankAcc2."No.")); - if BankAcc2."Operation Fees Code" = '' then - AddError( - StrSubstNo( - Text1100001, - BankAcc2.FieldCaption("Operation Fees Code"), - BankAcc2.TableCaption, - BankAcc2."No.")); - if PmtOrd."Posting Date" <> 0D then - CalcExpenses := true; - FormatAddress.FormatAddr( - BankAccAddr, BankAcc2.Name, BankAcc2."Name 2", '', BankAcc2.Address, BankAcc2."Address 2", - BankAcc2.City, BankAcc2."Post Code", BankAcc2.County, BankAcc2."Country/Region Code"); - PostingGroup := BankAcc2."Bank Acc. Posting Group"; - CompanyIsBlocked := BankAcc2.Blocked; - PmtOrd."Bank Account Name" := BankAcc2.Name; - end; - - if "Bank Account No." = '' then - AddError(StrSubstNo(Text1100002, FieldCaption("Bank Account No."))) - else - if PostingGroup = '' then - AddError( - StrSubstNo( - Text1100003, - BankAcc2.TableCaption(), - "Bank Account No.", - BankAcc2.FieldCaption("Bank Acc. Posting Group"))); - - if "Posting Date" = 0D then - AddError(StrSubstNo(Text1100002, FieldCaption("Posting Date"))); - - if "No. Printed" = 0 then - AddError(Text1100004); - - if CompanyIsBlocked then - AddError(StrSubstNo(Text1100005, BankAcc2.TableCaption(), "Bank Account No.")); - - Doc.Reset(); - Doc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No."); - Doc.SetRange(Type, Doc.Type::Payable); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); - if not Doc.Find('-') then - AddError(Text1100006); - end; - - trigger OnPreDataItem() - begin - if BankAccNoFilter <> '' then begin - SetCurrentKey("Bank Account No."); - SetRange("Bank Account No.", BankAccNoFilter); - end; - end; - } - } - - requestpage - { - - layout - { - } - - actions - { - } - } - - labels - { - } - - trigger OnPreReport() - begin - PmtOrdFilter := PmtOrd.GetFilters(); - CheckOtherBanks := BankAcc.GetFilter("No.") <> ''; - BankAccNoFilter := BankAcc.GetFilter("No."); - end; - - var - Text1100000: Label '%1 must be %2 in %3 %4.'; - Text1100001: Label '%1 must be specified in %2 %3.'; - Text1100002: Label '%1 must be specified.'; - Text1100003: Label '%1 %2 has no %3.'; - Text1100004: Label 'The payment order has not been printed.'; - Text1100005: Label '%1 %2 is blocked.'; - Text1100006: Label 'The payment order is empty.'; - Text1100007: Label '%1 should be %2.'; - Text1100008: Label '%1 must be %2.'; - Text1100009: Label '%1 must not be zero.'; - Text1100010: Label '%1 cannot be %2.'; - Text1100011: Label 'Specify %1 in %2 %3.'; - BankAcc2: Record "Bank Account"; - Vend: Record Vendor; - VendLedgEntry: Record "Vendor Ledger Entry"; - VendPostingGr: Record "Vendor Posting Group"; - DocPostBuffer: Record "Doc. Post. Buffer" temporary; - BGPOPostBuffer: Record "BG/PO Post. Buffer" temporary; - FeeRange: Record "Fee Range"; - FormatAddress: Codeunit "Format Address"; - PmtOrdFilter: Text[250]; - BankAccAddr: array[8] of Text[100]; - ErrorText: array[99] of Text[250]; - ErrorCounter: Integer; - PostingGroup: Code[20]; - CompanyIsBlocked: Boolean; - DocCount: Integer; - AccountNo: Text[20]; - BalanceAccNo: Text[20]; - RiskIncGr: Decimal; - CalcExpenses: Boolean; - CheckOtherBanks: Boolean; - NoOfDays: Integer; - BankAccNoFilter: Text[20]; - CurrReport_PAGENOCaptionLbl: Label 'Page'; - Payment_Order___TestCaptionLbl: Label 'Payment Order - Test'; - PmtOrd__Bank_Account_Name_CaptionLbl: Label 'Bank Account Name'; - PmtOrd__Posting_Date_CaptionLbl: Label 'Posting Date'; - PmtOrd__Posting_Description_CaptionLbl: Label 'Posting Description'; - PostingGroupCaptionLbl: Label 'Posting Group'; - PmtOrd__Currency_Code_CaptionLbl: Label 'Currency Code'; - ErrorText_Number_CaptionLbl: Label 'Warning!'; - Vend_Name_Control52CaptionLbl: Label 'Name'; - Post_CodeCaptionLbl: Label 'Post Code'; - City__CaptionLbl: Label 'City /'; - CountyCaptionLbl: Label 'County'; - Doc__Due_Date__Control44CaptionLbl: Label 'Due Date'; - Doc__No__CaptionLbl: Label 'Bill No.'; - Vendor_No_CaptionLbl: Label 'Vendor No.'; - ErrorText_Number__Control56CaptionLbl: Label 'Warning!'; - No__of_DocumentsCaptionLbl: Label 'No. of Documents'; - TotalCaptionLbl: Label 'Total'; - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89CaptionLbl: Label 'Total Expenses'; - Payment_Order_Expenses_Amt_CaptionLbl: Label 'Payment Order Expenses Amt.'; - BankAcc__No__CaptionLbl: Label 'Bank Account No.'; - - local procedure AddError(Text: Text[250]) - begin - ErrorCounter := ErrorCounter + 1; - ErrorText[ErrorCounter] := Text; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderTest.rdlc b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderTest.rdlc deleted file mode 100644 index 1b53a4775f2..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrderTest.rdlc +++ /dev/null @@ -1,3546 +0,0 @@ - - - 0 - - - - SQL - - - None - dfb1181e-2af6-414d-8755-844c7fc3128d - - - - - - - - - - - 18.57913cm - - - - - 14.919cm - - - - - - - - - - 1.7cm - - - 2cm - - - 2cm - - - - - 0.96cm - - - - - true - - - - - =First(Fields!BankAcc__No__Caption.Value) - - - - - - BankAcc__No__Caption - 8 - - - - - - - - true - - - - - =First(Fields!Payment_Order_Expenses_Amt_Caption.Value) - - - - - - - Payment_Order_Expenses_Amt_Caption - 7 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Caption.Value) - - - - - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Caption - 6 - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BillGrBankAcc__No__.Value - - - - - - BankAcc__No__ - 5 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt.Value - - - - - - - FeeRange_GetTotalPmtOrdCollExpensesAmt - 4 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt.Value - - - - - - - 3 - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__No__.Value - - - - - - BillGrBankAcc__No__ - 2 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88.Value - - - - - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88 - 1 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88.Value - - - - - - - - - - - - - - - - - - - - - - - - - After - true - - - - Detail - - - - - =IIF(Fields!BankAcc__No__.Value="",FALSE,TRUE) - - - - - =IIF(Fields!BillGrBankAcc__No__.Value="",FALSE,TRUE) - - - - Detail_Collection - Output - true - - - - - - =Fields!BankAcc__No__Caption.Value - GreaterThan - - ="" - - - - 13.113cm - 5.7cm - 21 - - - - - - - 2.62645cm - - - 2.4cm - - - 11.421cm - - - 1.8cm - - - - - 0.423cm - - - - - true - - - - - =Fields!TotalCaption.Value - - - - - - TotalCaption - 7 - - - 2 - - - - - - - true - true - - - - - - - - - - - textbox41 - 6 - - - - - - - - true - true - - - - - =Fields!PmtOrd_Amount.Value - - - - - - - PmtOrd_Amount - 5 - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox28 - 4 - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!No__of_DocumentsCaption.Value - - - - - - No__of_DocumentsCaption - 3 - - - - - - - - true - - - - - =Fields!DocCount.Value - - - - - - - DocCount - 2 - - - - - - - - true - true - - - - - - - - - - - textbox34 - 1 - - - - - - - - true - true - - - - - - - - - - - textbox26 - - - - - - - - - - - - - - - - - - - - - Detail - - - - - - - Detail_Collection - Output - true - - - - - - =Fields!TotalCaption.Value - GreaterThan - - ="" - - - - 11.421cm - 1.269cm - 18.24745cm - 20 - - - - - - 1.75291cm - - - 1.5cm - - - 1.65cm - - - 0.75cm - - - 1.65cm - - - 4.5cm - - - 1.65cm - - - 2.85cm - - - 1.8cm - - - 0.07937cm - - - 0.07937cm - - - 0.07937cm - - - 0.07937cm - - - 0.07937cm - - - 0.07937cm - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox14 - 47 - - - 15 - - - - - - - - - - - - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!Doc__Due_Date__Control44Caption.Value) - - - - - - Doc__Due_Date__Control44Caption - 46 - - - - - - - - true - - - - - =First(Fields!Doc__Document_Type__Control26Caption.Value) - - - - - - Doc__Document_Type__Control26Caption - 45 - - - - - - - - true - - - - - =First(Fields!Doc__Document_No___Control46Caption.Value) - - - - - - Doc__Document_No___Control46Caption - 44 - - - - - - - - true - - - - - =First(Fields!Doc__No__Caption.Value) - - - - - - Doc__No__Caption - 43 - - - - - - - - true - - - - - =First(Fields!Vendor_No_Caption.Value) - - - - - - Vendor_No_Caption - 42 - - - - - - - - true - - - - - =First(Fields!Vend_Name_Control52Caption.Value) - - - - - - Vend_Name_Control52Caption - 41 - - - - - - - - true - - - - - =First(Fields!Post_CodeCaption.Value) - - - - - - Post_CodeCaption - 40 - - - - - - - - true - - - - - =First(Fields!City__Caption.Value) + Chr(10) + First(Fields!CountyCaption.Value) - - - - - - City__Caption - 39 - - =iif(first(Fields!Post_CodeCaption.Value)="",true,false) - - NoOutput - - - - - - - - true - - - - - =First(Fields!Doc__Remaining_Amount__Control35Caption.Value) - - - - - - - Doc__Remaining_Amount__Control35Caption - 38 - - - - - - - - true - true - - - - - =Fields!Payment_Order___TestCaption.Value - - - - - - - 37 - - true - - - - - - - - - true - true - - - - - =Fields!COMPANYNAME.Value - - - - - - - 36 - - true - - - - - - - - - true - true - - - - - =Fields!CurrReport_PAGENOCaption.Value - - - - - - - 35 - - true - - - - - - - - - true - true - - - - - =IIF(Code.IsNewPage(Fields!PmtOrd_No_.Value),TRUE,FALSE) - - - - - - - 34 - - true - - - - - - - - - true - true - - - - - =First(Fields!PmtOrd_TABLECAPTION__________PmtOrdFilter.Value) - - - - - - - 33 - - true - - - - - - - - - true - true - - - - - =first(Fields!FORMAT_TODAY_0_4_.Value) - - - - - - - 32 - - true - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox15 - 31 - - - 15 - - - - - - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!Doc__Due_Date_.Value - - - - - - - Doc__Due_Date_ - 30 - - - - - - - - true - - - - - =Fields!Doc__Document_Type_.Value - - - - - - Doc__Document_Type_ - 29 - - - - - - - - true - - - - - =Fields!Doc__Document_No__.Value - - - - - - - Doc__Document_No__ - 28 - - - - - - - - true - true - - - - - - - - - - - - textbox23 - 27 - - - - - - - - true - - - - - =Fields!Doc__Account_No__.Value - - - - - - - Doc__Account_No__ - 26 - - - - - - - - true - - - - - =Fields!Vend_Name.Value - - - - - - Vend_Name - 25 - - - - - - - - true - - - - - =Fields!Vend__Post_Code_.Value - - - - - - - Vend__Post_Code_ - 24 - - - - - - - - true - - - - - =Fields!Vend_City.Value - - - - - - Vend_City - 23 - - - - - - - - true - true - - - - - =Code.BlankZero(Fields!Doc__Remaining_Amount_.Value) - - - - - - - Doc__Remaining_Amount_ - 22 - - - - - - - - true - true - - - - - - - - - - - - textbox16 - 21 - - - 6 - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox13 - 20 - - - 7 - - - - - - - - - - - - true - - - - - =Fields!Vend_County.Value - - - - - - Vend_County - 19 - - - - - - - - true - true - - - - - - - - - - - textbox25 - 18 - - - 7 - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!Doc__Due_Date_.Value - - - - - - - 17 - - - - - - - - true - - - - - =Fields!Doc__Document_Type_.Value - - - - - - 16 - - - - - - - - true - - - - - =Fields!Doc__Document_No__.Value - - - - - - - 15 - - - - - - - - true - true - - - - - =Fields!Doc__No__.Value - - - - - - - 14 - - - - - - - - true - - - - - =Fields!Doc__Account_No__.Value - - - - - - - 13 - - - - - - - - true - - - - - =Fields!Vend_Name.Value - - - - - - 12 - - - - - - - - true - - - - - =Fields!Vend__Post_Code_.Value - - - - - - - 11 - - - - - - - - true - - - - - =Fields!Vend_City.Value - - - - - - 10 - - - - - - - - true - true - - - - - =Code.BlankZero(Fields!Doc__Remaining_Amount_.Value) - - - - - - - 9 - - - - - - - - true - true - - - - - - - - - - - - textbox18 - 8 - - - 6 - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - 7 - - - 7 - - - - - - - - - - - - true - - - - - =Fields!Vend_County.Value - - - - - - 6 - - - - - - - - true - true - - - - - - - - - - - 5 - - - 7 - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!ErrorText_Number__Control56Caption.Value - - - - - - ErrorText_Number__Control56Caption - 2 - - - - - - - - true - - - - - =Fields!ErrorText_Number__Control56.Value - - - - - - ErrorText_Number__Control56 - 1 - - - 8 - - - - - - - - - - - - - true - true - - - - - - - - - - - textbox21 - - - 6 - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox19 - 4 - - - 9 - - - - - - - - - - - - - - true - true - - - - - - - - - - - textbox22 - 3 - - - 6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - After - true - - - After - true - - - After - true - - - - - =Fields!PmtOrd_No_.Value - - - - - - Detail - - - - - =IIF(Fields!DocumentTypeInvoice.Value,FALSE,TRUE) - - - - - =IIF(Fields!DocumentTypeInvoice.Value,FALSE,TRUE) - - - - - =IIF(Fields!DocumentTypeBill.Value,FALSE,TRUE) - - - - - =IIF(Fields!DocumentTypeBill.Value,FALSE,TRUE) - - - - - =IIF(Fields!ErrorText_Number__Control56.Value="",TRUE,FALSE) - - - - Detail_Collection - Output - true - - - - - Before - true - - - - - - =Fields!Vend_Name_Control52Caption.Value - GreaterThan - - ="" - - - - 7.191cm - 4.23cm - 19 - - - - - - 1.6cm - - - 16.497cm - - - - - 0.423cm - - - - - true - - - - - =Fields!ErrorText_Number_Caption.Value - - - - - - ErrorText_Number_Caption - 1 - - - - - - - - true - - - - - =Fields!ErrorText_Number_.Value - - - - - - ErrorText_Number_ - - - - - - - - - - - - - - - - - - - Detail - - - - - =IIF(Fields!ErrorText_Number_.Value="",TRUE,FALSE) - - - - Detail_Collection - Output - true - - - - 6.768cm - 0.423cm - 7.12569in - 18 - - - true - - - - - =First(Fields!PostingGroup.Value) - - - - - - 5.499cm - 5.07937cm - 0.423cm - 5cm - 17 - - - - true - - - - - =First(Fields!PmtOrd__Currency_Code_.Value) - - - - - - 5.92199cm - 5.07937cm - 0.423cm - 1.5cm - 16 - - - - true - - - - - =First(Fields!PmtOrd__Posting_Description_.Value) - - - - - - 5.076cm - 5.07937cm - 0.423cm - 5cm - 15 - - - - true - - - - - =first(Fields!Posting_Date.Value) - - - - - - - 4.653cm - 5.07937cm - 0.423cm - 1.7cm - 14 - - - - true - - - - - =First(Fields!PmtOrd__Bank_Account_Name_.Value) - - - - - - - 4.23cm - 5.07937cm - 0.423cm - 5cm - 13 - - - - true - - - - - =First(Fields!PostingGroupCaption.Value) - - - - - - 5.499cm - 0.423cm - 5cm - 12 - - - - true - - - - - =First(Fields!PmtOrd__Currency_Code_Caption.Value) - - - - - - 5.922cm - 0.423cm - 5cm - 11 - - - - true - - - - - =First(Fields!PmtOrd__Posting_Description_Caption.Value) - - - - - - 5.076cm - 0.423cm - 5cm - 10 - - - - true - - - - - =First(Fields!PmtOrd__Posting_Date_Caption.Value) - - - - - - 4.653cm - 0.423cm - 5cm - 9 - - - - true - - - - - =First(Fields!PmtOrd__Bank_Account_Name_Caption.Value) - - - - - - 4.23cm - 0.423cm - 5cm - 8 - - - - true - - - - - =First(Fields!BankAccAddr_4_.Value) - - - - - - 2.115cm - 0.423cm - 5cm - 7 - - - - true - - - - - =First(Fields!BankAccAddr_5_.Value) - - - - - - 2.538cm - 0.423cm - 5cm - 6 - - - - true - - - - - =First(Fields!BankAccAddr_6_.Value) - - - - - - 2.961cm - 0.423cm - 5cm - 5 - - - - true - - - - - =First(Fields!BankAccAddr_7_.Value) - - - - - - 3.384cm - 0.423cm - 5cm - 4 - - - - true - - - - - =First(Fields!BankAccAddr_3_.Value) - - - - - - 1.692cm - 0.423cm - 5cm - 3 - - - - true - - - - - =First(Fields!BankAccAddr_2_.Value) - - - - - - 1.269cm - 0.423cm - 5cm - 2 - - - - true - - - - - =First(Fields!BankAccAddr_1_.Value) - - - - - - 0.846cm - 0.423cm - 5cm - 1 - - - - true - - - - - =First(Fields!PmtOrd_TABLECAPTION_________PmtOrd__No__.Value) - - - - - - 0.423cm - 4.5cm - - - - true - - - - - - - - - - - - - - - - - - =Fields!PmtOrd_No_.Value - - - Between - - - Output - true - - - - DataSet_Result - - End - - - - 14.919cm - - 18.57913cm - - - 2.53968cm - true - true - - - true - - - - - =Globals!PageNumber - - - - - - - 0.423cm - 17.7cm - 0.423cm - 0.45cm - 6 - - =iif(ReportItems!CurrReport_PAGENOCaption.Value="",true,false) - - NoOutput - - - - true - true - - - - - =User!UserID - - - - - - - 0.846cm - 14.9cm - 0.423cm - 3.25cm - 5 - - =iif(ReportItems!CurrReport_PAGENOCaption.Value="",true,false) - - NoOutput - - - - true - - - - - =ReportItems!FORMAT_TODAY_0_4_.Value - - - - - - - 13.33333cm - 0.423cm - 4.81667cm - 4 - - - - true - - - - - =ReportItems!COMPANYNAME.Value - - - - - - 0.423cm - 0.423cm - 7.5cm - 3 - - - - true - - - - - =ReportItems!CurrReport_PAGENOCaption.Value - - - - - - 0.423cm - 16.95cm - 0.423cm - 0.75cm - 2 - - - - true - - - - - =ReportItems!Payment_Order___TestCaption.Value - - - - - - 0.423cm - 7.5cm - 1 - - - - true - - - - - =ReportItems!PmtOrd_TABLECAPTION__________PmtOrdFilter.Value - - - - - - 1.90476cm - 0.423cm - 18.15cm - - - - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - -Shared offset as Integer -Shared newPage as Object -Shared currentgroup1 as Object -Shared currentgroup2 as Object -Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object - If NewPage - offset = pagenumber - 1 - End If - Return pagenumber - offset -End Function - -Public Function IsNewPage(group1 as Object) As Boolean -newPage = FALSE -If Not (group1 = currentgroup1) - newPage = TRUE - currentgroup1 = group1 - End If - Return newPage -End Function - - =User!Language - true - Invalid - 4709d82c-7878-41ab-b77a-39061e23a92e - - - - - PmtOrd_No_ - - - PmtOrd_Bank_Account_No_ - - - PmtOrd_Currency_Code - - - USERID - - - FORMAT_TODAY_0_4_ - - - COMPANYNAME - - - PmtOrd_TABLECAPTION__________PmtOrdFilter - - - PmtOrd_TABLECAPTION_________PmtOrd__No__ - - - BankAccAddr_1_ - - - BankAccAddr_2_ - - - BankAccAddr_3_ - - - BankAccAddr_4_ - - - BankAccAddr_5_ - - - BankAccAddr_6_ - - - BankAccAddr_7_ - - - PmtOrd__Bank_Account_Name_ - - - Posting_Date - - - PmtOrd__Posting_Description_ - - - PostingGroup - - - PmtOrd__Currency_Code_ - - - PageCounter_Number - - - CurrReport_PAGENOCaption - - - Payment_Order___TestCaption - - - PmtOrd__Bank_Account_Name_Caption - - - PmtOrd__Posting_Date_Caption - - - PmtOrd__Posting_Description_Caption - - - PostingGroupCaption - - - PmtOrd__Currency_Code_Caption - - - ErrorText_Number_ - - - HeaderErrorCounter_Number - - - ErrorText_Number_Caption - - - Doc__Remaining_Amount_ - - - Doc__Remaining_Amount_Format - - - Vend_City - - - Vend_County - - - Vend__Post_Code_ - - - Vend_Name - - - Doc__Account_No__ - - - Doc__Document_No__ - - - Doc__Due_Date_ - - - Doc__Document_Type_ - - - DocumentTypeBill - - - DocumentTypeInvoice - - - Doc__Due_Date__Control44 - - - Doc__Document_No___Control46 - - - Doc__No__ - - - Doc__Account_No___Control50 - - - Vend_Name_Control52 - - - Vend__Post_Code__Control53 - - - Vend_City_Control54 - - - Vend_County_Control55 - - - Doc__Remaining_Amount__Control35 - - - Doc__Remaining_Amount__Control35Format - - - Doc__Document_Type__Control26 - - - Doc_Type - - - Doc_Entry_No_ - - - Doc_Bill_Gr__Pmt__Order_No_ - - - Vend_Name_Control52Caption - - - Post_CodeCaption - - - City__Caption - - - CountyCaption - - - Doc__Due_Date__Control44Caption - - - Doc__Document_No___Control46Caption - - - Doc__No__Caption - - - Vendor_No_Caption - - - Doc__Remaining_Amount__Control35Caption - - - Doc__Document_Type__Control26Caption - - - ErrorText_Number__Control56 - - - LineErrorCounter_Number - - - ErrorText_Number__Control56Caption - - - DocCount - - - PmtOrd_Amount - - - PmtOrd_AmountFormat - - - Total_Number - - - No__of_DocumentsCaption - - - TotalCaption - - - Integer_Number - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Caption - - - Payment_Order_Expenses_Amt_Caption - - - BankAcc__No__Caption - - - FeeRange_GetTotalPmtOrdCollExpensesAmt - - - FeeRange_GetTotalPmtOrdCollExpensesAmtFormat - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control92 - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control92Format - - - BillGrBankAcc__No__ - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88 - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control88Format - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89 - - - FeeRange_GetTotalPmtOrdCollExpensesAmt_Control89Format - - - BankAcc__No__ - - - BankAcc_Currency_Code - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrders.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrders.Page.al deleted file mode 100644 index c6ded679a21..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrders.Page.al +++ /dev/null @@ -1,320 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.Payment; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Navigate; -using System.Telemetry; - -page 7000050 "Payment Orders" -{ - Caption = 'Payment Orders'; - DataCaptionExpression = Rec.Caption(); - PageType = Document; - RefreshOnActivate = true; - SourceTable = "Payment Order"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("No."; Rec."No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number for this payment order.'; - - trigger OnAssistEdit() - begin - if Rec.AssistEdit(xRec) then - CurrPage.Update(); - end; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank where the payment order is delivered.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name of the bank where the payment order is delivered.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the general posting date for the payment order.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code associated with this payment order.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the sum total of the documents included in this payment order.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the total amount of all of the documents included in this payment order.'; - } - field("Export Electronic Payment"; Rec."Export Electronic Payment") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if this payment order will be used for electronic payments.'; - } - } - part(Docs; "Docs. in PO Subform") - { - ApplicationArea = Basic, Suite; - SubPageLink = Type = const(Payable), - "Collection Agent" = const(Bank), - "Bill Gr./Pmt. Order No." = field("No."); - SubPageView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place); - } - group(Auditing) - { - Caption = 'Auditing'; - field("Reason Code"; Rec."Reason Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; - } - field("No. Printed"; Rec."No. Printed") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of printed copies of this payment order.'; - } - } - } - area(factboxes) - { - part(Control1901420307; "Pmt Orders Analysis Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part("Payment File Errors"; "Payment Journal Errors Part") - { - ApplicationArea = Basic, Suite; - Caption = 'Payment File Errors'; - Provider = Docs; - SubPageLink = "Document No." = field("Bill Gr./Pmt. Order No."), - "Journal Line No." = field("Entry No."); - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Pmt. O&rd.") - { - Caption = 'Pmt. O&rd.'; - action(Comments) - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."), - Type = const(Payable); - ToolTip = 'View or create a comment.'; - } - separator(Action18) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Enabled = true; - Image = "Report"; - RunObject = Page "Payment Orders Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action33) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Enabled = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - PmtOrd.Copy(Rec); - PmtOrd.SetRecFilter(); - end; - PmtOrd.PrintRecords(true); - end; - } - action(Export) - { - ApplicationArea = Basic, Suite; - Caption = 'Export to File'; - Image = ExportFile; - ToolTip = 'Export a file with the payment information on the lines.'; - - trigger OnAction() - var - FeatureTelemetry: Codeunit "Feature Telemetry"; - ESElecPaymentsTok: Label 'ES Electronic Payments', Locked = true; - begin - FeatureTelemetry.LogUptake('1000HY0', ESElecPaymentsTok, Enum::"Feature Uptake Status"::"Used"); - Rec.ExportToFile(); - FeatureTelemetry.LogUsage('1000HY1', ESElecPaymentsTok, 'ES Electronic Payments Exported'); - end; - } - } - } - area(processing) - { - group("P&osting") - { - Caption = 'P&osting'; - Image = Post; - action("Test Report") - { - ApplicationArea = Basic, Suite; - Caption = 'Test Report'; - Ellipsis = true; - Enabled = true; - Image = TestReport; - ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; - - trigger OnAction() - begin - if not Rec.Find() then - exit; - PmtOrd.Reset(); - PmtOrd := Rec; - PmtOrd.SetRecFilter(); - REPORT.Run(REPORT::"Payment Order - Test", true, false, PmtOrd); - end; - } - action(Post) - { - ApplicationArea = Basic, Suite; - Caption = 'P&ost'; - Ellipsis = true; - Image = Post; - ShortCutKey = 'F9'; - ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; - - trigger OnAction() - begin - if Rec.Find() then - PostBGPO.PayablePostOnly(Rec); - end; - } - action("Post and &Print") - { - ApplicationArea = Basic, Suite; - Caption = 'Post and &Print'; - Ellipsis = true; - Enabled = true; - Image = PostPrint; - ShortCutKey = 'Shift+F9'; - ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; - - trigger OnAction() - begin - if Rec.Find() then - PostBGPO.PayablePostAndPrint(Rec); - end; - } - } - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Enabled = true; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - Navigate.SetDoc(Rec."Posting Date", Rec."No."); - Navigate.Run(); - end; - } - action("Page Payment Orders Maturity Process") - { - ApplicationArea = Basic, Suite; - Caption = 'Payment Orders Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Payment Orders Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref(Post_Promoted; Post) - { - } - actionref("Post and &Print_Promoted"; "Post and &Print") - { - } - actionref(Export_Promoted; Export) - { - } - actionref("&Navigate_Promoted"; "&Navigate") - { - } - actionref("Page Payment Orders Maturity Process_Promoted"; "Page Payment Orders Maturity Process") - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - PmtOrd: Record "Payment Order"; - PostBGPO: Codeunit "BG/PO-Post and Print"; - Navigate: Page Navigate; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersAnalysis.Page.al deleted file mode 100644 index b1aae71a660..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersAnalysis.Page.al +++ /dev/null @@ -1,98 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000053 "Payment Orders Analysis" -{ - Caption = 'Payment Orders Analysis'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SaveValues = true; - SourceTable = "Payment Order"; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field("Category Filter"; Rec."Category Filter") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a category filter for the documents included in this payment order.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - } - group(Control3) - { - ShowCaption = false; - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the currency code associated with this payment order.'; - } - field(DocCount; DocCount) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Documents'; - Editable = false; - ToolTip = 'Specifies the number of documents included.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the sum total of the documents included in this payment order.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount of all of the documents included in this payment order.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - Doc: Record "Cartera Doc."; - DocCount: Integer; - - local procedure UpdateStatistics() - begin - Doc.SetRange(Type, Doc.Type::Payable); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Global Dimension 1 Filter", Doc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", Doc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", Doc."Category Code"); - Rec.CopyFilter("Due Date Filter", Doc."Due Date"); - DocCount := Doc.Count(); - end; - - local procedure CategoryFilterOnAfterValidate() - begin - UpdateStatistics(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersList.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersList.Page.al deleted file mode 100644 index 2f5d265aaac..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersList.Page.al +++ /dev/null @@ -1,235 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000051 "Payment Orders List" -{ - ApplicationArea = Basic, Suite; - Caption = 'Payment Orders'; - CardPageID = "Payment Orders"; - Editable = false; - PageType = List; - SourceTable = "Payment Order"; - UsageCategory = Lists; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number for this payment order.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank where the payment order is delivered.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name of the bank where the payment order is delivered.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code associated with this payment order.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the sum total of the documents included in this payment order.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount of all of the documents included in this payment order.'; - } - field("Elect. Pmts Exported"; Rec."Elect. Pmts Exported") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if the electronic payment has been exported for the amount on the Cartera Document.'; - } - } - } - area(factboxes) - { - part(Control1901420307; "Pmt Orders Analysis Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Pmt. O&rd.") - { - Caption = 'Pmt. O&rd.'; - action(Comments) - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."), - Type = filter(Payable); - ToolTip = 'View or create a comment.'; - } - separator(Action21) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Enabled = true; - Image = "Report"; - RunObject = Page "Payment Orders Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action24) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Enabled = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - PmtOrd.Copy(Rec); - PmtOrd.SetRecFilter(); - end; - PmtOrd.PrintRecords(true); - end; - } - } - } - area(processing) - { - group("P&osting") - { - Caption = 'P&osting'; - Image = Post; - action(TestReport) - { - ApplicationArea = Basic, Suite; - Caption = 'Test Report'; - Ellipsis = true; - Image = TestReport; - ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; - - trigger OnAction() - begin - if not Rec.Find() then - exit; - PmtOrd.Reset(); - PmtOrd := Rec; - PmtOrd.SetRecFilter(); - REPORT.Run(REPORT::"Payment Order - Test", true, false, PmtOrd); - end; - } - action(Post) - { - ApplicationArea = Basic, Suite; - Caption = 'P&ost'; - Ellipsis = true; - Image = Post; - ShortCutKey = 'F9'; - ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; - - trigger OnAction() - begin - if Rec.Find() then - PostBGPO.PayablePostOnly(Rec); - end; - } - action("Post and &Print") - { - ApplicationArea = Basic, Suite; - Caption = 'Post and &Print'; - Ellipsis = true; - Image = PostPrint; - ShortCutKey = 'Shift+F9'; - ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; - - trigger OnAction() - begin - if Rec.Find() then - PostBGPO.PayablePostAndPrint(Rec); - end; - } - } - action(GeneralPaymentOrdersMaturity) - { - ApplicationArea = Basic, Suite; - Caption = 'Payment Orders Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Payment Orders Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View the document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref(Post_Promoted; Post) - { - } - actionref("Post and &Print_Promoted"; "Post and &Print") - { - } - actionref(GeneralPaymentOrdersMaturity_Promoted; GeneralPaymentOrdersMaturity) - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - PmtOrd: Record "Payment Order"; - PostBGPO: Codeunit "BG/PO-Post and Print"; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersMaturity.Page.al deleted file mode 100644 index 2f4a5d87e7d..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentOrdersMaturity.Page.al +++ /dev/null @@ -1,97 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000052 "Payment Orders Maturity" -{ - Caption = 'Payment Orders Maturity'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = List; - SaveValues = true; - SourceTable = "Payment Order"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("Category Filter"; Rec."Category Filter") - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - } - group(Options) - { - Caption = 'Options'; - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View by'; - OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - field(AmountType; AmountType) - { - ApplicationArea = Basic, Suite; - Caption = 'View as'; - OptionCaption = 'Net Change,Balance at Date'; - ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - } - part(MaturityLines; "BG/PO Maturity Lines") - { - ApplicationArea = Basic, Suite; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateSubForm(); - end; - - trigger OnOpenPage() - begin - UpdateSubForm(); - end; - - var - PeriodType: Option Day,Week,Month,Quarter,Year,Period; - AmountType: Option "Net Change","Balance at Date"; - - local procedure UpdateSubForm() - begin - CurrPage.MaturityLines.PAGE.SetPayable(Rec, PeriodType, AmountType); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentorderExportN34.Codeunit.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentorderExportN34.Codeunit.al deleted file mode 100644 index 195ee0a9718..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentorderExportN34.Codeunit.al +++ /dev/null @@ -1,27 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.GeneralLedger.Journal; - -codeunit 7000090 "Payment order - Export N34" -{ - TableNo = "Gen. Journal Line"; - - trigger OnRun() - var - PaymentOrder: Record "Payment Order"; - begin - PaymentOrder.SetRange("No.", Rec.GetFilter("Document No.")); - if PaymentOrder.IsEmpty() then - Error(ExportPaymentErr); - Commit(); - REPORT.Run(REPORT::"Payment order - Export N34", true, false, PaymentOrder); - end; - - var - ExportPaymentErr: Label 'You cannot export payments from Payment Journal with the selected Payment Export Format in Bal. Account No.'; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentorderExportN34.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentorderExportN34.Report.al deleted file mode 100644 index dbf4655406b..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PaymentorderExportN34.Report.al +++ /dev/null @@ -1,386 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Company; -using Microsoft.Purchases.Vendor; -using System.IO; - -report 7000090 "Payment order - Export N34" -{ - ApplicationArea = Basic, Suite; - Caption = 'Payment order - Export N34'; - Permissions = TableData "Payment Order" = m; - ProcessingOnly = true; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem("Payment Order"; "Payment Order") - { - RequestFilterFields = "No."; - dataitem("Cartera Doc."; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemTableView = sorting(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date") order(ascending) where(Type = const(Payable)); - - trigger OnAfterGetRecord() - begin - TestField("Payment Method Code"); - DocType2 := DocMisc.DocType2("Payment Method Code"); - - TestField("Account No."); - Vendor.Get("Account No."); - - VATRegVend := Vendor."VAT Registration No."; - VATRegVend := PadStr('', MaxStrLen(VATRegVend) - StrLen(VATRegVend), ' ') + VATRegVend; - RmgAmount := PadStr('', MaxStrLen(RmgAmount) - StrLen(RmgAmount), '0') + RmgAmount; - - case true of - LCY = LCY::Euro: - if IsEuro then begin - TotalAmount := TotalAmount + "Remaining Amount"; - RmgAmount := EuroAmount("Remaining Amount"); - end else begin - RmgAmount := Format("Remaining Amount" * 100, 12, Text1100000); - TotalAmount := TotalAmount + "Remaining Amount"; - end; - LCY = LCY::Other: - if IsEuro then begin - TotalAmount := TotalAmount + "Remaining Amount"; - RmgAmount := EuroAmount("Remaining Amount"); - end else begin - RmgAmount := Format("Remaining Amount" * 100, 12, Text1100000); - TotalAmount := TotalAmount + "Remaining Amount" * 100; - end; - end; - - if DocType2 = '4' then begin - VendBankAccCode := "Cust./Vendor Bank Acc. Code"; - if VendBankAcc.Get("Account No.", VendBankAccCode) then begin - VendCCCAccNo := VendBankAcc."CCC Bank Account No."; - VendCCCControlDigits := VendBankAcc."CCC Control Digits"; - Vendor2 := VendBankAcc."CCC Bank No."; - VendCCCBankBranchNo := VendBankAcc."CCC Bank Branch No."; - end else begin - VendCCCAccNo := ''; - VendCCCControlDigits := ''; - Vendor2 := ''; - VendCCCBankBranchNo := ''; - end; - end else begin - TestField("Cust./Vendor Bank Acc. Code"); - VendBankAccCode := "Cust./Vendor Bank Acc. Code"; - VendBankAcc.Get("Account No.", VendBankAccCode); - VendCCCAccNo := VendBankAcc."CCC Bank Account No."; - VendCCCControlDigits := VendBankAcc."CCC Control Digits"; - Vendor2 := VendBankAcc."CCC Bank No."; - VendCCCBankBranchNo := VendBankAcc."CCC Bank Branch No."; - if (Vendor2 = '') or (VendCCCBankBranchNo = '') or - (VendCCCControlDigits = '') or (VendCCCAccNo = '') - then - Error(Text1100003, VendBankAcc."Vendor No."); - end; - - VendCCCAccNo := PadStr('', MaxStrLen(VendCCCAccNo) - StrLen(VendCCCAccNo), '0') + VendCCCAccNo; - VendCCCControlDigits := PadStr('', MaxStrLen(VendCCCControlDigits) - StrLen(VendCCCControlDigits), '0') - + VendCCCControlDigits; - - if IsEuro then - if DocType2 = '4' then - DocType := '57' - else begin - DocType := '56'; - VendBankAcc.TestField("CCC Bank Account No."); - end - else - if DocType2 = '4' then - DocType := '07' - else begin - DocType := '06'; - VendBankAcc.TestField("CCC Bank Account No."); - end; - - OutText := '06' + DocType + VATRegNo + VATRegVend + '010' + ConvertStr(RmgAmount, ' ', '0') + - ConvertStr(PadStr(Vendor2, 4, ' '), ' ', '0') + ConvertStr(PadStr(VendCCCBankBranchNo, 4, ' '), ' ', '0') + - ConvertStr(PadStr(VendCCCAccNo, 10, ' '), ' ', '0') + - '1' + '9' + PadStr('', 2, ' ') + PadStr(VendCCCControlDigits, 2, ' ') + PadStr('', 7, ' '); - OutFile.Write(OutText); - - TotalReg := TotalReg + 1; - TotalDocVend := TotalDocVend + 1; - - OutText := '06' + DocType + VATRegNo + VATRegVend + '011' + PadStr(Vendor.Name, 36, ' ') - + PadStr('', 7, ' '); - OutFile.Write(OutText); - TotalReg := TotalReg + 1; - if (DocType = '06') or (DocType = '56') then begin - OutText := '06' + DocType + VATRegNo + VATRegVend + '012' + PadStr(Vendor.Address, 36, ' ') - + PadStr('', 7, ' '); - OutFile.Write(OutText); - - TotalReg := TotalReg + 1; - - if Vendor."Address 2" <> '' then begin - OutText := '06' + DocType + VATRegNo + VATRegVend + '013' + PadStr(Vendor."Address 2", 36, ' ') - + PadStr('', 7, ' '); - OutFile.Write(OutText); - - TotalReg := TotalReg + 1; - end; - - OutText := '06' + DocType + VATRegNo + VATRegVend + '014' + PadStr(Vendor."Post Code" + ' ' + Vendor.City, 36, ' ') - + PadStr('', 7, ' '); - OutFile.Write(OutText); - - TotalReg := TotalReg + 1; - end; - end; - } - - trigger OnAfterGetRecord() - begin - TestField("Bank Account No."); - BankAcc.Get("Bank Account No."); - - CCCBankNo := BankAcc."CCC Bank No."; - CCCBankNo := PadStr('', MaxStrLen(CCCBankNo) - StrLen(CCCBankNo), '0') + CCCBankNo; - - CCCBankBranchNo := BankAcc."CCC Bank Branch No."; - CCCBankBranchNo := PadStr('', MaxStrLen(CCCBankBranchNo) - StrLen(CCCBankBranchNo), '0') + CCCBankBranchNo; - - CCCAccNo := BankAcc."CCC Bank Account No."; - CCCAccNo := PadStr('', MaxStrLen(CCCAccNo) - StrLen(CCCAccNo), '0') + CCCAccNo; - - CCCControlDigits := BankAcc."CCC Control Digits"; - CCCControlDigits := PadStr('', MaxStrLen(CCCControlDigits) - StrLen(CCCControlDigits), '0') + CCCControlDigits; - - if "Posting Date" = 0D then - PostDate := PadStr('', 6, '0') - else - PostDate := Format("Posting Date", 0, Text1100002); - - OutText := '03' + RegisterString + VATRegNo + PadStr('', 12, ' ') + '001' + - Format(DeliveryDate, 0, Text1100002) + PostDate + - CCCBankNo + CCCBankBranchNo + CCCAccNo + Relat + PadStr('', 3, ' ') + CCCControlDigits + PadStr('', 7, ' '); - OutFile.Write(OutText); - - TotalReg := TotalReg + 1; - - OutText := '03' + RegisterString + VATRegNo + PadStr('', 12, ' ') + '002' + - PadStr(CompanyInfo.Name, 36, ' ') + PadStr('', 7, ' '); - OutFile.Write(OutText); - - TotalReg := TotalReg + 1; - - OutText := '03' + RegisterString + VATRegNo + PadStr('', 12, ' ') + '003' + - PadStr(CompanyInfo.Address, 36, ' ') + PadStr('', 7, ' '); - OutFile.Write(OutText); - - TotalReg := TotalReg + 1; - - OutText := '03' + RegisterString + VATRegNo + PadStr('', 12, ' ') + '004' + - PadStr(CompanyInfo."Post Code" + ' ' + CompanyInfo.City, 36, ' ') + PadStr('', 7, ' '); - OutFile.Write(OutText); - - TotalReg := TotalReg + 1; - "Elect. Pmts Exported" := true; - Modify(); - end; - - trigger OnPreDataItem() - begin - GLSetup.Get(); - if CheckErrors then - Relat := '1' - else - Relat := '0'; - - Find('-'); - IsEuro := DocMisc.GetRegisterCode("Currency Code", RegisterCode, RegisterString); - if RegisterCode <> 0 then - RegisterString := '56' - else - RegisterString := '06'; - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(crelation; CheckErrors) - { - ApplicationArea = Basic, Suite; - Caption = 'Relation'; - ToolTip = 'Specifies if you want the bank to send you a detailed list of all transfer charges. Deselect the check box if you want a simple total of charges for all the transfers made.'; - } - field(DeliveryDate; DeliveryDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Delivery Date'; - ToolTip = 'Specifies a number to identify the operations declaration.'; - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - if ExternalFile = '' then - ExternalFile := 'C:\' + Text10702; - if DeliveryDate = 0D then - DeliveryDate := Today; - end; - } - - labels - { - } - - trigger OnInitReport() - begin - CompanyInfo.Get(); - CompanyInfo.TestField("VAT Registration No."); - VATRegNo := InsStr(PadStr('', MaxStrLen(VATRegNo) - StrLen(CompanyInfo."VAT Registration No."), ' '), - CompanyInfo."VAT Registration No.", 1 + MaxStrLen(VATRegNo) - StrLen(CompanyInfo."VAT Registration No.")); - SilentMode := false; - end; - - trigger OnPostReport() - begin - TotalReg := TotalReg + 1; - case true of - LCY = LCY::Euro: - if IsEuro then - DocAmount := EuroAmount(TotalAmount) - else - DocAmount := ConvertStr(Format(TotalAmount, 12, Text1100000), ' ', '0'); - LCY = LCY::Other: - if IsEuro then - DocAmount := EuroAmount(TotalAmount) - else - DocAmount := ConvertStr(Format(TotalAmount, 12, Text1100000), ' ', '0'); - end; - - OutText := '08' + RegisterString + VATRegNo + PadStr('', 15, ' ') + - DocAmount + - (PadStr('', 8 - StrLen(Format(TotalDocVend)), '0') + Format(TotalDocVend, 0, 1)) + - (PadStr('', 10 - StrLen(Format(TotalReg)), '0') + Format(TotalReg, 0, 1)) + - PadStr('', 13, ' '); - OutFile.Write(OutText); - - OutFile.Close(); - - if SilentMode then - FileMgt.CopyServerFile(ExternalFile, SilentModeFileName, true) - else - Download(ExternalFile, '', 'C:', Text10701, ToFile); - end; - - trigger OnPreReport() - var - FileMgt: Codeunit "File Management"; - begin - OutFile.TextMode := true; - OutFile.WriteMode := true; - ExternalFile := FileMgt.ServerTempFileName(''); - ToFile := Text10702; - OutFile.Create(ExternalFile); - end; - - var - Text1100000: Label '', Locked = true; - Text1100002: Label '', Locked = true; - Text1100003: Label 'Some data from the Bank Account of Vendor %1 are missing.'; - CompanyInfo: Record "Company Information"; - Vendor: Record Vendor; - BankAcc: Record "Bank Account"; - VendBankAcc: Record "Vendor Bank Account"; - GLSetup: Record "General Ledger Setup"; - DocMisc: Codeunit "Document-Misc"; - FileMgt: Codeunit "File Management"; - OutFile: File; - ExternalFile: Text[1024]; - CheckErrors: Boolean; - VATRegNo: Text[10]; - CCCBankNo: Text[4]; - VATRegVend: Text[12]; - VendCCCBankBranchNo: Text[4]; - CCCBankBranchNo: Text[4]; - VendCCCControlDigits: Text[2]; - CCCControlDigits: Text[2]; - CCCAccNo: Text[10]; - VendCCCAccNo: Text[10]; - Vendor2: Text[4]; - TotalReg: Decimal; - TotalDocVend: Decimal; - TotalAmount: Decimal; - OutText: Text[85]; - DeliveryDate: Date; - Relat: Text[1]; - DocType2: Code[10]; - DocType: Text[2]; - RmgAmount: Text[12]; - VendBankAccCode: Code[20]; - PostDate: Text[6]; - LCY: Option Euro,Other; - IsEuro: Boolean; - RegisterCode: Integer; - RegisterString: Text[2]; - DocAmount: Text[12]; - ToFile: Text[1024]; - Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; - Text10702: Label 'ORDENPAGO.ASC'; - SilentMode: Boolean; - SilentModeFileName: Text; - - [Scope('OnPrem')] - procedure EuroAmount(Amount: Decimal): Text[12] - var - TextAmount: Text[15]; - begin - TextAmount := ConvertStr(Format(Amount), ' ', '0'); - if StrPos(TextAmount, ',') = 0 then - TextAmount := TextAmount + '00' - else begin - if StrLen(CopyStr(TextAmount, StrPos(TextAmount, ','), StrLen(TextAmount))) = 2 then - TextAmount := TextAmount + '0'; - TextAmount := DelChr(TextAmount, '=', ','); - end; - if StrPos(TextAmount, '.') = 0 then - TextAmount := TextAmount - else - TextAmount := DelChr(TextAmount, '=', '.'); - - while StrLen(TextAmount) < 12 do - TextAmount := '0' + TextAmount; - - exit(TextAmount); - end; - - [Scope('OnPrem')] - procedure EnableSilentMode(FileName: Text) - begin - SilentMode := true; - SilentModeFileName := FileName; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PmtOrdersAnalysisFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/PmtOrdersAnalysisFactBox.Page.al deleted file mode 100644 index 581dc9c9274..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/PmtOrdersAnalysisFactBox.Page.al +++ /dev/null @@ -1,75 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Finance.ReceivablesPayables; - -page 35298 "Pmt Orders Analysis Fact Box" -{ - Caption = 'Pmt Orders Analysis Fact Box'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SaveValues = true; - SourceTable = "Payment Order"; - - layout - { - area(content) - { - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Suite; - Editable = false; - ToolTip = 'Specifies the currency code associated with this payment order.'; - } - field(DocCount; DocCount) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Documents'; - Editable = false; - ToolTip = 'Specifies the number of documents included.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the sum total of the documents included in this payment order.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount of all of the documents included in this payment order.'; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - Doc: Record "Cartera Doc."; - DocCount: Integer; - - local procedure UpdateStatistics() - begin - Doc.SetRange(Type, Doc.Type::Payable); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Global Dimension 1 Filter", Doc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", Doc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", Doc."Category Code"); - Rec.CopyFilter("Due Date Filter", Doc."Due Date"); - DocCount := Doc.Count(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/RedrawPayableBills.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/RedrawPayableBills.Report.al deleted file mode 100644 index 1bdfb7b9c80..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/RedrawPayableBills.Report.al +++ /dev/null @@ -1,497 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Finance.VAT.Setup; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Vendor; -using Microsoft.Sales.Receivables; - -report 7000083 "Redraw Payable Bills" -{ - Caption = 'Redraw Payable Bills'; - Permissions = TableData "Cust. Ledger Entry" = imd, - TableData "Vendor Ledger Entry" = imd, - TableData "Cartera Doc." = imd, - TableData "Posted Cartera Doc." = imd, - TableData "Closed Cartera Doc." = imd; - ProcessingOnly = true; - - dataset - { - dataitem(VendLedgEntry; "Vendor Ledger Entry") - { - DataItemTableView = sorting("Entry No."); - - trigger OnAfterGetRecord() - var - IsHandled: Boolean; - begin - CheckUnrealizedVAT(VendLedgEntry); - - IsHandled := false; - OnAfterGetVendorLedgerEntryOnBeforeCheckNewDueDate(VendLedgEntry, NewDueDate, IsHandled); - if not IsHandled then - if NewDueDate < "Due Date" then begin - Window.Close(); - Error( - Text1100002, - FieldCaption("Due Date"), - FieldCaption("Entry No."), - "Entry No."); - end; - - SumLCYAmt := 0; - DocCount := DocCount + 1; - Window.Update(1, DocCount); - - GenJnlLineInit(); - CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - if "Remaining Amount" <> 0 then begin // open bill - CarteraManagement.CreatePayableDocPayment(GenJnlLine, VendLedgEntry); - IsOpenBill := true; - end else begin // settled bill - CarteraManagement.ReversePayableDocPayment(GenJnlLine, VendLedgEntry); - IsOpenBill := false; - end; - - GenJnlLine.Insert(); - - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - NewDocAmount := -GenJnlLine.Amount; - NewDocAmountLCY := -GenJnlLine."Amount (LCY)"; - - Vendor.Get("Vendor No."); - Vendor.TestField("Vendor Posting Group"); - VendPostingGr.Get(Vendor."Vendor Posting Group"); - - if ((not IsOpenBill) and ("Currency Code" <> '') and - ("Document Status" = "Document Status"::Honored)) - then - InsertGainLoss(); - - case "Document Situation" of - "Document Situation"::"Posted BG/PO": - begin - PostedDoc.Get(PostedDoc.Type::Payable, "Entry No."); - AmtForCollection := PostedDoc."Amount for Collection"; - end; - "Document Situation"::"Closed BG/PO": - begin - ClosedDoc.Get(ClosedDoc.Type::Payable, "Entry No."); - AmtForCollection := ClosedDoc."Amount for Collection"; - end; - end; - - "Document Status" := "Document Status"::Redrawn; - Modify(); - - if StrPos(GenJnlLine."Bill No.", '-') = 0 then - DocNo := VendLedgEntry."Bill No." + '-1' - else - DocNo := IncStr(GenJnlLine."Bill No."); - GenJnlLineInit(); - - if ArePostedDocs then begin - PostedDoc.Get( - PostedDoc.Type::Payable, VendLedgEntry."Entry No."); - if NewPmtMethod = '' then - GenJnlLine."Payment Method Code" := PostedDoc."Payment Method Code" - else - GenJnlLine."Payment Method Code" := NewPmtMethod; - GenJnlLine."Recipient Bank Account" := PostedDoc."Cust./Vendor Bank Acc. Code"; - end else begin - ClosedDoc.Get( - ClosedDoc.Type::Payable, VendLedgEntry."Entry No."); - if NewPmtMethod = '' then - GenJnlLine."Payment Method Code" := ClosedDoc."Payment Method Code" - else - GenJnlLine."Payment Method Code" := NewPmtMethod; - GenJnlLine."Recipient Bank Account" := ClosedDoc."Cust./Vendor Bank Acc. Code"; - end; - GenJnlLine."Due Date" := NewDueDate; - GenJnlLine."External Document No." := VendLedgEntry."External Document No."; - InsertGenJnlLine( - GenJnlLine."Account Type"::Vendor, - VendLedgEntry."Vendor No.", - GenJnlLine."Document Type"::Bill, - NewDocAmount, - StrSubstNo(Text1100003, VendLedgEntry."Document No.", DocNo), DocNo); - - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - - if "Currency Code" <> '' then begin - Currency.SetFilter(Code, "Currency Code"); - Currency.FindFirst(); - if SumLCYAmt <> 0 then begin - if SumLCYAmt > 0 then begin - Currency.TestField("Residual Gains Account"); - Account := Currency."Residual Gains Account"; - end else begin - Currency.TestField("Residual Losses Account"); - Account := Currency."Residual Losses Account"; - end; - VendLedgEntry."Currency Code" := ''; - GenJnlLineInit(); - InsertGenJnlLine( - GenJnlLine."Account Type"::"G/L Account", - Account, - "Gen. Journal Document Type"::" ", - -SumLCYAmt, - Text1100004, - ''); - end; - end; - - if not IsOpenBill then - DocPost.InsertDtldVendLedgEntry( - VendLedgEntry, - NewDocAmount, - NewDocAmountLCY, - EntryType::Redrawal, - PostingDate); - end; - - trigger OnPostDataItem() - var - GenJnlLine2: Record "Gen. Journal Line" temporary; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - begin - Window.Close(); - - if ArePostedDocs then - PostedPmtOrd.Modify() - else - ClosedPmtOrd.Modify(); - if GenJnlLine.Find('-') then - repeat - GenJnlLine2 := GenJnlLine; - GenJnlPostLine.Run(GenJnlLine2); - until GenJnlLine.Next() = 0; - - Commit(); - - Message(Text1100005, DocCount); - end; - - trigger OnPreDataItem() - begin - ReasonCode := ''; - SourceCodeSetup.Get(); - SourceCode := SourceCodeSetup."Cartera Journal"; - - DocPost.CheckPostingDate(PostingDate); - - Window.Open( - Text1100001); - - DocCount := 0; - - if GenJnlLine.Find('+') then - GenJnlLineNextNo := GenJnlLine."Line No." + 10000 - else - GenJnlLineNextNo := 10000; - TransactionNo := GenJnlLine."Transaction No." + 1; - - Clear(PmtOrdPostingDate); - Find('-'); - case true of - PostedDoc.Get(PostedDoc.Type::Payable, "Entry No."): - begin - ArePostedDocs := true; - PostedPmtOrd.Get(PostedDoc."Bill Gr./Pmt. Order No."); - PmtOrdPostingDate := PostedPmtOrd."Posting Date"; - BankAcc.Get(PostedPmtOrd."Bank Account No."); - end; - ClosedDoc.Get(ClosedDoc.Type::Payable, "Entry No."): - begin - ArePostedDocs := false; - if ClosedDoc."Bill Gr./Pmt. Order No." <> '' then begin - ClosedPmtOrd.Get(ClosedDoc."Bill Gr./Pmt. Order No."); - PmtOrdPostingDate := ClosedPmtOrd."Posting Date"; - BankAcc.Get(ClosedPmtOrd."Bank Account No."); - end; - end; - else - CurrReport.Quit(); - end; - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(PostingDate; PostingDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Posting Date'; - ToolTip = 'Specifies the posting date.'; - } - field(NewDueDate; NewDueDate) - { - ApplicationArea = Basic, Suite; - Caption = 'New Due Date'; - ToolTip = 'Specifies the new due date we want to define for the new bill that will be created by redrawing.'; - } - field(NewPmtMethod; NewPmtMethod) - { - ApplicationArea = Basic, Suite; - Caption = 'New Payment Method'; - TableRelation = "Payment Method" where("Create Bills" = const(true)); - ToolTip = 'Specifies a new method if you want it to be different from the one in the old bill that we are redrawing.'; - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - PostingDate := WorkDate(); - end; - } - - labels - { - } - - trigger OnPreReport() - begin - if NewDueDate = 0D then - Error(Text1100000); - end; - - var - Text1100000: Label 'Please, specify a New Due Date for the redrawn bill.'; - Text1100001: Label 'Redrawing #1######'; - Text1100002: Label 'The New Due Date cannot be earlier than the current %1 in Bill %2 %3.'; - Text1100003: Label 'Bill %1/%2'; - Text1100004: Label 'Residual adjust generated by rounding Amount'; - Text1100005: Label '%1 bills have been redrawn.'; - Vendor: Record Vendor; - VendPostingGr: Record "Vendor Posting Group"; - GenJnlLine: Record "Gen. Journal Line" temporary; - PostedDoc: Record "Posted Cartera Doc."; - ClosedDoc: Record "Closed Cartera Doc."; - PostedPmtOrd: Record "Posted Payment Order"; - ClosedPmtOrd: Record "Closed Payment Order"; - BankAcc: Record "Bank Account"; - BankAccPostingGr: Record "Bank Account Posting Group"; - Currency: Record Currency; - SourceCodeSetup: Record "Source Code Setup"; - CarteraManagement: Codeunit CarteraManagement; - DocPost: Codeunit "Document-Post"; - Window: Dialog; - TransactionNo: Integer; - ArePostedDocs: Boolean; - PostingDate: Date; - PmtOrdPostingDate: Date; - SourceCode: Code[10]; - ReasonCode: Code[10]; - NewDocAmount: Decimal; - NewDocAmountLCY: Decimal; - GenJnlLineNextNo: Integer; - DocCount: Integer; - Account: Code[20]; - DocNo: Code[20]; - NewDueDate: Date; - NewPmtMethod: Code[10]; - AmtForCollection: Decimal; - SumLCYAmt: Decimal; - IsOpenBill: Boolean; - EntryType: Option " ","Initial Entry",Application,"Unrealized Loss","Unrealized Gain","Realized Loss","Realized Gain","Payment Discount","Payment Discount (VAT Excl.)","Payment Discount (VAT Adjustment)","Appln. Rounding","Correction of Remaining Amount",,,,,,,,,Settlement,Rejection,Redrawal,Expenses; - - local procedure GenJnlLineInit() - begin - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - GenJnlLine."Transaction No." := TransactionNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."Reason Code" := ReasonCode; - GenJnlLine."System-Created Entry" := true; - end; - - local procedure InsertGenJnlLine(AccountType2: Enum "Gen. Journal Account Type"; AccountNo2: Code[20]; DocumentType2: Enum "Gen. Journal Document Type"; Amount2: Decimal; Description2: Text[250]; DocNo2: Code[20]) - var - PreservedDueDate: Date; - PreservedPaymentMethodCode: Code[10]; - begin - GenJnlLine."Account Type" := AccountType2; - PreservedDueDate := GenJnlLine."Due Date"; - PreservedPaymentMethodCode := GenJnlLine."Payment Method Code"; - GenJnlLine.Validate("Account No.", AccountNo2); - GenJnlLine."Due Date" := PreservedDueDate; - GenJnlLine."Payment Method Code" := PreservedPaymentMethodCode; - GenJnlLine."Document Type" := DocumentType2; - GenJnlLine."Document No." := VendLedgEntry."Document No."; - GenJnlLine."Bill No." := DocNo2; - GenJnlLine.Description := CopyStr(Description2, 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", VendLedgEntry."Currency Code"); - GenJnlLine.Validate(Amount, Amount2); - GenJnlLine."Dimension Set ID" := - CarteraManagement.GetCombinedDimSetID(GenJnlLine, VendLedgEntry."Dimension Set ID"); - - OnBeforeInsertGenJnlLine(GenJnlLine, VendLedgEntry, NewPmtMethod); - GenJnlLine.Insert(); - end; - - [Scope('OnPrem')] - procedure InsertGainLoss() - var - GLEntry: Record "G/L Entry"; - DocMisc: Codeunit "Document-Misc"; - GainLossAmt: Decimal; - PostingDate2: Date; - TempCurrencyCode: Code[10]; - AccNo: Code[20]; - Type: Option Receivable,Payable; - TypeDoc: Option Bill,Invoice; - begin - Currency.Get(VendLedgEntry."Currency Code"); - AccNo := GetAccount(); - if ArePostedDocs then - if VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Bill then - DocMisc.FilterGLEntry(GLEntry, AccNo, PostedDoc."Document No.", PostedDoc."No.", TypeDoc::Bill, '') - else - DocMisc.FilterGLEntry(GLEntry, AccNo, PostedDoc."Document No.", PostedDoc."No.", TypeDoc::Invoice, '') - else - if VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Bill then - DocMisc.FilterGLEntry(GLEntry, AccNo, ClosedDoc."Document No.", ClosedDoc."No.", TypeDoc::Bill, '') - else - DocMisc.FilterGLEntry(GLEntry, AccNo, ClosedDoc."Document No.", ClosedDoc."No.", TypeDoc::Invoice, ''); - - if GLEntry.Find('-') then begin - GainLossAmt := 0; - GLEntry.CalcSums(Amount); - GainLossAmt := (GenJnlLine."Amount (LCY)" + GLEntry.Amount); - end else begin - PostingDate2 := 0D; - GainLossAmt := 0; - if ArePostedDocs then begin - PostingDate2 := - CarteraManagement.GetLastDate(VendLedgEntry."Currency Code", PostedDoc."Honored/Rejtd. at Date", Type::Payable); - GainLossAmt := CarteraManagement.GetGainLoss(PostingDate2, PostingDate, PostedDoc."Original Amount", VendLedgEntry. - "Currency Code"); - end else begin - PostingDate2 := - CarteraManagement.GetLastDate(VendLedgEntry."Currency Code", ClosedDoc."Honored/Rejtd. at Date", Type::Payable); - GainLossAmt := CarteraManagement.GetGainLoss(PostingDate2, PostingDate, ClosedDoc."Original Amount", VendLedgEntry. - "Currency Code"); - end; - end; - - if GainLossAmt <> 0 then begin - TempCurrencyCode := VendLedgEntry."Currency Code"; - VendLedgEntry."Currency Code" := ''; - if GainLossAmt < 0 then begin - Currency.TestField("Realized Gains Acc."); - GenJnlLineInit(); - InsertGenJnlLine( - GenJnlLine."Account Type"::"G/L Account", - Currency."Realized Gains Acc.", - "Gen. Journal Document Type"::" ", - GainLossAmt, - StrSubstNo( - Text1100003, - VendLedgEntry."Document No.", - VendLedgEntry."Bill No."), - ''); - end else begin - Currency.TestField("Realized Losses Acc."); - GenJnlLineInit(); - InsertGenJnlLine( - GenJnlLine."Account Type"::"G/L Account", - Currency."Realized Losses Acc.", - "Gen. Journal Document Type"::" ", - GainLossAmt, - StrSubstNo( - Text1100003, - VendLedgEntry."Document No.", - VendLedgEntry."Bill No."), - ''); - end; - GenJnlLineInit(); - - BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); - InsertGenJnlLine( - GenJnlLine."Account Type"::"G/L Account", - BankAccPostingGr."G/L Account No.", - "Gen. Journal Document Type"::" ", - -GainLossAmt, - StrSubstNo( - Text1100003, - VendLedgEntry."Document No.", - VendLedgEntry."Bill No."), - ''); - VendLedgEntry."Currency Code" := TempCurrencyCode; - end; - end; - - [Scope('OnPrem')] - procedure GetAccount(): Code[20] - begin - BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); - exit(BankAccPostingGr."G/L Account No."); - end; - - [Scope('OnPrem')] - procedure CheckUnrealizedVAT(VendLedgEntry: Record "Vendor Ledger Entry") - var - VATPostingSetup: Record "VAT Posting Setup"; - VendLedgEntry2: Record "Vendor Ledger Entry"; - ExistVATNOReal: Boolean; - Text1100001: Label 'You can not redraw a bill when this contains Unrealized VAT.'; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - begin - VendLedgEntry2.SetCurrentKey("Document No.", "Document Type", "Vendor No."); - VendLedgEntry2.SetRange("Document No.", VendLedgEntry."Document No."); - VendLedgEntry2.SetRange("Document Type", VendLedgEntry."Document Type"); - VendLedgEntry2.SetRange("Vendor No.", VendLedgEntry."Vendor No."); - if VendLedgEntry2.FindFirst() then begin - OnBeforeVendFindVATSetup(VendLedgEntry2); - ExistVATNOReal := GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry2, false); - end; - if ExistVATNOReal then - Error(Text1100001); - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeInsertGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; VendorLedgerEntry: Record "Vendor Ledger Entry"; NewPaymentMethod: Code[10]) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeVendFindVATSetup(var VendorLedgerEntry: Record "Vendor Ledger Entry") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterGetVendorLedgerEntryOnBeforeCheckNewDueDate(var VendorLedgerEntry: Record "Vendor Ledger Entry"; NewDueDate: Date; var IsHandled: Boolean) - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/SettleDocsinPostedPO.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/SettleDocsinPostedPO.Report.al deleted file mode 100644 index 79bd391d267..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/SettleDocsinPostedPO.Report.al +++ /dev/null @@ -1,528 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Finance.VAT.Ledger; -using Microsoft.Finance.VAT.Setup; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.History; -using Microsoft.Sales.Receivables; - -report 7000082 "Settle Docs. in Posted PO" -{ - Caption = 'Settle Docs. in Posted PO'; - Permissions = TableData "Cust. Ledger Entry" = imd, - TableData "Vendor Ledger Entry" = imd, - TableData "G/L Register" = m, - TableData "Posted Cartera Doc." = imd, - TableData "Closed Cartera Doc." = imd, - TableData "Posted Payment Order" = imd, - TableData "Closed Payment Order" = imd; - ProcessingOnly = true; - - dataset - { - dataitem(PostedDoc; "Posted Cartera Doc.") - { - DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where(Status = const(Open)); - - trigger OnAfterGetRecord() - var - FromJnl: Boolean; - IsHandled: Boolean; - begin - IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("No."); - if "Document Type" = "Document Type"::Invoice then - ExistInvoice := true; - - IsHandled := false; - OnAfterGetPostedDocOnBeforePostedPmtOrdGet(PostedDoc, PostedPmtOrd, BankAcc, Delay, IsHandled); - if not IsHandled then begin - PostedPmtOrd.Get("Bill Gr./Pmt. Order No."); - BankAcc.Get(PostedPmtOrd."Bank Account No."); - Delay := BankAcc."Delay for Notices"; - end; - - if DueOnly and (PostingDate < "Due Date" + Delay) then - CurrReport.Skip(); - - DocCount := DocCount + 1; - Window.Update(1, DocCount); - - case "Document Type" of - "Document Type"::Invoice, "Document Type"::"Credit Memo": - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine."Document Date" := GenJnlLine."Document Date"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); - VendLedgEntry.Get(PostedDoc."Entry No."); - OnBeforeValidateInvoiceAccountNo( - PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, FromJnl, ExistsNoRealVAT, PostedPmtOrd); - GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100001, PostedDoc."Document No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine."Posting Group" := VendLedgEntry."Vendor Posting Group"; - if PaymentToleranceMgt.CheckCalcPmtDiscGenJnlVend(GenJnlLine, VendLedgEntry, 0, false) then - GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount" + VendLedgEntry."Remaining Pmt. Disc. Possible") - else - GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount"); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine.Validate("Recipient Bank Account", VendLedgEntry."Recipient Bank Account"); - GenJnlLine.Validate("Dimension Set ID", VendLedgEntry."Dimension Set ID"); - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - GroupAmount := GroupAmount + "Remaining Amount"; - if PaymentToleranceMgt.CheckCalcPmtDiscGenJnlVend(GenJnlLine, VendLedgEntry, 0, false) then - CalcBankAccount("No.", "Remaining Amount" + VendLedgEntry."Remaining Pmt. Disc. Possible", VendLedgEntry."Entry No.") - else - CalcBankAccount("No.", "Remaining Amount", VendLedgEntry."Entry No."); - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - VendLedgEntry.Modify(); - OnAfterCreateInvoiceGenJnlLine( - GenJnlLine, VendLedgEntry, PostedDoc, PostedPmtOrd, FromJnl, ExistsNoRealVAT, ExistVATEntry, - IsRedrawn, FirstVATEntryNo, LastVATEntryNo, NoRealVATBuffer, BankAccPostBuffer); - end; - "Document Type"::Bill: - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Vendor); - VendLedgEntry.Get(PostedDoc."Entry No."); - - if GLSetup."Unrealized VAT" then begin - FromJnl := false; - if PostedDoc."From Journal" then - FromJnl := true; - ExistsNoRealVAT := GenJnlPostLine.VendFindVATSetup(VATPostingSetup, VendLedgEntry, FromJnl); - end; - - GenJnlLine.Validate("Account No.", VendLedgEntry."Vendor No."); - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100002, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, PostedDoc."Remaining Amount"); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := VendLedgEntry."Document No."; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine.Validate("Recipient Bank Account", VendLedgEntry."Recipient Bank Account"); - GenJnlLine.Validate("Dimension Set ID", VendLedgEntry."Dimension Set ID"); - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - if GLSetup."Unrealized VAT" and ExistsNoRealVAT and (not IsRedrawn) then begin - VendLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - - OnBeforeVendUnrealizedVAT2(PostedDoc, GenJnlLine, VendLedgEntry, PostedPmtOrd, NoRealVATBuffer); - CarteraManagement.VendUnrealizedVAT2( - VendLedgEntry, - VendLedgEntry."Remaining Amt. (LCY)", - GenJnlLine, - ExistVATEntry, - FirstVATEntryNo, - LastVATEntryNo, - NoRealVATBuffer, - FromJnl, - "Document No."); - - TempCurrCode := "Currency Code"; - "Currency Code" := ''; - - if NoRealVATBuffer.Find('-') then begin - repeat - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer.Account, - NoRealVATBuffer.Amount, - "Dimension Set ID"); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer."Balance Account", - -NoRealVATBuffer.Amount, - "Dimension Set ID"); - until NoRealVATBuffer.Next() = 0; - NoRealVATBuffer.DeleteAll(); - end; - - "Currency Code" := TempCurrCode; - end; - GroupAmount := GroupAmount + "Remaining Amount"; - CalcBankAccount("No.", "Remaining Amount", VendLedgEntry."Entry No."); - VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Honored; - VendLedgEntry.Modify(); - OnAfterCreateBillGenJnlLine( - GenJnlLine, VendLedgEntry, PostedDoc, PostedPmtOrd, FromJnl, ExistsNoRealVAT, ExistVATEntry, - IsRedrawn, FirstVATEntryNo, LastVATEntryNo, NoRealVATBuffer, BankAccPostBuffer); - end; - end; - end; - - trigger OnPostDataItem() - var - VendLedgEntry2: Record "Vendor Ledger Entry"; - PostedDoc2: Record "Posted Cartera Doc."; - IsHandled: Boolean; - begin - if (DocCount = 0) or (GroupAmount = 0) then begin - if DueOnly then - Error(Text1100003 + Text1100004); - - Error(Text1100003 + Text1100005); - end; - - IsHandled := false; - OnBeforePostedDocOnPostDataItem(PostedDoc, PostedPmtOrd, BankAccPostBuffer, IsHandled, GenJnlLine, GenJnlLineNextNo, SumLCYAmt, PostingDate, SourceCode); - if not IsHandled then - if BankAccPostBuffer.Find('-') then - repeat - VendLedgEntry2.Get(BankAccPostBuffer."Entry No."); - PostedDoc2.Get(1, VendLedgEntry2."Entry No."); - PostedPmtOrd.Get(PostedDoc2."Bill Gr./Pmt. Order No."); - BankAcc.Get(PostedPmtOrd."Bank Account No."); - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); - GenJnlLine.Validate("Account No.", BankAcc."No."); - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100006, PostedPmtOrd."No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedPmtOrd."Currency Code"); - GenJnlLine.Validate(Amount, -BankAccPostBuffer.Amount); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine.Validate("Dimension Set ID", CarteraManagement.GetCombinedDimSetID(GenJnlLine, BankAccPostBuffer."Dimension Set ID")); - GenJnlLine."System-Created Entry" := true; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); - GenJnlLine.Insert(); - - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - until BankAccPostBuffer.Next() = 0; - - if PostedPmtOrd."Currency Code" <> '' then - if SumLCYAmt <> 0 then begin - Currency.SetFilter(Code, PostedPmtOrd."Currency Code"); - Currency.FindFirst(); - if SumLCYAmt > 0 then begin - Currency.TestField("Residual Gains Account"); - Acct := Currency."Residual Gains Account"; - end else begin - Currency.TestField("Residual Losses Account"); - Acct := Currency."Residual Losses Account"; - end; - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); - GenJnlLine.Validate("Account No.", Acct); - GenJnlLine.Description := Text1100007; - GenJnlLine.Validate("Currency Code", ''); - GenJnlLine.Validate(Amount, -SumLCYAmt); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); - GenJnlLine.Insert(); - end; - - PostedPmtOrd.Modify(); - DocPost.PostSettlementForPostedPmtOrder(GenJnlLine, PostingDate); - OnAfterPostSettlementForPostedPmtOrder(PostedDoc, PostedPmtOrd); - - Window.Close(); - - if (Counter > 1) and GLSetup."Unrealized VAT" and ExistVATEntry and ExistInvoice then begin - if VATEntry.FindLast() then - ToVATEntryNo := VATEntry."Entry No."; - GLReg.FindLast(); - GLReg."From VAT Entry No." := FromVATEntryNo; - GLReg."To VAT Entry No." := ToVATEntryNo; - GLReg.Modify(); - end else - if ExistVATEntry then begin - GLReg.FindLast(); - GLReg."From VAT Entry No." := FirstVATEntryNo; - GLReg."To VAT Entry No." := LastVATEntryNo; - GLReg.Modify(); - end; - - IsHandled := false; - OnBeforeCommit(PostedDoc, PostedPmtOrd, GenJnlLine, HidePrintDialog, IsHandled); - if IsHandled then - exit; - - Commit(); - - if not HidePrintDialog then - Message(Text1100008, DocCount, GroupAmount); - end; - - trigger OnPreDataItem() - begin - OnBeforePostedDocOnPreDataItem(PostedDoc, PostingDate); - DocPost.CheckPostingDate(PostingDate); - - SourceCodeSetup.Get(); - SourceCode := SourceCodeSetup."Cartera Journal"; - DocCount := 0; - SumLCYAmt := 0; - GenJnlLineNextNo := 0; - ExistInvoice := false; - ExistVATEntry := false; - Window.Open( - Text1100000); - Counter := Count; - if (Counter > 1) and GLSetup."Unrealized VAT" then begin - VATEntry.LockTable(); - if VATEntry.FindLast() then - FromVATEntryNo := VATEntry."Entry No." + 1; - end; - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(PostingDate; PostingDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Posting Date'; - NotBlank = true; - ToolTip = 'Specifies the posting date for the document.'; - } - field(DueOnly; DueOnly) - { - ApplicationArea = Basic, Suite; - Caption = 'Due bills only'; - ToolTip = 'Specifies if you want to only include documents that have become overdue. If it does not matter if a document is overdue at the time of settlement, leave this field blank.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - trigger OnInitReport() - begin - PostingDate := WorkDate(); - end; - - trigger OnPreReport() - begin - GLSetup.Get(); - end; - - var - Text1100000: Label 'Settling payable documents #1######'; - Text1100001: Label 'Payable document settlement %1'; - Text1100002: Label 'Payable bill settlement %1/%2'; - Text1100003: Label 'No payable documents have been found that can be settled.'; - Text1100004: Label 'Please check that the selection is not empty and at least one payable document is open and due.'; - Text1100005: Label 'Please check that the selection is not empty and at least one payable document is open.'; - Text1100006: Label 'Payment Order settlement %1'; - Text1100007: Label 'Residual adjust generated by rounding Amount'; - Text1100008: Label '%1 documents totaling %2 have been settled.'; - Text1100009: Label 'Document settlement %1/%2'; - SourceCodeSetup: Record "Source Code Setup"; - PostedPmtOrd: Record "Posted Payment Order"; - GenJnlLine: Record "Gen. Journal Line" temporary; - VendLedgEntry: Record "Vendor Ledger Entry"; - BankAcc: Record "Bank Account"; - Currency: Record Currency; - GLReg: Record "G/L Register"; - GLSetup: Record "General Ledger Setup"; - VATPostingSetup: Record "VAT Posting Setup"; - VATEntry: Record "VAT Entry"; - BankAccPostBuffer: Record "BG/PO Post. Buffer" temporary; - NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; - DocPost: Codeunit "Document-Post"; - CarteraManagement: Codeunit CarteraManagement; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - PaymentToleranceMgt: Codeunit "Payment Tolerance Management"; - Window: Dialog; - PostingDate: Date; - DueOnly: Boolean; - Delay: Decimal; - SourceCode: Code[10]; - Acct: Code[20]; - DocCount: Integer; - GroupAmount: Decimal; - GenJnlLineNextNo: Integer; - SumLCYAmt: Decimal; - ExistVATEntry: Boolean; - FirstVATEntryNo: Integer; - LastVATEntryNo: Integer; - IsRedrawn: Boolean; - ExistInvoice: Boolean; - FromVATEntryNo: Integer; - ToVATEntryNo: Integer; - Counter: Integer; - TempCurrCode: Code[10]; - ExistsNoRealVAT: Boolean; - HidePrintDialog: Boolean; - - local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal; DimSetID: Integer) - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedPmtOrd."No."; - GenJnlLine."Reason Code" := PostedPmtOrd."Reason Code"; - GenJnlLine."Account Type" := AccType; - GenJnlLine."Account No." := AccNo; - if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)) - else - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedDoc."Document No.", PostedDoc."No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, -Amount2); - GenJnlLine."Applies-to Doc. Type" := VendLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := ''; - GenJnlLine."Applies-to Bill No." := VendLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine.Validate("Dimension Set ID", DimSetID); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, VendLedgEntry, PostedPmtOrd, BankAcc); - GenJnlLine.Insert(); - end; - - [Scope('OnPrem')] - procedure CalcBankAccount(BankAcc2: Code[20]; Amount2: Decimal; EntryNo: Integer) - var - IsHandled: Boolean; - begin - IsHandled := false; - OnBeforeCalcBankAccount(BankAcc2, Amount2, EntryNo, BankAccPostBuffer, IsHandled); - if IsHandled then - exit; - - if BankAccPostBuffer.Get(BankAcc2, '', EntryNo) then begin - BankAccPostBuffer.Amount := BankAccPostBuffer.Amount + Amount2; - BankAccPostBuffer.Modify(); - end else begin - BankAccPostBuffer.Init(); - BankAccPostBuffer.Account := BankAcc2; - BankAccPostBuffer.Amount := Amount2; - BankAccPostBuffer."Entry No." := EntryNo; - BankAccPostBuffer."Global Dimension 1 Code" := VendLedgEntry."Global Dimension 1 Code"; - BankAccPostBuffer."Global Dimension 2 Code" := VendLedgEntry."Global Dimension 2 Code"; - BankAccPostBuffer."Dimension Set ID" := VendLedgEntry."Dimension Set ID"; - BankAccPostBuffer.Insert(); - end; - end; - - procedure SetHidePrintDialog(NewHidePrintDialog: Boolean) - begin - HidePrintDialog := NewHidePrintDialog; - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterCreateBillGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var ExistVATEntry: Boolean; var IsRedrawn: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var BankBgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterCreateInvoiceGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var ExistVATEntry: Boolean; var IsRedrawn: Boolean; var FirstVATEntryNo: Integer; var LastVATEntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var BankBgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterGetPostedDocOnBeforePostedPmtOrdGet(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var BankAccount: Record "Bank Account"; var Delay: Decimal; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterPostSettlementForPostedPmtOrder(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCommit(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var GenJournalLine: Record "Gen. Journal Line"; var HidePrintDialog: Boolean; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCalcBankAccount(BankAcc2: Code[20]; Amount2: Decimal; EntryNo: Integer; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var IsHandled: Boolean) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeGenJournalLineInsert(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BankAccount: Record "Bank Account") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforePostedDocOnPostDataItem(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer"; var IsHandled: Boolean; var GenJnlLine: Record "Gen. Journal Line"; var GenJnlLineNextNo: Integer; var SumLCYAmt: Decimal; PostingDate: Date; SourceCode: Code[10]) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforePostedDocOnPreDataItem(var PostedCarteraDoc: Record "Posted Cartera Doc."; var PostingDate: Date) - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeValidateInvoiceAccountNo(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var FromJnl: Boolean; var ExistsNoRealVAT: Boolean; var PostedPaymentOrder: Record "Posted Payment Order") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeVendUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PostedPaymentOrder: Record "Posted Payment Order"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Purchases/Payables/VoidPOExport.Report.al b/src/Layers/ES/BaseApp/Local/Purchases/Payables/VoidPOExport.Report.al deleted file mode 100644 index 729936257ef..00000000000 --- a/src/Layers/ES/BaseApp/Local/Purchases/Payables/VoidPOExport.Report.al +++ /dev/null @@ -1,124 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Purchases.Payables; - -using Microsoft.Bank.BankAccount; -using Microsoft.EServices.EDocument; -using Microsoft.Finance.ReceivablesPayables; - -report 7000061 "Void PO - Export" -{ - ApplicationArea = Basic, Suite; - Caption = 'Void PO - Export'; - ProcessingOnly = true; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem("Payment Order"; "Payment Order") - { - DataItemTableView = sorting("No.") where("Elect. Pmts Exported" = const(true)); - dataitem("Cartera Doc."; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemTableView = sorting(Type, "Bill Gr./Pmt. Order No.", "Category Code", "Currency Code", Accepted, "Due Date"); - - trigger OnAfterGetRecord() - var - ElectPmtMgmt: Codeunit "Elect. Pmts Management"; - begin - TestField("Elect. Pmts Exported", true); - TestField("Document No."); - ElectPmtMgmt.ProcessElectronicPayment("Document No.", "Payment Order"."Bank Account No."); - - "Elect. Pmts Exported" := false; - "Export File Name" := ''; - Modify(); - end; - } - - trigger OnAfterGetRecord() - begin - if FirstTime then begin - BankAccount.Get("Bank Account No."); - "Cartera Doc.".SetRange(Type, "Cartera Doc.".Type::Payable); - "Cartera Doc.".SetRange("Bill Gr./Pmt. Order No.", "No."); - if "Cartera Doc.".FindFirst() then - FileName := "Cartera Doc."."Export File Name"; - if Exists(FileName) then - Erase(FileName); - FirstTime := false; - end; - TestField("Bank Account No."); - - "Elect. Pmts Exported" := false; - Modify(); - end; - - trigger OnPreDataItem() - begin - SetRange("No.", "No."); - - if not FindFirst() then - Error(Text1100002); - - FirstTime := true; - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(PaymentOrderNo; "Payment Order"."No.") - { - ApplicationArea = Basic, Suite; - Caption = 'Payment Order No.'; - TableRelation = "Payment Order"; - ToolTip = 'Specifies the number of the payment order.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - trigger OnPostReport() - begin - Message(Text1100001, FileName); - end; - - trigger OnPreReport() - begin - "Payment Order".Get("Payment Order"."No."); - BankAccount.Get("Payment Order"."Bank Account No."); - BankAccount.TestField("Currency Code", ''); - if not Confirm(Text1100000, false, "Payment Order"."No.", BankAccount.TableCaption(), BankAccount."No.") then - CurrReport.Quit(); - end; - - var - BankAccount: Record "Bank Account"; - FirstTime: Boolean; - FileName: Text[250]; - Text1100000: Label 'Are you SURE you want to Void all of the Cartera Electronic Payments in Order %1 written against %2 %3?'; - Text1100001: Label 'The exported Electronic Payment File %1 has been voided. To post the Payment Order you must first export the Electronic Payment File again.'; - Text1100002: Label 'There is nothing to Void.'; -} diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostBGAnalysisLCYFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostBGAnalysisLCYFactBox.Page.al deleted file mode 100644 index 2781e6831fe..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostBGAnalysisLCYFactBox.Page.al +++ /dev/null @@ -1,174 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; - -page 35292 "Post. BG Analysis LCY Fact Box" -{ - Caption = 'Post. BG Analysis LCY Fact Box'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SourceTable = "Posted Bill Group"; - - layout - { - area(content) - { - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code for the posted bill group.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount in this posted bill group.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; - } - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoOpen; NoOpen) - { - ApplicationArea = Basic, Suite; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - group("Amount (LCY)") - { - Caption = 'Amount (LCY)'; - field(OpenAmtLCY; OpenAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmtLCY; HonoredAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(RejectedAmtLCY; RejectedAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmtLCY; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - PostedDoc: Record "Posted Cartera Doc."; - OpenAmt: Decimal; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - OpenAmtLCY: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoOpen: Integer; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); - PostedDoc.SetRange(Type, PostedDoc.Type::Receivable); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); - Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - OpenAmt := PostedDoc."Amount for Collection"; - OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoOpen := PostedDoc.Count; - - PostedDoc.SetRange(Status); - PostedDoc.SetRange(Redrawn, true); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := PostedDoc."Amount for Collection"; - RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRedrawn := PostedDoc.Count; - PostedDoc.SetRange(Redrawn); - - PostedDoc.SetRange(Status, PostedDoc.Status::Honored); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; - HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; - NoHonored := PostedDoc.Count - NoRedrawn; - - PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RejectedAmt := PostedDoc."Amount for Collection"; - RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRejected := PostedDoc.Count; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostBGAnalysisNonLCYFB.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostBGAnalysisNonLCYFB.Page.al deleted file mode 100644 index c489bc7c4c5..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostBGAnalysisNonLCYFB.Page.al +++ /dev/null @@ -1,174 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; - -page 35293 "Post. BG Analysis Non LCY FB" -{ - Caption = 'Post. BG Analysis Non LCY FB'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SourceTable = "Posted Bill Group"; - - layout - { - area(content) - { - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code for the posted bill group.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount in this posted bill group.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; - } - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoOpen; NoOpen) - { - ApplicationArea = Basic, Suite; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - group(Amount) - { - Caption = 'Amount'; - field(OpenAmt; OpenAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmt; HonoredAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(RejectedAmt; RejectedAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmt; RedrawnAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - PostedDoc: Record "Posted Cartera Doc."; - OpenAmt: Decimal; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - OpenAmtLCY: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoOpen: Integer; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); - PostedDoc.SetRange(Type, PostedDoc.Type::Receivable); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); - Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - OpenAmt := PostedDoc."Amount for Collection"; - OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoOpen := PostedDoc.Count; - - PostedDoc.SetRange(Status); - PostedDoc.SetRange(Redrawn, true); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := PostedDoc."Amount for Collection"; - RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRedrawn := PostedDoc.Count; - PostedDoc.SetRange(Redrawn); - - PostedDoc.SetRange(Status, PostedDoc.Status::Honored); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; - HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; - NoHonored := PostedDoc.Count - NoRedrawn; - - PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RejectedAmt := PostedDoc."Amount for Collection"; - RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRejected := PostedDoc.Count; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGrMaturityLines.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGrMaturityLines.Page.al deleted file mode 100644 index f4633bf6253..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGrMaturityLines.Page.al +++ /dev/null @@ -1,139 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Enums; -using Microsoft.Foundation.Period; -using System.Utilities; - -page 7000034 "Posted Bill Gr. Maturity Lines" -{ - Caption = 'Lines'; - PageType = ListPart; - SourceTable = Date; - - layout - { - area(content) - { - repeater(Control1) - { - Editable = false; - ShowCaption = false; - field("Period Start"; Rec."Period Start") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the starting date of the period that you want to view.'; - } - field("Period Name"; Rec."Period Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name of the period shown on the line.'; - } - field(DocAmount; DocAmount) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = PostedBillGr."Currency Code"; - AutoFormatType = 1; - Caption = 'Amount'; - DrillDown = true; - ToolTip = 'Specifies the amount for the posted bill group for the period.'; - - trigger OnDrillDown() - begin - ShowDocEntries(); - end; - } - field(DocAmountLCY; DocAmountLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amount (LCY)'; - DrillDown = true; - ToolTip = 'Specifies the amount for the posted bill group for the period.'; - - trigger OnDrillDown() - begin - ShowDocEntries(); - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - SetDateFilter(); - if PostedBillGr."No." <> '' then begin - PostedBillGr.CalcFields("Amount Grouped", "Amount Grouped (LCY)"); - DocAmount := PostedBillGr."Amount Grouped"; - DocAmountLCY := PostedBillGr."Amount Grouped (LCY)"; - end else begin - DocAmount := 0; - DocAmountLCY := 0; - end; - end; - - trigger OnFindRecord(Which: Text): Boolean - begin - exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); - end; - - trigger OnNextRecord(Steps: Integer): Integer - begin - exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); - end; - - trigger OnOpenPage() - begin - Rec.Reset(); - end; - - var - PostedBillGr: Record "Posted Bill Group"; - PostedDoc: Record "Posted Cartera Doc."; - PeriodPageManagement: Codeunit PeriodPageManagement; - PeriodLength: Enum "Analysis Period Type"; - AmountType: Enum "Analysis Amount Type"; - DocAmount: Decimal; - DocAmountLCY: Decimal; - - [Scope('OnPrem')] - procedure Set(var NewPostedBillGr: Record "Posted Bill Group"; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") - begin - PostedBillGr.Copy(NewPostedBillGr); - PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); - AmountType := "Analysis Amount Type".FromInteger(NewAmountType); - CurrPage.Update(false); - end; - - [Scope('OnPrem')] - procedure SetDateFilter() - begin - if AmountType = AmountType::"Net Change" then - PostedBillGr.SetRange("Due Date Filter", Rec."Period Start", Rec."Period End") - else - PostedBillGr.SetRange("Due Date Filter", 0D, Rec."Period End"); - end; - - local procedure ShowDocEntries() - begin - SetDateFilter(); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", PostedBillGr."No."); - PostedDoc.SetRange("Collection Agent", PostedDoc."Collection Agent"::Bank); - PostedDoc.SetFilter("Due Date", PostedBillGr.GetFilter("Due Date Filter")); - PostedDoc.SetFilter("Global Dimension 1 Code", PostedBillGr.GetFilter("Global Dimension 1 Filter")); - PostedDoc.SetFilter("Global Dimension 2 Code", PostedBillGr.GetFilter("Global Dimension 2 Filter")); - PostedDoc.SetFilter("Category Code", PostedBillGr.GetFilter("Category Filter")); - PAGE.RunModal(0, PostedDoc); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroup.Table.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroup.Table.al deleted file mode 100644 index 353973e7f95..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroup.Table.al +++ /dev/null @@ -1,281 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -table 7000006 "Posted Bill Group" -{ - Caption = 'Posted Bill Group'; - DrillDownPageID = "Posted Bill Groups List"; - LookupPageID = "Posted Bill Groups List"; - DataClassification = CustomerContent; - - fields - { - field(2; "No."; Code[20]) - { - Caption = 'No.'; - } - field(3; "Bank Account No."; Code[20]) - { - Caption = 'Bank Account No.'; - TableRelation = "Bank Account"; - } - field(4; "Bank Account Name"; Text[100]) - { - CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); - Caption = 'Bank Account Name'; - Editable = false; - FieldClass = FlowField; - } - field(5; "Posting Description"; Text[100]) - { - Caption = 'Posting Description'; - } - field(6; "Dealing Type"; Enum "Cartera Dealing Type") - { - Caption = 'Dealing Type'; - Editable = false; - } - field(7; Amount; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Receivable))); - Caption = 'Amount'; - Editable = false; - FieldClass = FlowField; - } - field(8; "Reason Code"; Code[10]) - { - Caption = 'Reason Code'; - TableRelation = "Reason Code"; - } - field(9; "No. Printed"; Integer) - { - Caption = 'No. Printed'; - } - field(10; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(11; Comment; Boolean) - { - CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), - Type = filter(Receivable))); - Caption = 'Comment'; - Editable = false; - FieldClass = FlowField; - } - field(12; "Category Filter"; Code[10]) - { - Caption = 'Category Filter'; - FieldClass = FlowFilter; - TableRelation = "Category Code"; - ValidateTableRelation = false; - } - field(13; "Due Date Filter"; Date) - { - Caption = 'Due Date Filter'; - FieldClass = FlowFilter; - } - field(14; "Global Dimension 1 Filter"; Code[20]) - { - CaptionClass = '1,3,1'; - Caption = 'Global Dimension 1 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(15; "Global Dimension 2 Filter"; Code[20]) - { - CaptionClass = '1,3,2'; - Caption = 'Global Dimension 2 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(16; "Amount Grouped"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Posted Cartera Doc."."Amount for Collection" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Receivable))); - Caption = 'Amount Grouped'; - Editable = false; - FieldClass = FlowField; - } - field(17; "Remaining Amount"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Posted Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Receivable))); - Caption = 'Remaining Amount'; - Editable = false; - FieldClass = FlowField; - } - field(18; "Status Filter"; Enum "Cartera Document Status") - { - Caption = 'Status Filter'; - FieldClass = FlowFilter; - } - field(29; "Collection Expenses Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Collection Expenses Amt.'; - } - field(30; "Discount Expenses Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Discount Expenses Amt.'; - } - field(31; "Discount Interests Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Discount Interests Amt.'; - } - field(32; "Rejection Expenses Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejection Expenses Amt.'; - } - field(33; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - Editable = false; - TableRelation = Currency; - } - field(34; "Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Receivable))); - Caption = 'Amount (LCY)'; - Editable = false; - FieldClass = FlowField; - } - field(35; "Amount Grouped (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Posted Cartera Doc."."Amt. for Collection (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Receivable))); - Caption = 'Amount Grouped (LCY)'; - Editable = false; - FieldClass = FlowField; - } - field(36; "Remaining Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Posted Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Receivable))); - Caption = 'Remaining Amount (LCY)'; - Editable = false; - FieldClass = FlowField; - } - field(37; "Risked Factoring Exp. Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Risked Factoring Exp. Amt.'; - } - field(38; "Unrisked Factoring Exp. Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Unrisked Factoring Exp. Amt.'; - } - field(39; Factoring; Option) - { - Caption = 'Factoring'; - Editable = false; - OptionCaption = ' ,Unrisked,Risked'; - OptionMembers = " ",Unrisked,Risked; - } - field(1200; "Partner Type"; Option) - { - Caption = 'Partner Type'; - OptionCaption = ' ,Company,Person'; - OptionMembers = " ",Company,Person; - } - } - - keys - { - key(Key1; "No.") - { - Clustered = true; - } - key(Key2; "Bank Account No.", "Posting Date") - { - SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; - } - key(Key3; "Bank Account No.", "Posting Date", "Currency Code") - { - SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; - } - key(Key4; "Bank Account No.", "Posting Date", Factoring) - { - SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; - } - } - - fieldgroups - { - } - - var - Text1100000: Label 'untitled'; - - procedure Caption(): Text - begin - if "No." = '' then - exit(Text1100000); - CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupListing.Report.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupListing.Report.al deleted file mode 100644 index 834ab98e324..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupListing.Report.al +++ /dev/null @@ -1,451 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Foundation.Company; -using Microsoft.Sales.Customer; -using System.Utilities; - -report 7000001 "Posted Bill Group Listing" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Sales/History/PostedBillGroupListing.rdlc'; - ApplicationArea = Basic, Suite; - Caption = 'Posted Bill Group Listing'; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem(PostedBillGr; "Posted Bill Group") - { - DataItemTableView = sorting("No."); - PrintOnlyIfDetail = true; - RequestFilterFields = "No."; - column(PostedBillGr_No_; "No.") - { - } - dataitem(CopyLoop; "Integer") - { - DataItemTableView = sorting(Number); - dataitem(PageLoop; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(Operation; Operation) - { - } - column(PostedBillGr__No__; PostedBillGr."No.") - { - } - column(STRSUBSTNO_Text1100003_CopyText_; StrSubstNo(Text1100003, CopyText)) - { - } - column(CompanyAddr_1_; CompanyAddr[1]) - { - } - column(CompanyAddr_2_; CompanyAddr[2]) - { - } - column(CompanyAddr_3_; CompanyAddr[3]) - { - } - column(CompanyAddr_4_; CompanyAddr[4]) - { - } - column(CompanyAddr_5_; CompanyAddr[5]) - { - } - column(CompanyAddr_6_; CompanyAddr[6]) - { - } - column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") - { - } - column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") - { - } - column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") - { - } - column(FORMAT_PostedBillGr__Posting_Date__; Format(PostedBillGr."Posting Date")) - { - } - column(BankAccAddr_4_; BankAccAddr[4]) - { - } - column(BankAccAddr_5_; BankAccAddr[5]) - { - } - column(BankAccAddr_6_; BankAccAddr[6]) - { - } - column(BankAccAddr_7_; BankAccAddr[7]) - { - } - column(BankAccAddr_3_; BankAccAddr[3]) - { - } - column(BankAccAddr_2_; BankAccAddr[2]) - { - } - column(BankAccAddr_1_; BankAccAddr[1]) - { - } - column(PostedBillGr__Currency_Code_; PostedBillGr."Currency Code") - { - } - column(FactoringType; FactoringType) - { - } - column(OutputNo; OutputNo) - { - } - column(PrintAmountsInLCY; PrintAmountsInLCY) - { - } - column(PageLoop_Number; Number) - { - } - column(PostedBillGr__No__Caption; PostedBillGr__No__CaptionLbl) - { - } - column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) - { - } - column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) - { - } - column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) - { - } - column(PostedBillGr__Posting_Date_Caption; PostedBillGr__Posting_Date_CaptionLbl) - { - } - column(PostedBillGr__Currency_Code_Caption; PostedBillGr__Currency_Code_CaptionLbl) - { - } - column(PageCaption; PageCaptionLbl) - { - } - dataitem(PostedDoc; "Posted Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = PostedBillGr; - DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where("Collection Agent" = const(Bank), Type = const(Receivable)); - column(AmtForCollection; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(AmtForCollection_Control32; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Customer_City; Customer.City) - { - } - column(Customer_County; Customer.County) - { - } - column(Customer__Post_Code_; Customer."Post Code") - { - } - column(Customer_Name; Customer.Name) - { - } - column(PostedDoc__Account_No__; "Account No.") - { - } - column(PostedDoc__Honored_Rejtd__at_Date_; "Honored/Rejtd. at Date") - { - } - column(PostedDoc_Status; Status) - { - } - column(PostedDoc__Document_No__; "Document No.") - { - } - column(PostedDoc__Document_Type_; "Document Type") - { - } - column(FORMAT__Due_Date__; Format("Due Date")) - { - } - column(PostedDoc__Document_Type_____PostedDoc__Document_Type___Bill; "Document Type" <> "Document Type"::Bill) - { - } - column(Customer_Name_Control28; Customer.Name) - { - } - column(Customer_City_Control30; Customer.City) - { - } - column(AmtForCollection_Control31; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Customer_County_Control35; Customer.County) - { - } - column(PostedDoc__Document_No___Control3; "Document No.") - { - } - column(PostedDoc__No__; "No.") - { - } - column(Customer__Post_Code__Control9; Customer."Post Code") - { - } - column(PostedDoc_Status_Control78; Status) - { - } - column(PostedDoc__Honored_Rejtd__at_Date__Control80; "Honored/Rejtd. at Date") - { - } - column(FORMAT__Due_Date___Control8; Format("Due Date")) - { - } - column(PostedDoc__Account_No___Control1; "Account No.") - { - } - column(PostedDoc__Document_Type__Control23; "Document Type") - { - } - column(PostedDoc__Document_Type____PostedDoc__Document_Type___Bill; "Document Type" = "Document Type"::Bill) - { - } - column(AmtForCollection_Control36; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(AmtForCollection_Control39; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(PostedDoc_Type; Type) - { - } - column(PostedDoc_Entry_No_; "Entry No.") - { - } - column(PostedDoc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") - { - } - column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) - { - } - column(Document_No_Caption; Document_No_CaptionLbl) - { - } - column(Bill_No_Caption; Bill_No_CaptionLbl) - { - } - column(Customer_Name_Control28Caption; Customer_Name_Control28CaptionLbl) - { - } - column(Customer__Post_Code__Control9Caption; Customer__Post_Code__Control9CaptionLbl) - { - } - column(Customer_City_Control30Caption; Customer_City_Control30CaptionLbl) - { - } - column(AmtForCollection_Control31Caption; AmtForCollection_Control31CaptionLbl) - { - } - column(Customer_County_Control35Caption; Customer_County_Control35CaptionLbl) - { - } - column(PostedDoc_Status_Control78Caption; FieldCaption(Status)) - { - } - column(PostedDoc__Honored_Rejtd__at_Date__Control80Caption; FieldCaption("Honored/Rejtd. at Date")) - { - } - column(PostedDoc__Due_Date__Control8Caption; PostedDoc__Due_Date__Control8CaptionLbl) - { - } - column(Customer_No_Caption; Customer_No_CaptionLbl) - { - } - column(PostedDoc__Document_Type__Control23Caption; FieldCaption("Document Type")) - { - } - column(ContinuedCaption; ContinuedCaptionLbl) - { - } - column(EmptyStringCaption; EmptyStringCaptionLbl) - { - } - column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) - { - } - column(TotalCaption; TotalCaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - Customer.Get("Account No."); - if PrintAmountsInLCY then - AmtForCollection := "Amt. for Collection (LCY)" - else - AmtForCollection := "Amount for Collection"; - end; - - trigger OnPreDataItem() - begin - Clear(AmtForCollection); - end; - } - } - - trigger OnAfterGetRecord() - begin - if Number > 1 then - CopyText := Text1100002; - OutputNo := OutputNo + 1; - end; - - trigger OnPreDataItem() - begin - NoOfLoops := Abs(NoOfCopies) + 1; - CopyText := ''; - SetRange(Number, 1, NoOfLoops); - OutputNo := 1; - end; - } - - trigger OnAfterGetRecord() - begin - if "Dealing Type" = "Dealing Type"::Discount then - Operation := Text1100000 - else - Operation := Text1100001; - FactoringType := GetFactoringType(); - - BankAcc.Get(PostedBillGr."Bank Account No."); - FormatAddress.FormatAddr( - BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", - BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); - - if not CurrReport.Preview then - PrintCounter.PrintCounter(DATABASE::"Posted Bill Group", "No."); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - FormatAddress.Company(CompanyAddr, CompanyInfo); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(NoOfCopies; NoOfCopies) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Copies'; - ToolTip = 'Specifies how many copies of the document to print.'; - } - field(PrintAmountsInLCY; PrintAmountsInLCY) - { - ApplicationArea = Basic, Suite; - Caption = 'Show amounts in LCY'; - ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - var - Text1100000: Label 'For Discount'; - Text1100001: Label 'For Collection'; - Text1100002: Label 'COPY'; - Text1100003: Label 'Bill Group %1'; - Text1100005: Label 'Risked Factoring'; - Text1100006: Label 'Unrisked Factoring'; - CompanyInfo: Record "Company Information"; - BankAcc: Record "Bank Account"; - Customer: Record Customer; - FormatAddress: Codeunit "Format Address"; - PrintCounter: Codeunit "BG/PO-Post and Print"; - BankAccAddr: array[8] of Text[100]; - CompanyAddr: array[8] of Text[100]; - Operation: Text[80]; - NoOfLoops: Integer; - NoOfCopies: Integer; - CopyText: Text[30]; - PrintAmountsInLCY: Boolean; - AmtForCollection: Decimal; - FactoringType: Text[30]; - OutputNo: Integer; - PostedBillGr__No__CaptionLbl: Label 'Bill Group No.'; - CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; - CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; - CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; - PostedBillGr__Posting_Date_CaptionLbl: Label 'Date'; - PostedBillGr__Currency_Code_CaptionLbl: Label 'Currency Code'; - PageCaptionLbl: Label 'Page'; - All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; - Document_No_CaptionLbl: Label 'Document No.'; - Bill_No_CaptionLbl: Label 'Bill No.'; - Customer_Name_Control28CaptionLbl: Label 'Name'; - Customer__Post_Code__Control9CaptionLbl: Label 'Post Code'; - Customer_City_Control30CaptionLbl: Label 'City /'; - AmtForCollection_Control31CaptionLbl: Label 'Amount for Collection'; - Customer_County_Control35CaptionLbl: Label 'County'; - PostedDoc__Due_Date__Control8CaptionLbl: Label 'Due Date'; - Customer_No_CaptionLbl: Label 'Customer No.'; - ContinuedCaptionLbl: Label 'Continued'; - EmptyStringCaptionLbl: Label '/', Locked = true; - ContinuedCaption_Control15Lbl: Label 'Continued'; - TotalCaptionLbl: Label 'Total'; - - [Scope('OnPrem')] - procedure GetCurrencyCode(): Code[10] - begin - if PrintAmountsInLCY then - exit(''); - - exit(PostedDoc."Currency Code"); - end; - - [Scope('OnPrem')] - procedure GetFactoringType(): Text[30] - begin - if PostedBillGr.Factoring <> PostedBillGr.Factoring::" " then begin - if PostedBillGr.Factoring = PostedBillGr.Factoring::Risked then - exit(Text1100005); - - exit(Text1100006); - end; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupListing.rdlc b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupListing.rdlc deleted file mode 100644 index 766c5e4a85e..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupListing.rdlc +++ /dev/null @@ -1,2467 +0,0 @@ - - - 0 - - - - SQL - - - None - e156e4d9-9087-484d-852d-bcd8584dbff5 - - - - - - - - - - - 18.70741cm - - - - - 12.47892cm - - - - - - - - - - 1.7cm - - - 1.4cm - - - 1.3cm - - - 0.9cm - - - 0.45cm - - - 1.9cm - - - 1.55cm - - - 3.3cm - - - 1.5cm - - - 2.7cm - - - 2cm - - - - - 0.423cm - - - - - true - - - - - =First(Fields!All_amounts_are_in_LCYCaption.Value) - - - - - - All_amounts_are_in_LCYCaption_1 - 45 - - - 7 - - - - - - - - - - - - true - - - - - - - - - - - textbox13 - 44 - - - 4 - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!PostedDoc__Due_Date__Control8Caption.Value) - - - - - - - 43 - - - - - - - - true - - - - - =First(Fields!PostedDoc__Document_Type__Control23Caption.Value) - - - - - - 42 - - - - - - - - true - - - - - =First(Fields!Document_No_Caption.Value) - - - - - - - 41 - - - - - - - - true - - - - - =First(Fields!Bill_No_Caption.Value) - - - - - - - 40 - - - - - - - - true - - - - - =First(Fields!PostedDoc_Status_Control78Caption.Value) - - - - - - 39 - - - - - - - - true - - - - - =First(Fields!PostedDoc__Honored_Rejtd__at_Date__Control80Caption.Value) - - - - - - - 38 - - - - - - - - true - - - - - =First(Fields!Customer_No_Caption.Value) - - - - - - - 37 - - - - - - - - true - - - - - =First(Fields!Customer_Name_Control28Caption.Value) - - - - - - 36 - - - - - - - - true - - - - - =First(Fields!Customer__Post_Code__Control9Caption.Value) - - - - - - 35 - - - - - - - - true - - - - - =First(Fields!Customer_City_Control30Caption.Value)+ Chr(10) + First(Fields!Customer_County_Control35Caption.Value) - - - - - - 34 - - - - - - - - true - - - - - =First(Fields!AmtForCollection_Control31Caption.Value) - - - - - - - 33 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - - textbox3 - 32 - - - 11 - - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!FORMAT__Due_Date__.Value - - - - - - 31 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_Type_.Value - - - - - - 30 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_No__.Value - - - - - - - 29 - - - 2 - - - - - - - true - - - - - =Fields!PostedDoc_Status.Value - - - - - - 27 - - - - - - - - true - - - - - =Fields!PostedDoc__Honored_Rejtd__at_Date_.Value - - - - - - 26 - - - - - - - - true - - - - - =Fields!PostedDoc__Account_No__.Value - - - - - - - 25 - - - - - - - - true - - - - - =Fields!Customer_Name.Value - - - - - - 24 - - - - - - - - true - - - - - =Fields!Customer__Post_Code_.Value - - - - - - - 23 - - - - - - - - true - - - - - =Fields!Customer_City.Value - - - - - - 22 - - - - - - - - true - - - - - =Fields!AmtForCollection.Value - - - - - - 21 - - - - - - - - 0.423cm - - - - - true - - - - - - - - 9 - - - - - - - - - - - - - - true - - - - - =Fields!Customer_County.Value - - - - - - 19 - - - - - - - - true - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!FORMAT__Due_Date__.Value - - - - - - 17 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_Type_.Value - - - - - - 16 - - - - - - - - true - - - - - =Fields!PostedDoc__Document_No__.Value - - - - - - - 15 - - - - - - - - true - - - - - =Fields!EmptyStringCaption.Value + Fields!PostedDoc__No__.Value - - - - - - - 14 - - - - - - - - true - - - - - =Fields!PostedDoc_Status.Value - - - - - - 13 - - - - - - - - true - - - - - =Fields!PostedDoc__Honored_Rejtd__at_Date_.Value - - - - - - 12 - - - - - - - - true - - - - - =Fields!PostedDoc__Account_No__.Value - - - - - - - 11 - - - - - - - - true - - - - - =Fields!Customer_Name.Value - - - - - - 10 - - - - - - - - true - - - - - =Fields!Customer__Post_Code_.Value - - - - - - - 9 - - - - - - - - true - - - - - =Fields!Customer_City.Value - - - - - - 8 - - - - - - - - true - - - - - =Fields!AmtForCollection.Value - - - - - - 7 - - - - - - - - 0.423cm - - - - - true - - - - - - - - 9 - - - - - - - - - - - - - - true - - - - - =Fields!Customer_County.Value - - - - - - 1 - - - - - - - - true - - - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox2 - 3 - - - 11 - - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =First(Fields!TotalCaption.Value) - - - - - - 6 - - - 4 - - - - - - - - - true - - - - - - - - 6 - - - - - - - - - - - true - - - - - =Sum(Fields!AmtForCollection.Value) - - - - - - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - =IIF(Fields!PrintAmountsInLCY.Value,False,True) - - After - true - true - - - After - true - true - - - After - true - true - - - - Detail - - - - - =IIF(Fields!PostedDoc__Document_Type_____PostedDoc__Document_Type___Bill.Value,FALSE,TRUE) - - - - - =IIF(Fields!PostedDoc__Document_Type_____PostedDoc__Document_Type___Bill.Value,FALSE,TRUE) - - - - - =IIF(Fields!PostedDoc__Document_Type____PostedDoc__Document_Type___Bill.Value,FALSE,TRUE) - - - - - =IIF(Fields!PostedDoc__Document_Type____PostedDoc__Document_Type___Bill.Value,FALSE,TRUE) - - - - Detail_Collection - Output - true - - - Before - true - - - Before - true - - - - DataSet_Result - 8.037cm - 1.66556in - 29 - - - true - - - - - =First(Fields!BankAccAddr_1_.Value) - - - - - - 1.269cm - 0.423cm - 4.5cm - 28 - - - - true - - - - - =First(Fields!CompanyAddr_2_.Value) - - - - - - 1.692cm - 12cm - 0.423cm - 6.3cm - 27 - - - - true - - - - - =First(Fields!CompanyAddr_3_.Value) - - - - - - 2.115cm - 12cm - 0.423cm - 6.3cm - 26 - - - - true - - - - - =First(Fields!CompanyAddr_4_.Value) - - - - - - 2.538cm - 12cm - 0.423cm - 6.3cm - 25 - - - - true - - - - - =First(Fields!CompanyAddr_5_.Value) - - - - - - 2.961cm - 12cm - 0.423cm - 6.3cm - 24 - - - - true - - - - - =First(Fields!CompanyAddr_6_.Value) - - - - - - 3.384cm - 12cm - 0.423cm - 6.3cm - 23 - - - - true - - - - - =First(Fields!CompanyInfo__Phone_No__.Value) - - - - - - 3.807cm - 14.1cm - 0.423cm - 4.2cm - 22 - - - - true - - - - - =First(Fields!CompanyInfo__Fax_No__.Value) - - - - - - 4.23cm - 14.1cm - 0.423cm - 4.2cm - 21 - - - - true - - - - - =First(Fields!CompanyInfo__VAT_Registration_No__.Value) - - - - - - 4.653cm - 14.1cm - 0.423cm - 4.2cm - 20 - - - - true - - - - - =First(Fields!CompanyInfo__Phone_No__Caption.Value) - - - - - - 3.807cm - 12cm - 0.423cm - 1.89cm - 19 - - - - true - - - - - =First(Fields!CompanyInfo__Fax_No__Caption.Value) - - - - - - 4.23cm - 12cm - 0.423cm - 1.89cm - 18 - - - - true - - - - - =First(Fields!CompanyInfo__VAT_Registration_No__Caption.Value) - - - - - - 4.653cm - 12cm - 0.423cm - 1.89cm - 17 - - - - true - - - - - =First(Fields!STRSUBSTNO_Text1100003_CopyText_.Value) - - - - - - 12cm - 0.423cm - 6.3cm - 16 - - - - true - - - - - =First(Fields!CompanyAddr_1_.Value) - - - - - - 1.269cm - 12cm - 0.423cm - 6.3cm - 14 - - - - true - - - - - =First(Fields!BankAccAddr_4_.Value) - - - - - - 2.538cm - 0.423cm - 4.5cm - 13 - - - - true - - - - - =First(Fields!BankAccAddr_5_.Value) - - - - - - 2.961cm - 0.423cm - 4.5cm - 12 - - - - true - - - - - =First(Fields!BankAccAddr_6_.Value) - - - - - - 3.384cm - 0.423cm - 4.5cm - 11 - - - - true - - - - - =First(Fields!BankAccAddr_7_.Value) - - - - - - 3.807cm - 0.423cm - 4.5cm - 10 - - - - true - - - - - =First(Fields!BankAccAddr_3_.Value) - - - - - - 2.115cm - 0.423cm - 4.5cm - 9 - - - - true - - - - - =First(Fields!BankAccAddr_2_.Value) - - - - - - 1.692cm - 0.423cm - 4.5cm - 8 - - - - true - - - - - =First(Fields!PostedBillGr__No__Caption.Value) - - - - - - 5.499cm - 12cm - 0.423cm - 3cm - 7 - - - - true - - - - - =First(Fields!FORMAT_PostedBillGr__Posting_Date__.Value) - - - - - - 7.191cm - 15.7cm - 0.423cm - 1.68cm - 6 - - - - true - - - - - =First(Fields!PostedBillGr__Currency_Code_.Value) - - - - - - 5.922cm - 15.15cm - 0.423cm - 2.7cm - 5 - - - - true - - - - - =First(Fields!Operation.Value) - - - - - - 6.345cm - 12cm - 0.423cm - 5.85cm - 4 - - - - true - - - - - =First(Fields!FactoringType.Value) - - - - - - 6.768cm - 12cm - 0.423cm - 5.85cm - 3 - - - - true - - - - - =First(Fields!PostedBillGr__No__.Value) - - - - - - 5.499cm - 15.15cm - 0.423cm - 2.7cm - 2 - - - - true - - - - - =First(Fields!PostedBillGr__Posting_Date_Caption.Value) - - - - - - 7.191cm - 12cm - 0.423cm - 3.15cm - 1 - - - - true - - - - - =First(Fields!PostedBillGr__Currency_Code_Caption.Value) - - - - - - 5.922cm - 12cm - 0.423cm - 3cm - - - - true - - - - - - - - - - - - - - - - - - =Fields!PostedBillGr_No_.Value - =Fields!OutputNo.Value - - - Between - - - Output - true - - - - DataSet_Result - - End - - - - 12.47892cm - - 18.70741cm - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - - -Shared offset as Integer -Shared newPage as Object -Shared currentgroup1 as Object -Shared currentgroup2 as Object -Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object - If NewPage - offset = pagenumber - 1 - End If - Return pagenumber - offset -End Function - -Public Function IsNewPage(group1 as Object, group2 as Object) As Boolean -newPage = FALSE -If Not (group1 = currentgroup1) - newPage = TRUE - currentgroup1 = group1 - currentgroup2 = group2 - ELSE - If Not (group2 = currentgroup2) - newPage = TRUE - currentgroup2 = group2 - End If - End If - Return newPage -End Function - - =User!Language - true - Invalid - d4faa554-37b8-43e7-aff0-5bd9636af7be - - - - - PostedBillGr_No_ - - - Operation - - - PostedBillGr__No__ - - - STRSUBSTNO_Text1100003_CopyText_ - - - CompanyAddr_1_ - - - CompanyAddr_2_ - - - CompanyAddr_3_ - - - CompanyAddr_4_ - - - CompanyAddr_5_ - - - CompanyAddr_6_ - - - CompanyInfo__Phone_No__ - - - CompanyInfo__Fax_No__ - - - CompanyInfo__VAT_Registration_No__ - - - FORMAT_PostedBillGr__Posting_Date__ - - - BankAccAddr_4_ - - - BankAccAddr_5_ - - - BankAccAddr_6_ - - - BankAccAddr_7_ - - - BankAccAddr_3_ - - - BankAccAddr_2_ - - - BankAccAddr_1_ - - - PostedBillGr__Currency_Code_ - - - FactoringType - - - OutputNo - - - PrintAmountsInLCY - - - PageLoop_Number - - - PostedBillGr__No__Caption - - - CompanyInfo__Phone_No__Caption - - - CompanyInfo__Fax_No__Caption - - - CompanyInfo__VAT_Registration_No__Caption - - - PostedBillGr__Posting_Date_Caption - - - PostedBillGr__Currency_Code_Caption - - - PageCaption - - - AmtForCollection - - - AmtForCollectionFormat - - - AmtForCollection_Control32 - - - AmtForCollection_Control32Format - - - Customer_City - - - Customer_County - - - Customer__Post_Code_ - - - Customer_Name - - - PostedDoc__Account_No__ - - - PostedDoc__Honored_Rejtd__at_Date_ - - - PostedDoc_Status - - - PostedDoc__Document_No__ - - - PostedDoc__Document_Type_ - - - FORMAT__Due_Date__ - - - PostedDoc__Document_Type_____PostedDoc__Document_Type___Bill - - - Customer_Name_Control28 - - - Customer_City_Control30 - - - AmtForCollection_Control31 - - - AmtForCollection_Control31Format - - - Customer_County_Control35 - - - PostedDoc__Document_No___Control3 - - - PostedDoc__No__ - - - Customer__Post_Code__Control9 - - - PostedDoc_Status_Control78 - - - PostedDoc__Honored_Rejtd__at_Date__Control80 - - - FORMAT__Due_Date___Control8 - - - PostedDoc__Account_No___Control1 - - - PostedDoc__Document_Type__Control23 - - - PostedDoc__Document_Type____PostedDoc__Document_Type___Bill - - - AmtForCollection_Control36 - - - AmtForCollection_Control36Format - - - AmtForCollection_Control39 - - - AmtForCollection_Control39Format - - - PostedDoc_Type - - - PostedDoc_Entry_No_ - - - PostedDoc_Bill_Gr__Pmt__Order_No_ - - - All_amounts_are_in_LCYCaption - - - Document_No_Caption - - - Bill_No_Caption - - - Customer_Name_Control28Caption - - - Customer__Post_Code__Control9Caption - - - Customer_City_Control30Caption - - - AmtForCollection_Control31Caption - - - Customer_County_Control35Caption - - - PostedDoc_Status_Control78Caption - - - PostedDoc__Honored_Rejtd__at_Date__Control80Caption - - - PostedDoc__Due_Date__Control8Caption - - - Customer_No_Caption - - - PostedDoc__Document_Type__Control23Caption - - - ContinuedCaption - - - EmptyStringCaption - - - ContinuedCaption_Control15 - - - TotalCaption - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupSelect.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupSelect.Page.al deleted file mode 100644 index b94fce79874..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupSelect.Page.al +++ /dev/null @@ -1,394 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Navigate; -using Microsoft.Sales.Receivables; -using System.Text; - -page 7000064 "Posted Bill Group Select." -{ - ApplicationArea = Basic, Suite; - Caption = 'Posted Bill Groups (Batch)'; - DeleteAllowed = false; - Editable = true; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Worksheet; - SaveValues = true; - SourceTable = "Posted Bill Group"; - UsageCategory = Tasks; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(DueDateFilter; DueDateFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Due Date Filter'; - ToolTip = 'Specifies a due date or a range of due dates that documents must contain to be included in the selection.'; - - trigger OnValidate() - begin - DueDateFilterOnAfterValidate(); - end; - } - field(BankAccFilter; BankAccFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Bank Account Filter'; - TableRelation = "Bank Account"."No."; - ToolTip = 'Specifies which bank accounts the values are shown for.'; - - trigger OnValidate() - begin - BankAccFilterOnAfterValidate(); - end; - } - field(CurrCodeFilter; CurrCodeFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Currency Code Filter'; - TableRelation = Currency; - ToolTip = 'Specifies the currencies that the data is included for.'; - - trigger OnValidate() - begin - CurrCodeFilterOnAfterValidate(); - end; - } - } - repeater(Control1) - { - Editable = false; - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of the posted bill group, which is assigned when you create the bill group.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank to which you submitted this posted bill group.'; - } - field("Posting Description"; Rec."Posting Description") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the posting description for the posted bill group.'; - } - field("Dealing Type"; Rec."Dealing Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the type of payment. Collection: The document will be sent to the bank for processing as a receivable. Discount: The document will be sent to the bank for processing as a prepayment discount. When a document is submitted for discount, the bill group bank advances the amount of the document (or a portion of it, in the case of invoices). Later, the bank is responsible for processing the collection of the document on the due date.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the posting date for this bill group.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount in this posted bill group.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code for the posted bill group.'; - } - field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount of this posted bill group.'; - } - field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for collection, of the documents included in this bill group posted.'; - } - field(Factoring; Rec.Factoring) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the factoring method to be applied to the invoices associated with this bill group.'; - } - } - group(Control49) - { - ShowCaption = false; - field(CurrTotalAmount; CurrTotalAmountLCY) - { - ApplicationArea = All; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Total Rmg. Amt. (LCY)'; - Editable = false; - ToolTip = 'Specifies the sum of amounts that remain to be paid.'; - Visible = CurrTotalAmountVisible; - - trigger OnValidate() - begin - CurrTotalAmountLCYOnAfterValid(); - end; - } - } - } - area(factboxes) - { - part(Control1901420907; "Post. BG Analysis LCY Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1901421007; "Post. BG Analysis Non LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("&Bill Group") - { - Caption = '&Bill Group'; - Image = VoucherGroup; - action(Card) - { - ApplicationArea = Basic, Suite; - Caption = 'Card'; - Image = EditLines; - RunObject = Page "Posted Bill Groups"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Status Filter" = field("Status Filter"); - ShortCutKey = 'Shift+F7'; - ToolTip = 'View or change detailed information about the record that is being processed on the document or journal line.'; - } - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."); - ToolTip = 'View or create a comment.'; - } - separator(Action39) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - RunObject = Page "Posted Bill Groups Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action44) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - PostedBillGr.Copy(Rec); - PostedBillGr.SetRecFilter(); - REPORT.Run(REPORT::"Posted Bill Group Listing", true, false, PostedBillGr); - end; - end; - } - } - } - area(processing) - { - group("F&unctions") - { - Caption = 'F&unctions'; - Image = "Action"; - action(BatchSettlement) - { - ApplicationArea = Basic, Suite; - Caption = 'Batch &Settlement'; - Ellipsis = true; - Image = ApplyEntries; - ToolTip = 'Fully settle the documents that are included in the selected posted bill groups.'; - - trigger OnAction() - begin - CurrPage.SetSelectionFilter(PostedBillGr2); - if not PostedBillGr2.Find('=><') then - exit; - REPORT.RunModal(REPORT::"Batch Settl. Posted Bill Grs.", true, false, PostedBillGr2); - UpdateStatistics(); - CurrPage.Update(false); - end; - } - } - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - begin - Navigate.SetDoc(Rec."Posting Date", Rec."No."); - Navigate.Run(); - end; - } - action("Posted Bill Groups Maturity") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Bill Groups Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Posted Bill Groups Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref(BatchSettlement_Promoted; BatchSettlement) - { - } - actionref("&Navigate_Promoted"; "&Navigate") - { - } - actionref("Posted Bill Groups Maturity_Promoted"; "Posted Bill Groups Maturity") - { - } - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - trigger OnInit() - begin - CurrTotalAmountVisible := true; - end; - - trigger OnOpenPage() - begin - Rec.SetCurrentKey("Bank Account No.", "Posting Date", "Currency Code"); - CurrCodeFilter := Rec.GetFilter("Currency Code"); - BankAccFilter := Rec.GetFilter("Bank Account No."); - UpdateStatistics(); - end; - - var - PostedBillGr: Record "Posted Bill Group"; - PostedBillGr2: Record "Posted Bill Group"; - Navigate: Page Navigate; - CurrTotalAmountLCY: Decimal; - ShowCurrent: Boolean; - CurrCodeFilter: Code[250]; - BankAccFilter: Code[250]; - CurrTotalAmountVisible: Boolean; - DueDateFilter: Text[30]; - - procedure UpdateStatistics() - begin - PostedBillGr.Copy(Rec); - CurrTotalAmountLCY := 0; - UpdateStatistics2(PostedBillGr, CurrTotalAmountLCY, ShowCurrent); - CurrTotalAmountVisible := true; - end; - - procedure GetSelected(var NewPostedBillGr: Record "Posted Bill Group") - begin - CurrPage.SetSelectionFilter(NewPostedBillGr); - end; - - procedure UpdateStatistics2(var PostedBillGr2: Record "Posted Bill Group"; var CurrTotalAmount: Decimal; var ShowCurrent: Boolean) - begin - PostedBillGr2.SetCurrentKey("Bank Account No.", "Posting Date", "Currency Code"); - if PostedBillGr2.Find('-') then; - repeat - PostedBillGr2.CalcFields("Remaining Amount (LCY)"); - CurrTotalAmount := CurrTotalAmount + PostedBillGr2."Remaining Amount (LCY)"; - until PostedBillGr2.Next() = 0; - ShowCurrent := (CurrTotalAmount <> 0); - end; - - local procedure CurrTotalAmountLCYOnAfterValid() - begin - UpdateStatistics(); - end; - - local procedure CurrCodeFilterOnAfterValidate() - begin - Rec.SetFilter("Currency Code", CurrCodeFilter); - CurrPage.Update(false); - UpdateStatistics(); - end; - - local procedure BankAccFilterOnAfterValidate() - begin - Rec.SetFilter("Bank Account No.", BankAccFilter); - CurrPage.Update(false); - UpdateStatistics(); - end; - - local procedure DueDateFilterOnAfterValidate() - var - FilterTokens: Codeunit "Filter Tokens"; - begin - FilterTokens.MakeDateFilter(DueDateFilter); - Rec.SetFilter("Due Date Filter", DueDateFilter); - DueDateFilter := Rec.GetFilter("Due Date Filter"); - CurrPage.Update(false); - UpdateStatistics(); - Rec.SetFilter(Amount, '<>0'); - CurrPage.Update(false); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroups.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroups.Page.al deleted file mode 100644 index 2722d6250c3..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroups.Page.al +++ /dev/null @@ -1,299 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Navigate; -using Microsoft.Sales.Receivables; - -page 7000012 "Posted Bill Groups" -{ - Caption = 'Posted Bill Groups'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - PageType = Document; - RefreshOnActivate = true; - SourceTable = "Posted Bill Group"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("No."; Rec."No.") - { - ApplicationArea = All; - Editable = false; - ToolTip = 'Specifies the number of the posted bill group, which is assigned when you create the bill group.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number or code of the bank to which you submitted this posted bill group.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number associated with the code or number of the bank, to which the bill group was submitted.'; - } - field("Dealing Type"; Rec."Dealing Type") - { - ApplicationArea = Basic, Suite; - Editable = false; - Importance = Promoted; - ToolTip = 'Specifies the type of payment. Collection: The document will be sent to the bank for processing as a receivable. Discount: The document will be sent to the bank for processing as a prepayment discount. When a document is submitted for discount, the bill group bank advances the amount of the document (or a portion of it, in the case of invoices). Later, the bank is responsible for processing the collection of the document on the due date.'; - } - field("Partner Type"; Rec."Partner Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if the posted bill group is a person or company.'; - } - field(Factoring; Rec.Factoring) - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the factoring method to be applied to the invoices associated with this bill group.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Editable = false; - Importance = Promoted; - ToolTip = 'Specifies the posting date for this bill group.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code for the posted bill group.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount in this posted bill group.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; - } - field("Amount Grouped (LCY)"; Rec."Amount Grouped (LCY)") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the grouped amount of this posted bill group.'; - } - field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the amount outstanding for collection, of the documents included in this bill group posted.'; - } - } - part(Docs; "Docs. in Posted BG Subform") - { - ApplicationArea = Basic, Suite; - SubPageLink = "Bill Gr./Pmt. Order No." = field("No."); - SubPageView = sorting("Bill Gr./Pmt. Order No.") - where(Type = const(Receivable)); - } - group(Expenses) - { - Caption = 'Expenses'; - field("Collection Expenses Amt."; Rec."Collection Expenses Amt.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the amount of fees and commission for processing the collection of bills for the posted bill group.'; - } - field("Discount Expenses Amt."; Rec."Discount Expenses Amt.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the amount of fees and commissions, in order to process this posted bill group for discount.'; - } - field("Discount Interests Amt."; Rec."Discount Interests Amt.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the total interest charged, to discount the documents for this posted bill group.'; - } - field("Rejection Expenses Amt."; Rec."Rejection Expenses Amt.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the amount of the expenses associated with the rejection of bills for this bill group.'; - } - field("Risked Factoring Exp. Amt."; Rec."Risked Factoring Exp. Amt.") - { - ApplicationArea = Basic, Suite; - Editable = false; - Enabled = true; - ToolTip = 'Specifies the financial institution''s charges and commission for risked factoring.'; - } - field("Unrisked Factoring Exp. Amt."; Rec."Unrisked Factoring Exp. Amt.") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the financial institution''s charges and commission for unrisked factoring.'; - } - } - group(Auditing) - { - Caption = 'Auditing'; - field("Reason Code"; Rec."Reason Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; - } - field("No. Printed"; Rec."No. Printed") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of copies printed of this posted bill group.'; - } - } - } - area(factboxes) - { - part(Control1901420907; "Post. BG Analysis LCY Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1901421007; "Post. BG Analysis Non LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Bill &Group") - { - Caption = 'Bill &Group'; - Image = VoucherGroup; - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = Type = filter(Receivable), - "BG/PO No." = field("No."); - ToolTip = 'View or create a comment.'; - } - separator(Action20) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - RunObject = Page "Posted Bill Groups Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action58) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - PostedBillGr.Copy(Rec); - PostedBillGr.SetRecFilter(); - REPORT.Run(REPORT::"Posted Bill Group Listing", true, false, PostedBillGr); - end; - end; - } - } - } - area(processing) - { - action("&Navigate") - { - ApplicationArea = Basic, Suite; - Caption = 'Find entries...'; - Image = Navigate; - ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected entry or document.'; - - trigger OnAction() - var - begin - Navigate.SetDoc(Rec."Posting Date", Rec."No."); - Navigate.Run(); - end; - } - action("Posted Bill Groups Maturity") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Bill Groups Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Posted Bill Groups Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Navigate_Promoted"; "&Navigate") - { - } - actionref("Posted Bill Groups Maturity_Promoted"; "Posted Bill Groups Maturity") - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - PostedBillGr: Record "Posted Bill Group"; - Navigate: Page Navigate; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsAnalysis.Page.al deleted file mode 100644 index 1a2892da9fa..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsAnalysis.Page.al +++ /dev/null @@ -1,241 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000021 "Posted Bill Groups Analysis" -{ - Caption = 'Posted Bill Groups Analysis'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SourceTable = "Posted Bill Group"; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field("Category Filter"; Rec."Category Filter") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a sort code for the documents to be included in the posted bill group posted.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - } - group(Control16) - { - ShowCaption = false; - fixed(Control1902454701) - { - ShowCaption = false; - group("No. of Documents") - { - Caption = 'No. of Documents'; - field(NoOpen; NoOpen) - { - ApplicationArea = Basic, Suite; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code for the posted bill group.'; - } - field("Amount Grouped"; Rec."Amount Grouped") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the grouped amount in this posted bill group.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; - } - } - group(Amount) - { - Caption = 'Amount'; - field(OpenAmt; OpenAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmt; HonoredAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Closed'; - Editable = false; - ToolTip = 'Specifies if the document is closed.'; - } - field(RejectedAmt; RejectedAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmt; RedrawnAmt) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - } - group("Amount (LCY)") - { - Caption = 'Amount (LCY)'; - field(OpenAmtLCY; OpenAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmtLCY; HonoredAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Closed'; - Editable = false; - ToolTip = 'Specifies if the document is closed.'; - } - field(RejectedAmtLCY; RejectedAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmtLCY; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - } - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - PostedDoc: Record "Posted Cartera Doc."; - OpenAmt: Decimal; - HonoredAmt: Decimal; - RejectedAmt: Decimal; - RedrawnAmt: Decimal; - OpenAmtLCY: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - NoOpen: Integer; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - - local procedure UpdateStatistics() - begin - PostedDoc.SetCurrentKey("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date"); - PostedDoc.SetRange(Type, PostedDoc.Type::Receivable); - PostedDoc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Due Date Filter", PostedDoc."Due Date"); - Rec.CopyFilter("Global Dimension 1 Filter", PostedDoc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", PostedDoc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", PostedDoc."Category Code"); - - PostedDoc.SetRange(Status, PostedDoc.Status::Open); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - OpenAmt := PostedDoc."Amount for Collection"; - OpenAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoOpen := PostedDoc.Count; - - PostedDoc.SetRange(Status); - PostedDoc.SetRange(Redrawn, true); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RedrawnAmt := PostedDoc."Amount for Collection"; - RedrawnAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRedrawn := PostedDoc.Count; - PostedDoc.SetRange(Redrawn); - - PostedDoc.SetRange(Status, PostedDoc.Status::Honored); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - HonoredAmt := PostedDoc."Amount for Collection" - RedrawnAmt; - HonoredAmtLCY := PostedDoc."Amt. for Collection (LCY)" - RedrawnAmtLCY; - NoHonored := PostedDoc.Count - NoRedrawn; - - PostedDoc.SetRange(Status, PostedDoc.Status::Rejected); - PostedDoc.CalcSums("Amount for Collection", "Amt. for Collection (LCY)"); - RejectedAmt := PostedDoc."Amount for Collection"; - RejectedAmtLCY := PostedDoc."Amt. for Collection (LCY)"; - NoRejected := PostedDoc.Count; - end; - - local procedure CategoryFilterOnAfterValidate() - begin - UpdateStatistics(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsList.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsList.Page.al deleted file mode 100644 index 84383549581..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsList.Page.al +++ /dev/null @@ -1,186 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000014 "Posted Bill Groups List" -{ - ApplicationArea = Basic, Suite; - Caption = 'Posted Bill Groups'; - CardPageID = "Posted Bill Groups"; - Editable = false; - PageType = List; - RefreshOnActivate = true; - SourceTable = "Posted Bill Group"; - UsageCategory = Lists; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of the posted bill group, which is assigned when you create the bill group.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank to which you submitted this posted bill group.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number associated with the code or number of the bank, to which the bill group was submitted.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code for the posted bill group.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total for all of the documents included in this bill group.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total for all of the documents included in this posted bill group.'; - } - field("Remaining Amount"; Rec."Remaining Amount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for payment for the documents included in this posted bill group.'; - } - field("Remaining Amount (LCY)"; Rec."Remaining Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount outstanding for collection, of the documents included in this bill group posted.'; - } - } - } - area(factboxes) - { - part(Control1901420907; "Post. BG Analysis LCY Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1901421007; "Post. BG Analysis Non LCY FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Bill &Group") - { - Caption = 'Bill &Group'; - Image = VoucherGroup; - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = "BG/PO No." = field("No."), - Type = filter(Receivable); - ToolTip = 'View or create a comment.'; - } - separator(Action21) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - RunObject = Page "Posted Bill Groups Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action24) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - PostedBillGr.Copy(Rec); - PostedBillGr.SetRecFilter(); - REPORT.Run(REPORT::"Posted Bill Group Listing", true, false, PostedBillGr); - end; - end; - } - } - } - area(processing) - { - action("Posted Bill Groups Maturity") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Bill Groups Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Posted Bill Groups Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View the posted document lines that have matured. Maturity information can be viewed by period start date.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("Posted Bill Groups Maturity_Promoted"; "Posted Bill Groups Maturity") - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - PostedBillGr: Record "Posted Bill Group"; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsMaturity.Page.al deleted file mode 100644 index cb32b69261a..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillGroupsMaturity.Page.al +++ /dev/null @@ -1,94 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -page 7000033 "Posted Bill Groups Maturity" -{ - Caption = 'Posted Bill Groups Maturity'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - PageType = List; - SaveValues = true; - SourceTable = "Posted Bill Group"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("Category Filter"; Rec."Category Filter") - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - } - group(Options) - { - Caption = 'Options'; - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View by'; - OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - field(AmountType; AmountType) - { - ApplicationArea = Basic, Suite; - Caption = 'View as'; - OptionCaption = 'Net Change,Balance at Date'; - ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - } - part(MaturityLines; "Posted Bill Gr. Maturity Lines") - { - ApplicationArea = Basic, Suite; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateSubForm(); - end; - - trigger OnOpenPage() - begin - UpdateSubForm(); - end; - - var - PeriodType: Option Day,Week,Month,Quarter,Year,Period; - AmountType: Option "Net Change","Balance at Date"; - - local procedure UpdateSubForm() - begin - CurrPage.MaturityLines.PAGE.Set(Rec, PeriodType, AmountType); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillsAnalysis.Page.al deleted file mode 100644 index ae9804485f0..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillsAnalysis.Page.al +++ /dev/null @@ -1,276 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -page 7000068 "Posted Bills Analysis" -{ - Caption = 'Posted Bills Analysis'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SourceTable = "Posted Cartera Doc."; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - } - group(Control16) - { - ShowCaption = false; - fixed(Control1902454701) - { - ShowCaption = false; - group("Number of Bills") - { - Caption = 'Number of Bills'; - field(NoOpen; NoOpen) - { - ApplicationArea = Basic, Suite; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(NoHonored; NoHonored) - { - ApplicationArea = Basic, Suite; - Caption = 'Honored'; - Editable = false; - ToolTip = 'Specifies that the related payment is settled. '; - } - field(NoRejected; NoRejected) - { - ApplicationArea = Basic, Suite; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(NoRedrawn; NoRedrawn) - { - ApplicationArea = Basic, Suite; - Caption = 'Redrawn (o/Rejected)'; - Editable = false; - ToolTip = 'Specifies that the related payment is recirculated because it was rejected when its due date arrived.'; - } - field(BGPOAmtLCY; BGPOAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'BGPO Amount'; - Editable = false; - ToolTip = 'Specifies the amount on the bill group or payment order.'; - } - field(NoBillInBGPO; NoBillInBGPO) - { - ApplicationArea = Basic, Suite; - Caption = 'Number of Bills'; - Editable = false; - ToolTip = 'Specifies the number of bills included.'; - } - } - group(Amount) - { - Caption = 'Amount'; - field(OpenAmtLCY; OpenAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open'; - Editable = false; - ToolTip = 'Specifies that the related payment is not processed yet. '; - } - field(HonoredAmtLCY; HonoredAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Closed'; - Editable = false; - ToolTip = 'Specifies if the document is closed.'; - } - field(RejectedAmtLCY; RejectedAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rejected'; - Editable = false; - ToolTip = 'Specifies that the related payment is rejected.'; - } - field(RedrawnAmtLCY; RedrawnAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Editable = false; - } - } - group("%") - { - Caption = '%'; - field(OpenPercentage; OpenPercentage) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 0; - ExtendedDatatype = Ratio; - MaxValue = 100; - MinValue = 0; - } - field(HonoredPercentage; HonoredPercentage) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 0; - ExtendedDatatype = Ratio; - MaxValue = 100; - MinValue = 0; - } - field(RejectedPercentage; RejectedPercentage) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 0; - ExtendedDatatype = Ratio; - MaxValue = 100; - MinValue = 0; - } - field(RedrawnPercentage; RedrawnPercentage) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 0; - ExtendedDatatype = Ratio; - MaxValue = 100; - MinValue = 0; - } - } - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - trigger OnOpenPage() - begin - UpdateStatistics(); - end; - - var - OpenAmtLCY: Decimal; - HonoredAmtLCY: Decimal; - RejectedAmtLCY: Decimal; - RedrawnAmtLCY: Decimal; - BGPOAmtLCY: Decimal; - OpenPercentage: Decimal; - RejectedPercentage: Decimal; - HonoredPercentage: Decimal; - RedrawnPercentage: Decimal; - NoBillInBGPO: Integer; - NoOpen: Integer; - NoHonored: Integer; - NoRejected: Integer; - NoRedrawn: Integer; - CategoryFilter: Code[10]; - - local procedure UpdateStatistics() - begin - Rec.SetCurrentKey("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date", "Document Type"); - Rec.SetRange("Document Type", Rec."Document Type"::Bill); - if Rec.Type = Rec.Type::Receivable then - Rec.SetRange(Type, Rec.Type::Receivable) - else - Rec.SetRange(Type, Rec.Type::Payable); - - if CategoryFilter = '' then - Rec.SetRange("Category Code") - else - Rec.SetRange("Category Code", CategoryFilter); - - Rec.SetRange(Status); - Rec.CalcSums("Amt. for Collection (LCY)"); - BGPOAmtLCY := Rec."Amt. for Collection (LCY)"; - NoBillInBGPO := Rec.Count; - - Rec.SetRange(Status, Rec.Status::Open); - Rec.CalcSums("Amt. for Collection (LCY)"); - OpenAmtLCY := Rec."Amt. for Collection (LCY)"; - NoOpen := Rec.Count; - - if BGPOAmtLCY = 0 then - OpenPercentage := 0 - else - OpenPercentage := OpenAmtLCY / BGPOAmtLCY * 100; - - Rec.SetRange(Status); - Rec.SetRange(Redrawn, true); - Rec.CalcSums("Amt. for Collection (LCY)"); - RedrawnAmtLCY := Rec."Amt. for Collection (LCY)"; - NoRedrawn := Rec.Count; - - Rec.SetRange(Redrawn); - - Rec.SetRange(Status, Rec.Status::Honored); - Rec.CalcSums("Amt. for Collection (LCY)"); - HonoredAmtLCY := Rec."Amt. for Collection (LCY)" - RedrawnAmtLCY; - NoHonored := Rec.Count - NoRedrawn; - - if BGPOAmtLCY = 0 then - HonoredPercentage := 0 - else - HonoredPercentage := HonoredAmtLCY / BGPOAmtLCY * 100; - - Rec.SetRange(Status); - - Rec.SetRange(Status, Rec.Status::Rejected); - Rec.CalcSums("Amt. for Collection (LCY)"); - RejectedAmtLCY := Rec."Amt. for Collection (LCY)" + RedrawnAmtLCY; - NoRejected := Rec.Count + NoRedrawn; - - if BGPOAmtLCY = 0 then - RejectedPercentage := 0 - else - RejectedPercentage := RejectedAmtLCY / BGPOAmtLCY * 100; - - if RejectedAmtLCY = 0 then - RedrawnPercentage := 0 - else - RedrawnPercentage := RedrawnAmtLCY / RejectedAmtLCY * 100; - - Rec.SetRange(Status); - end; - - local procedure CategoryFilterOnAfterValidate() - begin - UpdateStatistics(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillsMaturityLin.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillsMaturityLin.Page.al deleted file mode 100644 index 6e5103b6268..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedBillsMaturityLin.Page.al +++ /dev/null @@ -1,137 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Enums; -using Microsoft.Foundation.Period; -using System.Utilities; - -page 7000070 "Posted Bills Maturity Lin." -{ - Caption = 'Lines'; - PageType = ListPart; - SourceTable = Date; - - layout - { - area(content) - { - repeater(Control1) - { - Editable = false; - ShowCaption = false; - field("Period Start"; Rec."Period Start") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the starting date of the period that you want to view.'; - } - field("Period Name"; Rec."Period Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the name of the period shown on the line.'; - } - field(DocAmtLCY; DocAmtLCY) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Amount'; - DrillDown = true; - ToolTip = 'Specifies the amount for the posted bills for the period.'; - - trigger OnDrillDown() - begin - ShowDocs(); - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - SetDateFilter(); - PostedDoc.SetCurrentKey("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, - "Category Code", Redrawn, "Due Date", "Document Type"); - if PostedDoc.Type = PostedDoc.Type::Receivable then - PostedDoc.SetRange(Type, PostedDoc.Type::Receivable) - else - PostedDoc.SetRange(Type, PostedDoc.Type::Payable); - PostedDoc.SetRange("Document Type", PostedDoc."Document Type"::Bill); - PostedDoc.CalcSums("Remaining Amt. (LCY)"); - DocAmtLCY := PostedDoc."Remaining Amt. (LCY)"; - end; - - trigger OnFindRecord(Which: Text): Boolean - begin - exit(PeriodPageManagement.FindDate(Which, Rec, PeriodLength)); - end; - - trigger OnNextRecord(Steps: Integer): Integer - begin - exit(PeriodPageManagement.NextDate(Steps, Rec, PeriodLength)); - end; - - trigger OnOpenPage() - begin - Rec.Reset(); - end; - - var - PostedDoc: Record "Posted Cartera Doc."; - PostedDoc2: Record "Posted Cartera Doc."; - PeriodPageManagement: Codeunit PeriodPageManagement; - PeriodLength: Enum "Analysis Period Type"; - AmountType: Enum "Analysis Amount Type"; - DocAmtLCY: Decimal; - DocType: Option Receivable,Payable; - - [Scope('OnPrem')] - procedure Set(var NewPostedDoc: Record "Posted Cartera Doc."; NewPeriodLength: Integer; NewAmountType: Option "Net Change","Balance at Date") - begin - PostedDoc.Copy(NewPostedDoc); - PeriodLength := "Analysis Period Type".FromInteger(NewPeriodLength); - AmountType := "Analysis Amount Type".FromInteger(NewAmountType); - CurrPage.Update(false); - end; - - [Scope('OnPrem')] - procedure SetDateFilter() - begin - if AmountType = AmountType::"Net Change" then - PostedDoc.SetRange("Due Date", Rec."Period Start", Rec."Period End") - else - PostedDoc.SetRange("Due Date", 0D, Rec."Period End"); - end; - - local procedure ShowDocs() - begin - SetDateFilter(); - if PostedDoc.Type = PostedDoc.Type::Receivable then - PostedDoc2.SetRange(Type, PostedDoc.Type::Receivable) - else - PostedDoc2.SetRange(Type, PostedDoc.Type::Payable); - PostedDoc2.SetRange("Document Type", PostedDoc."Document Type"::Bill); - PostedDoc2.SetFilter(Type, PostedDoc.GetFilter(Type)); - PostedDoc2.SetFilter("Due Date", PostedDoc.GetFilter("Due Date")); - PostedDoc2.SetFilter("Global Dimension 1 Code", PostedDoc.GetFilter("Global Dimension 1 Code")); - PostedDoc2.SetFilter("Global Dimension 2 Code", PostedDoc.GetFilter("Global Dimension 2 Code")); - PostedDoc2.SetFilter("Category Code", PostedDoc.GetFilter("Category Code")); - PostedDoc2.SetFilter("Remaining Amt. (LCY)", '<>0'); - PAGE.RunModal(0, PostedDoc2); - end; - - [Scope('OnPrem')] - procedure SetType(DocType2: Option Receivable,Payable) - begin - DocType := DocType2; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedPayableBillsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedPayableBillsMaturity.Page.al deleted file mode 100644 index 0b68ca21dfc..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedPayableBillsMaturity.Page.al +++ /dev/null @@ -1,188 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -page 7000072 "Posted Payable Bills Maturity" -{ - Caption = 'Posted Payable Bills Maturity'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - PageType = Worksheet; - SaveValues = true; - SourceTable = "Posted Cartera Doc."; - SourceTableView = sorting("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date", "Document Type") - where("Document Type" = const(Bill), - Type = const(Payable)); - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View by'; - OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - if PeriodType = PeriodType::Period then - PeriodPeriodTypeOnValidate(); - if PeriodType = PeriodType::Year then - YearPeriodTypeOnValidate(); - if PeriodType = PeriodType::Quarter then - QuarterPeriodTypeOnValidate(); - if PeriodType = PeriodType::Month then - MonthPeriodTypeOnValidate(); - if PeriodType = PeriodType::Week then - WeekPeriodTypeOnValidate(); - if PeriodType = PeriodType::Day then - DayPeriodTypeOnValidate(); - end; - } - field(AmountType; AmountType) - { - ApplicationArea = Basic, Suite; - Caption = 'View as'; - OptionCaption = 'Net Change,Balance at Date'; - ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; - - trigger OnValidate() - begin - if AmountType = AmountType::"Balance at Date" then - BalanceatDateAmountTypeOnValid(); - if AmountType = AmountType::"Net Change" then - NetChangeAmountTypeOnValidate(); - end; - } - } - part(DueDateLin; "Posted Bills Maturity Lin.") - { - ApplicationArea = Basic, Suite; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateSubForm(); - end; - - var - PeriodType: Option Day,Week,Month,Quarter,Year,Period; - AmountType: Option "Net Change","Balance at Date"; - CategoryFilter: Code[250]; - - local procedure UpdateSubForm() - begin - Rec.SetFilter("Category Code", CategoryFilter); - CurrPage.DueDateLin.PAGE.Set(Rec, PeriodType, AmountType); - end; - - local procedure DayPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure WeekPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure MonthPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure QuarterPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure YearPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure PeriodPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure BalanceatDateAmountTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure NetChangeAmountTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure DayPeriodTypeOnValidate() - begin - DayPeriodTypeOnPush(); - end; - - local procedure WeekPeriodTypeOnValidate() - begin - WeekPeriodTypeOnPush(); - end; - - local procedure MonthPeriodTypeOnValidate() - begin - MonthPeriodTypeOnPush(); - end; - - local procedure QuarterPeriodTypeOnValidate() - begin - QuarterPeriodTypeOnPush(); - end; - - local procedure YearPeriodTypeOnValidate() - begin - YearPeriodTypeOnPush(); - end; - - local procedure PeriodPeriodTypeOnValidate() - begin - PeriodPeriodTypeOnPush(); - end; - - local procedure NetChangeAmountTypeOnValidate() - begin - NetChangeAmountTypeOnPush(); - end; - - local procedure BalanceatDateAmountTypeOnValid() - begin - BalanceatDateAmountTypeOnPush(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/History/PostedReceivBillsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Sales/History/PostedReceivBillsMaturity.Page.al deleted file mode 100644 index 5c5880d78de..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/History/PostedReceivBillsMaturity.Page.al +++ /dev/null @@ -1,188 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.History; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -page 7000069 "Posted Receiv. Bills Maturity" -{ - Caption = 'Posted Receiv. Bills Maturity'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - PageType = List; - SaveValues = true; - SourceTable = "Posted Cartera Doc."; - SourceTableView = sorting("Bank Account No.", "Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date", "Document Type") - where("Document Type" = const(Bill), - Type = const(Receivable)); - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View by'; - OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - if PeriodType = PeriodType::Period then - PeriodPeriodTypeOnValidate(); - if PeriodType = PeriodType::Year then - YearPeriodTypeOnValidate(); - if PeriodType = PeriodType::Quarter then - QuarterPeriodTypeOnValidate(); - if PeriodType = PeriodType::Month then - MonthPeriodTypeOnValidate(); - if PeriodType = PeriodType::Week then - WeekPeriodTypeOnValidate(); - if PeriodType = PeriodType::Day then - DayPeriodTypeOnValidate(); - end; - } - field(AmountType; AmountType) - { - ApplicationArea = Basic, Suite; - Caption = 'View as'; - OptionCaption = 'Net Change,Balance at Date'; - ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; - - trigger OnValidate() - begin - if AmountType = AmountType::"Balance at Date" then - BalanceatDateAmountTypeOnValid(); - if AmountType = AmountType::"Net Change" then - NetChangeAmountTypeOnValidate(); - end; - } - } - part(DueDateLin; "Posted Bills Maturity Lin.") - { - ApplicationArea = Basic, Suite; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateSubForm(); - end; - - var - PeriodType: Option Day,Week,Month,Quarter,Year,Period; - AmountType: Option "Net Change","Balance at Date"; - CategoryFilter: Code[250]; - - local procedure UpdateSubForm() - begin - Rec.SetFilter("Category Code", CategoryFilter); - CurrPage.DueDateLin.PAGE.Set(Rec, PeriodType, AmountType); - end; - - local procedure DayPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure WeekPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure MonthPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure QuarterPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure YearPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure PeriodPeriodTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure BalanceatDateAmountTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure NetChangeAmountTypeOnPush() - begin - UpdateSubForm(); - end; - - local procedure DayPeriodTypeOnValidate() - begin - DayPeriodTypeOnPush(); - end; - - local procedure WeekPeriodTypeOnValidate() - begin - WeekPeriodTypeOnPush(); - end; - - local procedure MonthPeriodTypeOnValidate() - begin - MonthPeriodTypeOnPush(); - end; - - local procedure QuarterPeriodTypeOnValidate() - begin - QuarterPeriodTypeOnPush(); - end; - - local procedure YearPeriodTypeOnValidate() - begin - YearPeriodTypeOnPush(); - end; - - local procedure PeriodPeriodTypeOnValidate() - begin - PeriodPeriodTypeOnPush(); - end; - - local procedure NetChangeAmountTypeOnValidate() - begin - NetChangeAmountTypeOnPush(); - end; - - local procedure BalanceatDateAmountTypeOnValid() - begin - BalanceatDateAmountTypeOnPush(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BGAnalysisFactBox.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BGAnalysisFactBox.Page.al deleted file mode 100644 index 0147131c81d..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BGAnalysisFactBox.Page.al +++ /dev/null @@ -1,75 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Finance.ReceivablesPayables; - -page 35291 "BG Analysis Fact Box" -{ - Caption = 'BG Analysis Fact Box'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SaveValues = true; - SourceTable = "Bill Group"; - - layout - { - area(content) - { - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the currency code for the bill group.'; - } - field(DocCount; DocCount) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Documents'; - Editable = false; - ToolTip = 'Specifies the number of documents included.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total of the sums of the documents included in the bill group.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount for all of the documents included in the bill group.'; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - Doc: Record "Cartera Doc."; - DocCount: Integer; - - local procedure UpdateStatistics() - begin - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Global Dimension 1 Filter", Doc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", Doc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", Doc."Category Code"); - Rec.CopyFilter("Due Date Filter", Doc."Due Date"); - DocCount := Doc.Count(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankAccountInformationFB.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankAccountInformationFB.Page.al deleted file mode 100644 index 7d0716fb3ce..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankAccountInformationFB.Page.al +++ /dev/null @@ -1,134 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.ReceivablesPayables; - -page 35303 "Bank Account Information FB" -{ - Caption = 'Bank Account Information FB'; - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = CardPart; - SourceTable = "Bank Account"; - SourceTableView = sorting("Currency Code"); - - layout - { - area(content) - { - field("CurrBillGr.Amount"; CurrBillGr.Amount) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = CurrBillGr."Currency Code"; - AutoFormatType = 1; - Caption = 'Curr. Bill Gr. Amount'; - Editable = false; - ToolTip = 'Specifies the current amount related to bill groups on the bank account.'; - - trigger OnDrillDown() - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code"); - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Bill Gr./Pmt. Order No.", CurrBillGr."No."); - Doc.SetFilter("Category Code", CategoryFilter); - PAGE.RunModal(0, Doc); - end; - - trigger OnValidate() - begin - CurrBillGrAmountOnAfterValidat(); - end; - } - field("CurrBillGr.""Currency Code"""; CurrBillGr."Currency Code") - { - ApplicationArea = Basic, Suite; - Caption = 'Curr. Bill Gr.Currency Code'; - Editable = false; - TableRelation = Currency; - ToolTip = 'Specifies the currency of the bill groups amount. '; - } - field("CurrBillGr.""Amount (LCY)"""; CurrBillGr."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - Caption = 'Curr. Bill Gr. Amt. (LCY)'; - Editable = false; - ToolTip = 'Specifies the current amount related to bill groups on the bank account, in LCY.'; - - trigger OnDrillDown() - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code"); - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Bill Gr./Pmt. Order No.", CurrBillGr."No."); - Doc.SetFilter("Category Code", CategoryFilter); - PAGE.RunModal(0, Doc); - end; - - trigger OnValidate() - begin - CurrBillGrAmountLCYOnAfterVali(); - end; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - RiskIncGr := Rec."Posted Receiv. Bills Rmg. Amt."; - if (CurrBillGr."Dealing Type" = CurrBillGr."Dealing Type"::Discount) and - (CurrBillGr.Factoring = CurrBillGr.Factoring::" ") - then - RiskIncGr := RiskIncGr + CurrBillGr.Amount; - if Rec."Credit Limit for Discount" <> 0 then - RiskPercIncGr := RiskIncGr / Rec."Credit Limit for Discount" * 100 - else - if RiskIncGr = 0 then - RiskPercIncGr := 0 - else - RiskPercIncGr := 100; - end; - - trigger OnInit() - begin - CurrPage.LookupMode := true; - end; - - trigger OnOpenPage() - begin - CurrBillGr.SetFilter("Category Filter", CategoryFilter); - CurrBillGr.CalcFields(Amount, "Amount (LCY)"); - if Rec.Get(CurrBillGr."Bank Account No.") then; - end; - - var - Doc: Record "Cartera Doc."; - CurrBillGr: Record "Bill Group"; - RiskIncGr: Decimal; - RiskPercIncGr: Decimal; - CategoryFilter: Code[250]; - - local procedure CurrBillGrAmountOnAfterValidat() - begin - CurrBillGr.SetFilter("Category Filter", CategoryFilter); - CurrBillGr.CalcFields(Amount); - CurrPage.Update(false); - end; - - local procedure CurrBillGrAmountLCYOnAfterVali() - begin - CurrBillGr.SetFilter("Category Filter", CategoryFilter); - CurrBillGr.CalcFields(Amount); - CurrPage.Update(false); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankAccountSelection.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankAccountSelection.Page.al deleted file mode 100644 index 274b7bcc030..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankAccountSelection.Page.al +++ /dev/null @@ -1,484 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Bank.Check; -using Microsoft.Bank.Ledger; -using Microsoft.Bank.Statement; -using Microsoft.Finance.Currency; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Foundation.Comment; -using Microsoft.Purchases.History; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.History; - -page 7000018 "Bank Account Selection" -{ - Caption = 'Bank Account Selection'; - DataCaptionExpression = Caption; - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Worksheet; - SourceTable = "Bank Account"; - SourceTableView = sorting("Currency Code"); - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - field("CurrBillGr.""Dealing Type"""; CurrBillGr."Dealing Type") - { - ApplicationArea = Basic, Suite; - Caption = 'Dealing Type'; - ToolTip = 'Specifies the type of payment. Collection: The document will be sent to the bank for processing as a receivable. Discount: The document will be sent to the bank for processing as a prepayment discount. When a document is submitted for discount, the bill group bank advances the amount of the document (or a portion of it, in the case of invoices). Later, the bank is responsible for processing the collection of the document on the due date.'; - - trigger OnValidate() - begin - CurrBillGrDealingTypeOnAfterVa(); - end; - } - } - repeater(Control1) - { - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the bank account number.'; - } - field(Name; Rec.Name) - { - ApplicationArea = All; - ToolTip = 'Specifies if the name of the account.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the relevant currency code for the bank account.'; - Visible = false; - } - field("Credit Limit for Discount"; Rec."Credit Limit for Discount") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the credit limit for the discount of bills available at this particular bank.'; - } - field("Posted Receiv. Bills Rmg. Amt."; Rec."Posted Receiv. Bills Rmg. Amt.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the amount pending from the receivables registered at this bank.'; - } - field(RiskIncGr; RiskIncGr) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Risk Including Current Bill Group'; - Editable = false; - ToolTip = 'Specifies that customers'' insolvency risk rating includes the ongoing bill group.'; - } - field(RiskPercIncGr; RiskPercIncGr) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 0; - Caption = 'Risk % Including Current Bill Group'; - ExtendedDatatype = Ratio; - MaxValue = 100; - MinValue = 0; - ToolTip = 'Specifies that customers'' insolvency risk rating includes the ongoing bill group.'; - } - } - group(Control42) - { - ShowCaption = false; - fixed(Control1900668801) - { - ShowCaption = false; - group("Curr. Bill Gr. Amount") - { - Caption = 'Curr. Bill Gr. Amount'; - field("CurrBillGr.Amount"; CurrBillGr.Amount) - { - ApplicationArea = Basic, Suite; - AutoFormatExpression = CurrBillGr."Currency Code"; - AutoFormatType = 1; - Editable = false; - - trigger OnDrillDown() - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code"); - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Bill Gr./Pmt. Order No.", CurrBillGr."No."); - Doc.SetFilter("Category Code", CategoryFilter); - PAGE.RunModal(0, Doc); - end; - - trigger OnValidate() - begin - CurrBillGrAmountOnAfterValidat(); - end; - } - } - group("Curr. Bill Gr.Currency Code") - { - Caption = 'Curr. Bill Gr.Currency Code'; - field("CurrBillGr.""Currency Code"""; CurrBillGr."Currency Code") - { - ApplicationArea = Basic, Suite; - Caption = 'Curr. Bill Gr.Currency Code'; - Editable = false; - TableRelation = Currency; - ToolTip = 'Specifies the currency of the bill groups amount. '; - } - } - group("Curr. Bill Gr. Amt. (LCY)") - { - Caption = 'Curr. Bill Gr. Amt. (LCY)'; - field("CurrBillGr.""Amount (LCY)"""; CurrBillGr."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - Caption = 'Curr. Bill Gr. Amt. (LCY)'; - Editable = false; - ToolTip = 'Specifies the current amount related to bill groups on the bank account, in LCY.'; - - trigger OnDrillDown() - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No.", "Category Code"); - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Bill Gr./Pmt. Order No.", CurrBillGr."No."); - Doc.SetFilter("Category Code", CategoryFilter); - PAGE.RunModal(0, Doc); - end; - - trigger OnValidate() - begin - CurrBillGrAmountLCYOnAfterVali(); - end; - } - } - } - } - } - area(factboxes) - { - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("&Bank Acc.") - { - Caption = '&Bank Acc.'; - Image = Bank; - action(Card) - { - ApplicationArea = Basic, Suite; - Caption = 'Card'; - Image = EditLines; - RunObject = Page "Bank Account Card"; - RunPageLink = "No." = field("No."); - ShortCutKey = 'Shift+F7'; - ToolTip = 'View or change detailed information about the record that is being processed on the document or journal line.'; - } - action("Ledger E&ntries") - { - ApplicationArea = Basic, Suite; - Caption = 'Ledger E&ntries'; - RunObject = Page "Bank Account Ledger Entries"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No.", "Posting Date"); - ShortCutKey = 'Ctrl+F7'; - ToolTip = 'View the history of transactions that have been posted for the selected record.'; - } - action("Co&mments") - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "Comment Sheet"; - RunPageLink = "Table Name" = const("Bank Account"), - "No." = field("No."); - ToolTip = 'View or create a comment.'; - } - action(Statistics) - { - ApplicationArea = Basic, Suite; - Caption = 'Statistics'; - Image = Statistics; - RunObject = Page "Bank Account Statistics"; - RunPageLink = "No." = field("No."), - "Date Filter" = field("Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); - ShortCutKey = 'F7'; - ToolTip = 'View statistical information, such as the value of posted entries, for the record.'; - } - action(Balance) - { - ApplicationArea = Basic, Suite; - Caption = 'Balance'; - Image = Balance; - RunObject = Page "Bank Account Balance"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"); - ToolTip = 'View a summary of the bank account balance in different periods.'; - } - action("St&atements") - { - ApplicationArea = Basic, Suite; - Caption = 'St&atements'; - RunObject = Page "Bank Account Statement List"; - RunPageLink = "Bank Account No." = field("No."); - ToolTip = 'View statements for selected bank accounts. For each bank transaction, the report shows a description, an applied amount, a statement amount, and other information.'; - } - action("Chec&k Ledger Entries") - { - ApplicationArea = Basic, Suite; - Caption = 'Chec&k Ledger Entries'; - Image = CheckLedger; - RunObject = Page "Check Ledger Entries"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No.", "Entry Status", "Check No."); - ToolTip = 'View check ledger entries that result from posting transactions in a payment journal for the relevant bank account.'; - } - separator(Action51) - { - } - action("&Operation Fees") - { - ApplicationArea = Basic, Suite; - Caption = '&Operation Fees'; - RunObject = Page "Operation Fees"; - RunPageLink = Code = field("Operation Fees Code"), - "Currency Code" = field("Currency Code"); - ToolTip = 'View the various operation fees that banks charge to process the documents that are remitted to them. These operations include: collections, discounts, discount interest, rejections, payment orders, unrisked factoring, and risked factoring.'; - } - action("Customer Ratings") - { - ApplicationArea = Basic, Suite; - Caption = 'Customer Ratings'; - Image = CustomerRating; - RunObject = Page "Customer Ratings"; - RunPageLink = Code = field("Customer Ratings Code"), - "Currency Code" = field("Currency Code"); - ToolTip = 'View or edit the risk percentages that are assigned to customers according to their insolvency risk.'; - } - action("Sufi&xes") - { - ApplicationArea = Basic, Suite; - Caption = 'Sufi&xes'; - Image = NumberSetup; - RunObject = Page Suffixes; - RunPageLink = "Bank Acc. Code" = field("No."); - ToolTip = 'View the bank suffixes that area assigned to manage bill groups. Typically, banks assign the company a different suffix for managing bill groups, depending if they are receivable or discount management type operations.'; - } - separator(Action10) - { - Caption = ''; - } - action("Bill &Groups") - { - ApplicationArea = Basic, Suite; - Caption = 'Bill &Groups'; - Image = VoucherGroup; - RunObject = Page "Bill Groups List"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No."); - ToolTip = 'View the related bill groups.'; - } - action("Posted Bill Groups") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Bill Groups'; - Image = PostedVoucherGroup; - RunObject = Page "Posted Bill Groups List"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No."); - ToolTip = 'View the list of posted bill groups. When a bill group has been posted, the related documents are available for settlement, rejection, or recirculation.'; - } - separator(Action27) - { - Caption = ''; - } - action("Payment O&rders") - { - ApplicationArea = Basic, Suite; - Caption = 'Payment O&rders'; - RunObject = Page "Payment Orders List"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No."); - ToolTip = 'View or edit related payment orders.'; - } - action("Posted P&ayment Orders") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted P&ayment Orders'; - Image = PostedPayment; - RunObject = Page "Posted Payment Orders List"; - RunPageLink = "Bank Account No." = field("No."); - RunPageView = sorting("Bank Account No."); - ToolTip = 'View posted payment orders that represent payables to submit to the bank as a file for electronic payment.'; - } - separator(Action60) - { - } - action("Posted Recei&vable Bills") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Recei&vable Bills'; - Image = PostedReceivableVoucher; - RunObject = Page "Bank Cat. Posted Receiv. Bills"; - ToolTip = 'View the list of posted bill groups pertaining to receivables.'; - } - action("Posted Pa&yable Bills") - { - ApplicationArea = Basic, Suite; - Caption = 'Posted Pa&yable Bills'; - Image = PostedPayableVoucher; - RunObject = Page "Bank Cat. Posted Payable Bills"; - ToolTip = 'View the list of posted bill groups pertaining to payables.'; - } - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref(Statistics_Promoted; Statistics) - { - } - } - } - } - - trigger OnAfterGetRecord() - begin - RiskIncGr := Rec."Posted Receiv. Bills Rmg. Amt."; - if (CurrBillGr."Dealing Type" = CurrBillGr."Dealing Type"::Discount) and - (CurrBillGr.Factoring = CurrBillGr.Factoring::" ") - then - RiskIncGr := RiskIncGr + CurrBillGr.Amount; - if Rec."Credit Limit for Discount" <> 0 then - RiskPercIncGr := RiskIncGr / Rec."Credit Limit for Discount" * 100 - else - if RiskIncGr = 0 then - RiskPercIncGr := 0 - else - RiskPercIncGr := 100; - end; - - trigger OnInit() - begin - CurrPage.LookupMode := true; - end; - - trigger OnOpenPage() - begin - CurrBillGr.SetFilter("Category Filter", CategoryFilter); - CurrBillGr.CalcFields(Amount, "Amount (LCY)"); - if Rec.Get(CurrBillGr."Bank Account No.") then; - end; - - var - Doc: Record "Cartera Doc."; - CurrBillGr: Record "Bill Group"; - CurrPmtOrd: Record "Payment Order"; - RiskIncGr: Decimal; - RiskPercIncGr: Decimal; - CategoryFilter: Code[250]; - Caption: Text[250]; - - [Scope('OnPrem')] - procedure SetCurrBillGr(var CurrBillGr2: Record "Bill Group") - begin - Rec.Reset(); - CurrBillGr.Copy(CurrBillGr2); - CurrBillGr.SetFilter("Category Filter", CategoryFilter); - CurrBillGr.CalcFields(Amount, "Amount (LCY)", "Bank Account Name"); - Caption := StrSubstNo('%1 %2 %3', CurrBillGr2."No.", CurrBillGr2."Bank Account Name", CurrBillGr2.TableCaption()); - if (CurrBillGr."Currency Code" <> '') or - (CurrBillGr."Bank Account No." <> '') - then - Rec.SetRange("Currency Code", CurrBillGr."Currency Code"); - end; - - [Scope('OnPrem')] - procedure SetCurrPmtOrd(var CurrPmtOrd2: Record "Payment Order") - begin - Rec.Reset(); - CurrPmtOrd.Copy(CurrPmtOrd2); - CurrPmtOrd.SetFilter("Category Filter", CategoryFilter); - CurrPmtOrd.CalcFields(Amount, "Amount (LCY)", "Bank Account Name"); - Caption := StrSubstNo('%1 %2 %3', CurrPmtOrd2."No.", CurrPmtOrd2."Bank Account Name", CurrPmtOrd2.TableCaption()); - if (CurrPmtOrd."Currency Code" <> '') or - (CurrPmtOrd."Bank Account No." <> '') - then - Rec.SetRange("Currency Code", CurrPmtOrd."Currency Code"); - end; - - [Scope('OnPrem')] - procedure IsForDiscount(): Integer - begin - if CurrBillGr."Dealing Type" = CurrBillGr."Dealing Type"::Collection then - exit(0); // Collection - - exit(1); // Discount - end; - - local procedure CategoryFilterOnAfterValidate() - begin - CurrBillGr.SetFilter("Category Filter", CategoryFilter); - CurrBillGr.CalcFields(Amount, "Amount (LCY)"); - CurrPage.Update(false); - end; - - local procedure CurrBillGrDealingTypeOnAfterVa() - begin - CurrPage.Update(); - end; - - local procedure CurrBillGrAmountLCYOnAfterVali() - begin - CurrBillGr.SetFilter("Category Filter", CategoryFilter); - CurrBillGr.CalcFields(Amount); - CurrPage.Update(false); - end; - - local procedure CurrBillGrAmountOnAfterValidat() - begin - CurrBillGr.SetFilter("Category Filter", CategoryFilter); - CurrBillGr.CalcFields(Amount); - CurrPage.Update(false); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankCatPostRecBillsMatrix.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankCatPostRecBillsMatrix.Page.al deleted file mode 100644 index 501f1f87ab8..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankCatPostRecBillsMatrix.Page.al +++ /dev/null @@ -1,515 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using System.Utilities; - -page 36848 "Bank Cat.Post.Rec.Bills Matrix" -{ - Caption = 'Bank Cat.Post.Rec.Bills Matrix'; - Editable = false; - PageType = List; - SourceTable = "Bank Account"; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of the posted receivables bill. '; - } - field(Name; Rec.Name) - { - ApplicationArea = All; - ToolTip = 'Specifies if the name of the bill.'; - } - field(Field1; MATRIX_CellData[1]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[1]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(1); - end; - } - field(Field2; MATRIX_CellData[2]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[2]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(2); - end; - } - field(Field3; MATRIX_CellData[3]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[3]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(3); - end; - } - field(Field4; MATRIX_CellData[4]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[4]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(4); - end; - } - field(Field5; MATRIX_CellData[5]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[5]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(5); - end; - } - field(Field6; MATRIX_CellData[6]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[6]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(6); - end; - } - field(Field7; MATRIX_CellData[7]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[7]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(7); - end; - } - field(Field8; MATRIX_CellData[8]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[8]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(8); - end; - } - field(Field9; MATRIX_CellData[9]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[9]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(9); - end; - } - field(Field10; MATRIX_CellData[10]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[10]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(10); - end; - } - field(Field11; MATRIX_CellData[11]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[11]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(11); - end; - } - field(Field12; MATRIX_CellData[12]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[12]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(12); - end; - } - field(Field13; MATRIX_CellData[13]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[13]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(13); - end; - } - field(Field14; MATRIX_CellData[14]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[14]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(14); - end; - } - field(Field15; MATRIX_CellData[15]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[15]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(15); - end; - } - field(Field16; MATRIX_CellData[16]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[16]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(16); - end; - } - field(Field17; MATRIX_CellData[17]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[17]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(17); - end; - } - field(Field18; MATRIX_CellData[18]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[18]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(18); - end; - } - field(Field19; MATRIX_CellData[19]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[19]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(19); - end; - } - field(Field20; MATRIX_CellData[20]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[20]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(20); - end; - } - field(Field21; MATRIX_CellData[21]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[21]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(21); - end; - } - field(Field22; MATRIX_CellData[22]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[22]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(22); - end; - } - field(Field23; MATRIX_CellData[23]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[23]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(23); - end; - } - field(Field24; MATRIX_CellData[24]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[24]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(24); - end; - } - field(Field25; MATRIX_CellData[25]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[25]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(25); - end; - } - field(Field26; MATRIX_CellData[26]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[26]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(26); - end; - } - field(Field27; MATRIX_CellData[27]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[27]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(27); - end; - } - field(Field28; MATRIX_CellData[28]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[28]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(28); - end; - } - field(Field29; MATRIX_CellData[29]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[29]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(29); - end; - } - field(Field30; MATRIX_CellData[30]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[30]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(30); - end; - } - field(Field31; MATRIX_CellData[31]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[31]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(31); - end; - } - field(Field32; MATRIX_CellData[32]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - CaptionClass = '3,' + MATRIX_ColumnCaption[32]; - - trigger OnDrillDown() - begin - MATRIX_OnDrillDown(32); - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - var - MATRIX_CurrentColumnOrdinal: Integer; - MATRIX_NoOfColumns: Integer; - begin - MATRIX_CurrentColumnOrdinal := 1; - MATRIX_NoOfColumns := ArrayLen(MATRIX_CellData); - - while MATRIX_CurrentColumnOrdinal <= MATRIX_NoOfColumns do begin - MATRIX_OnAfterGetRecord(MATRIX_CurrentColumnOrdinal); - MATRIX_CurrentColumnOrdinal := MATRIX_CurrentColumnOrdinal + 1; - end; - end; - - var - MatrixRecords: array[32] of Record Date; - StatusFilterOption: Option Open,Honored,Rejected,All; - CalcAmt: Decimal; - MATRIX_CellData: array[32] of Decimal; - CategoryFilter: Code[250]; - MATRIX_ColumnCaption: array[32] of Text[1024]; - - local procedure SetDateFilter(ColumnID: Integer) - begin - if CategoryFilter = '' then - Rec.SetRange("Category Filter") - else - Rec.SetFilter("Category Filter", CategoryFilter); - if StatusFilterOption = StatusFilterOption::All then - Rec.SetFilter("Status Filter", '%1|%2|%3', - StatusFilterOption::Open, - StatusFilterOption::Honored, - StatusFilterOption::Rejected) - else - Rec.SetRange("Status Filter", StatusFilterOption); - - if MatrixRecords[ColumnID]."Period Start" = MatrixRecords[ColumnID]."Period End" then - Rec.SetRange("Due Date Filter", MatrixRecords[ColumnID]."Period Start") - else - Rec.SetRange("Due Date Filter", MatrixRecords[ColumnID]."Period Start", MatrixRecords[ColumnID]."Period End") - end; - - [Scope('OnPrem')] - procedure Load(MatrixColumns1: array[32] of Text[1024]; var MatrixRecords1: array[32] of Record Date; CategoryFilter1: Code[20]; StatusFilter: Text[30]) - begin - CopyArray(MATRIX_ColumnCaption, MatrixColumns1, 1); - CopyArray(MatrixRecords, MatrixRecords1, 1); - CategoryFilter := CategoryFilter1; - if Evaluate(StatusFilterOption, StatusFilter) then; - end; - - local procedure MATRIX_OnDrillDown(ColumnID: Integer) - var - PostedCarteraDoc: Record "Posted Cartera Doc."; - PostedBills: Page "Posted Bills"; - begin - SetDateFilter(ColumnID); - PostedCarteraDoc.SetRange("Document Type", PostedCarteraDoc."Document Type"::Bill); - PostedCarteraDoc.SetRange(Type, PostedCarteraDoc.Type::Receivable); - - if MatrixRecords[ColumnID]."Period Start" = MatrixRecords[ColumnID]."Period End" then - PostedCarteraDoc.SetRange("Due Date", MatrixRecords[ColumnID]."Period Start") - else - PostedCarteraDoc.SetRange("Due Date", MatrixRecords[ColumnID]."Period Start", MatrixRecords[ColumnID]."Period End"); - - PostedCarteraDoc.SetFilter("Category Code", CategoryFilter); - PostedCarteraDoc.SetRange(Status, "Cartera Document Status".FromInteger(StatusFilterOption)); - PostedCarteraDoc.SetRange("Bank Account No.", Rec."No."); - PostedBills.SetTableView(PostedCarteraDoc); - PostedBills.RunModal(); - end; - - local procedure MATRIX_OnAfterGetRecord(ColumnID: Integer) - begin - SetDateFilter(ColumnID); - Rec.SetFilter("Category Filter", CategoryFilter); - if StatusFilterOption = StatusFilterOption::All then - Rec.SetFilter("Status Filter", '%1|%2|%3', - StatusFilterOption::Open, - StatusFilterOption::Honored, - StatusFilterOption::Rejected) - else - Rec.SetRange("Status Filter", StatusFilterOption); - Rec.CalcFields("Posted Receiv Bills Amt. (LCY)"); - CalcAmt := Rec."Posted Receiv Bills Amt. (LCY)"; - MATRIX_CellData[ColumnID] := Rec."Posted Receiv Bills Amt. (LCY)"; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankCatPostedReceivBills.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankCatPostedReceivBills.Page.al deleted file mode 100644 index ca7f7049cfe..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankCatPostedReceivBills.Page.al +++ /dev/null @@ -1,165 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Analysis; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Foundation.Enums; -using System.Utilities; - -page 7000066 "Bank Cat. Posted Receiv. Bills" -{ - Caption = 'Bank Cat. Posted Receiv. Bills'; - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SaveValues = true; - SourceTable = "Bank Account"; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryFilter; CategoryFilter) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the categories that the data is included for.'; - } - field(StatusFilterOption; StatusFilterOption) - { - ApplicationArea = Basic, Suite; - Caption = 'Status Filter'; - OptionCaption = 'Open,Honored,Rejected,All'; - ToolTip = 'Specifies a filter for the status of bills that will be included.'; - } - } - group("Matrix Options") - { - Caption = 'Matrix Options'; - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View By'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - SetColumns(SetWanted::Initial); - end; - } - field(ColumnSet; ColumnSet) - { - ApplicationArea = Basic, Suite; - Caption = 'Column Set'; - Editable = false; - ToolTip = 'Specifies the column setting based on how you have selected to view the matrix.'; - } - } - } - } - - actions - { - area(processing) - { - action("&Show Matrix") - { - ApplicationArea = Basic, Suite; - Caption = '&Show Matrix'; - Image = ShowMatrix; - ToolTip = 'View the data overview according to the selected filters and options.'; - - trigger OnAction() - var - MatrixForm: Page "Bank Cat.Post.Rec.Bills Matrix"; - begin - StatusFilter := Format(StatusFilterOption, 0, ''); - MatrixForm.Load(MatrixColumnCaptions, MatrixRecords, CategoryFilter, StatusFilter); - MatrixForm.RunModal(); - end; - } - action("Next Set") - { - ApplicationArea = Basic, Suite; - Caption = 'Next Set'; - Image = NextSet; - ToolTip = 'Go to the next set of data.'; - - trigger OnAction() - begin - SetColumns(SetWanted::Next); - end; - } - action("Previous Set") - { - ApplicationArea = Basic, Suite; - Caption = 'Previous Set'; - Image = PreviousSet; - ToolTip = 'Go to the previous data set.'; - - trigger OnAction() - begin - SetColumns(SetWanted::Previous); - end; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref("&Show Matrix_Promoted"; "&Show Matrix") - { - } - actionref("Next Set_Promoted"; "Next Set") - { - } - actionref("Previous Set_Promoted"; "Previous Set") - { - } - } - } - } - - trigger OnOpenPage() - begin - SetColumns(SetWanted::Initial); - if Rec.HasFilter then begin - CategoryFilter := Rec.GetFilter("Category Filter"); - StatusFilter := Rec.GetFilter("Status Filter"); - if Evaluate(StatusFilterOption, StatusFilter) then; - end; - end; - - var - MatrixRecords: array[32] of Record Date; - CategoryFilter: Code[20]; - StatusFilterOption: Option Open,Honored,Rejected,All; - PeriodType: Enum "Analysis Period Type"; - SetWanted: Option Initial,Previous,Same,Next; - MatrixColumnCaptions: array[32] of Text[1024]; - ColumnSet: Text[1024]; - PKFirstRecInCurrSet: Text[100]; - StatusFilter: Text[30]; - CurrSetLength: Integer; - - [Scope('OnPrem')] - procedure SetColumns(SetWanted: Option Initial,Previous,Same,Next) - var - MatrixMgt: Codeunit "Matrix Management"; - begin - MatrixMgt.GeneratePeriodMatrixData(SetWanted, 32, false, PeriodType, '', - PKFirstRecInCurrSet, MatrixColumnCaptions, ColumnSet, CurrSetLength, MatrixRecords); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankSummBillGroup.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankSummBillGroup.Report.al deleted file mode 100644 index d93df0d96c7..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankSummBillGroup.Report.al +++ /dev/null @@ -1,245 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Foundation.Address; - -report 7000004 "Bank - Summ. Bill Group" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Sales/Receivables/BankSummBillGroup.rdlc'; - ApplicationArea = Basic, Suite; - Caption = 'Bank - Summ. Bill Group'; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem(BankAcc; "Bank Account") - { - CalcFields = "Posted Receiv. Bills Amt.", "Posted Receiv Bills Amt. (LCY)", "Closed Receiv. Bills Amt.", "Closed Receiv Bills Amt. (LCY)"; - RequestFilterFields = "No.", "Search Name", "Bank Acc. Posting Group"; - column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) - { - } - column(USERID; UserId) - { - } - column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) - { - } - column(BankAcc_TABLECAPTION__________BankAccTableFilter; TableCaption + ': ' + BankAccTableFilter) - { - } - column(BankAccTableFilter; BankAccTableFilter) - { - } - column(PrintAmountsInLCY; PrintAmountsInLCY) - { - } - column(BankAcc__No__; "No.") - { - } - column(BankAcc_Name; Name) - { - } - column(BankAcc__Bank_Acc__Posting_Group_; "Bank Acc. Posting Group") - { - } - column(BankAcc__Our_Contact_Code_; "Our Contact Code") - { - } - column(BankAddr_5_; BankAddr[5]) - { - } - column(BankAcc_Contact; Contact) - { - } - column(BankAcc__Phone_No__; "Phone No.") - { - } - column(BankAddr_6_; BankAddr[6]) - { - } - column(BankAddr_7_; BankAddr[7]) - { - } - column(BankAddr_4_; BankAddr[4]) - { - } - column(BankAddr_3_; BankAddr[3]) - { - } - column(BankAddr_1_; BankAddr[1]) - { - } - column(BankAddr_2_; BankAddr[2]) - { - } - column(BankAcc__Operation_Fees_Code_; "Operation Fees Code") - { - } - column(BankAcc__Last_Bill_Gr__No__; "Last Bill Gr. No.") - { - } - column(BankAcc__Date_of_Last_Post__Bill_Gr__; Format("Date of Last Post. Bill Gr.")) - { - } - column(PostedBillAmt; PostedBillAmt) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(ClosedBillAmt; ClosedBillAmt) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(BankAcc__Currency_Code_; "Currency Code") - { - } - column(PostedBillAmt_Control5; PostedBillAmt) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(ClosedBillAmt_Control6; ClosedBillAmt) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Bank___Summ__Bill_GroupCaption; Bank___Summ__Bill_GroupCaptionLbl) - { - } - column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) - { - } - column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) - { - } - column(BankAcc__No__Caption; FieldCaption("No.")) - { - } - column(BankAcc_NameCaption; FieldCaption(Name)) - { - } - column(BankAcc__Bank_Acc__Posting_Group_Caption; FieldCaption("Bank Acc. Posting Group")) - { - } - column(BankAcc__Our_Contact_Code_Caption; FieldCaption("Our Contact Code")) - { - } - column(BankAcc__Operation_Fees_Code_Caption; FieldCaption("Operation Fees Code")) - { - } - column(BankAcc__Last_Bill_Gr__No__Caption; FieldCaption("Last Bill Gr. No.")) - { - } - column(BankAcc__Date_of_Last_Post__Bill_Gr__Caption; BankAcc__Date_of_Last_Post__Bill_Gr__CaptionLbl) - { - } - column(PostedBillAmtCaption; PostedBillAmtCaptionLbl) - { - } - column(ClosedBillAmtCaption; ClosedBillAmtCaptionLbl) - { - } - column(BankAcc_ContactCaption; FieldCaption(Contact)) - { - } - column(BankAcc__Phone_No__Caption; FieldCaption("Phone No.")) - { - } - column(BankAcc__Currency_Code_Caption; BankAcc__Currency_Code_CaptionLbl) - { - } - column(PostedBillAmt_Control5Caption; PostedBillAmt_Control5CaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - FormatAddress.FormatAddr( - BankAddr, Name, "Name 2", '', Address, "Address 2", - City, "Post Code", County, "Country/Region Code"); - - if PrintAmountsInLCY then begin - PostedBillAmt := "Posted Receiv Bills Amt. (LCY)"; - ClosedBillAmt := "Closed Receiv Bills Amt. (LCY)"; - end else begin - PostedBillAmt := "Posted Receiv. Bills Amt."; - ClosedBillAmt := "Closed Receiv. Bills Amt."; - end; - end; - - trigger OnPreDataItem() - begin - Clear(PostedBillAmt); - Clear(ClosedBillAmt); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(PrintAmountsInLCY; PrintAmountsInLCY) - { - ApplicationArea = Basic, Suite; - Caption = 'Show amounts in LCY'; - ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - trigger OnPreReport() - begin - BankAccTableFilter := BankAcc.GetFilters(); - end; - - var - FormatAddress: Codeunit "Format Address"; - BankAddr: array[8] of Text[100]; - BankAccTableFilter: Text[250]; - PrintAmountsInLCY: Boolean; - ClosedBillAmt: Decimal; - PostedBillAmt: Decimal; - Bank___Summ__Bill_GroupCaptionLbl: Label 'Bank - Summ. Bill Group'; - CurrReport_PAGENOCaptionLbl: Label 'Page'; - All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; - BankAcc__Date_of_Last_Post__Bill_Gr__CaptionLbl: Label 'Date of Last Post. Bill Gr.'; - PostedBillAmtCaptionLbl: Label 'Posted Receiv. Bills Amt.'; - ClosedBillAmtCaptionLbl: Label 'Closed Receiv. Bills Amt.'; - BankAcc__Currency_Code_CaptionLbl: Label 'Currency Code'; - PostedBillAmt_Control5CaptionLbl: Label 'Total'; - - [Scope('OnPrem')] - procedure GetCurrencyCode(): Code[10] - begin - if PrintAmountsInLCY then - exit(''); - - exit(BankAcc."Currency Code"); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankSummBillGroup.rdlc b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankSummBillGroup.rdlc deleted file mode 100644 index ec5f963f918..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BankSummBillGroup.rdlc +++ /dev/null @@ -1,2185 +0,0 @@ - - - 0 - - - - SQL - - - None - 9cdb8cbc-65f6-479d-b53c-6767c14854f8 - - - - - - - - - - - 1.7cm - - - 3cm - - - 1.65cm - - - 1.65cm - - - 1.65cm - - - 1.65cm - - - 1.65cm - - - 1.5cm - - - 1.9cm - - - 1.9cm - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox39 - 52 - - - 10 - - - - - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - =First(Fields!BankAcc_TABLECAPTION__________BankAccTableFilter.Value) - - - - - - textbox29 - 51 - - - 10 - - - - - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox16 - 50 - - - 10 - - - - - - - - - - - - - - - 0.423cm - - - - - true - true - - - - - =First(Fields!All_amounts_are_in_LCYCaption.Value) - - - - - - textbox6 - 49 - - - 4 - - - - - - - - - true - true - - - - - - - - - - - textbox10 - 48 - - - 6 - - - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!BankAcc__No__Caption.Value) - - - - - - 47 - - - - - - - - true - - - - - =First(Fields!BankAcc_NameCaption.Value) - - - - - - 46 - - - 2 - - - - - - - true - - - - - =First(Fields!BankAcc__Bank_Acc__Posting_Group_Caption.Value) - - - - - - 45 - - - - - - - - true - - - - - =First(Fields!BankAcc__Our_Contact_Code_Caption.Value) - - - - - - 44 - - - - - - - - true - - - - - =First(Fields!BankAcc__Operation_Fees_Code_Caption.Value) - - - - - - 43 - - - - - - - - true - - - - - =First(Fields!BankAcc__Last_Bill_Gr__No__Caption.Value) - - - - - - 42 - - - - - - - - true - - - - - =First(Fields!BankAcc__Date_of_Last_Post__Bill_Gr__Caption.Value) - - - - - - - 41 - - - - - - - - true - - - - - =First(Fields!PostedBillAmtCaption.Value) - - - - - - - 40 - - - - - - - - true - - - - - =First(Fields!ClosedBillAmtCaption.Value) - - - - - - - 39 - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - 10 - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__No__.Value - - - - - - - 37 - - - - - - - - true - - - - - =Fields!BankAcc_Name.Value - - - - - - 36 - - - 2 - - - - - - - true - - - - - =Fields!BankAcc__Bank_Acc__Posting_Group_.Value - - - - - - 35 - - - - - - - - true - - - - - =Fields!BankAcc__Our_Contact_Code_.Value - - - - - - 34 - - - - - - - - true - - - - - =Fields!BankAcc__Operation_Fees_Code_.Value - - - - - - 33 - - - - - - - - true - - - - - =Fields!BankAcc__Last_Bill_Gr__No__.Value - - - - - - - 32 - - - - - - - - true - - - - - =Fields!BankAcc__Date_of_Last_Post__Bill_Gr__.Value - - - - - - 31 - - - - - - - - true - true - - - - - =Fields!PostedBillAmt.Value - - - - - - 30 - - - - - - - - true - true - - - - - =Fields!ClosedBillAmt.Value - - - - - - 29 - - - - - - - - 0.423cm - - - - - true - true - - - - - - - - - - - textbox23 - 28 - - - 10 - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAddr_1_.Value - - - - - - 27 - - - 2 - - - - - - - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAddr_2_.Value - - - - - - 25 - - - 2 - - - - - - - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAddr_3_.Value - - - - - - 23 - - - 2 - - - - - - - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAddr_4_.Value - - - - - - 21 - - - 2 - - - - - - - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAddr_5_.Value - - - - - - 19 - - - 2 - - - - - - - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAddr_6_.Value - - - - - - 17 - - - 2 - - - - - - - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAddr_7_.Value - - - - - - 15 - - - 2 - - - - - - - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc_ContactCaption.Value - - - - - - 13 - - - - - - - - true - - - - - =Fields!BankAcc_Contact.Value - - - - - - 12 - - - - - - - - true - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__Phone_No__Caption.Value - - - - - - 10 - - - - - - - - true - - - - - =Fields!BankAcc__Phone_No__.Value - - - - - - 9 - - - - - - - - true - true - - - - - - - - 8 - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__Currency_Code_Caption.Value - - - - - - 7 - - - - - - - - true - - - - - =Fields!BankAcc__Currency_Code_.Value - - - - - - 6 - - - - - - - - true - true - - - - - - - - 8 - - - - - - - - - - - - - 0.846cm - - - - - true - true - - - - - - - - - - - textbox59 - - - 10 - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =First(Fields!PostedBillAmt_Control5Caption.Value) - - - - - - 4 - - - - - - - - true - true - - - - - - - - 7 - - - - - - - - - - - - true - true - - - - - =Sum(Fields!PostedBillAmt.Value) - - - - - - 2 - - - - - - - - true - true - - - - - =Sum(Fields!ClosedBillAmt.Value) - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) - - After - true - - - - =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) - - After - true - - - - =iif(Fields!BankAccTableFilter.Value="",TRUE,FALSE) - - After - true - - - - =iif(Fields!PrintAmountsInLCY.Value=TRUE,FALSE,TRUE) - - After - true - - - After - true - - - After - true - - - - Detail - - - - - - - - - - - - - - - - - Detail_Collection - Output - true - - - Before - true - - - - DataSet_Result - 1.32275cm - 6 - - - true - true - - - - - =User!UserID - - - - - - - 0.84628cm - 14.9cm - 0.423cm - 3.25cm - 5 - - - - true - - - - - =Fields!FORMAT_TODAY_0_4_.Value - - - - - - - 0.00028cm - 15cm - 0.423cm - 3.15cm - 3 - - - - true - - - - - =Fields!COMPANYNAME.Value - - - - - - 0.42328cm - 0.423cm - 7.5cm - 2 - - - - true - - - - - =Fields!Bank___Summ__Bill_GroupCaption.Value - - - - - - 0.00028cm - 0.423cm - 7.5cm - 1 - - - - true - - - - - =Fields!CurrReport_PAGENOCaption.Value - - - - - - 0.42328cm - 16.95cm - 0.423cm - 0.75cm - - - - 10.62875cm - - 18.25cm - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - - =User!Language - true - Invalid - faa0a980-97e6-4165-978f-6170e9bd36cf - - - - - COMPANYNAME - - - USERID - - - FORMAT_TODAY_0_4_ - - - BankAcc_TABLECAPTION__________BankAccTableFilter - - - BankAccTableFilter - - - PrintAmountsInLCY - - - BankAcc__No__ - - - BankAcc_Name - - - BankAcc__Bank_Acc__Posting_Group_ - - - BankAcc__Our_Contact_Code_ - - - BankAddr_5_ - - - BankAcc_Contact - - - BankAcc__Phone_No__ - - - BankAddr_6_ - - - BankAddr_7_ - - - BankAddr_4_ - - - BankAddr_3_ - - - BankAddr_1_ - - - BankAddr_2_ - - - BankAcc__Operation_Fees_Code_ - - - BankAcc__Last_Bill_Gr__No__ - - - BankAcc__Date_of_Last_Post__Bill_Gr__ - - - PostedBillAmt - - - PostedBillAmtFormat - - - ClosedBillAmt - - - ClosedBillAmtFormat - - - BankAcc__Currency_Code_ - - - PostedBillAmt_Control5 - - - PostedBillAmt_Control5Format - - - ClosedBillAmt_Control6 - - - ClosedBillAmt_Control6Format - - - Bank___Summ__Bill_GroupCaption - - - CurrReport_PAGENOCaption - - - All_amounts_are_in_LCYCaption - - - BankAcc__No__Caption - - - BankAcc_NameCaption - - - BankAcc__Bank_Acc__Posting_Group_Caption - - - BankAcc__Our_Contact_Code_Caption - - - BankAcc__Operation_Fees_Code_Caption - - - BankAcc__Last_Bill_Gr__No__Caption - - - BankAcc__Date_of_Last_Post__Bill_Gr__Caption - - - PostedBillAmtCaption - - - ClosedBillAmtCaption - - - BankAcc_ContactCaption - - - BankAcc__Phone_No__Caption - - - BankAcc__Currency_Code_Caption - - - PostedBillAmt_Control5Caption - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BatchSettlPostedBillGrs.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BatchSettlPostedBillGrs.Report.al deleted file mode 100644 index 3f42543db09..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BatchSettlPostedBillGrs.Report.al +++ /dev/null @@ -1,555 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.GeneralLedger.Journal; -using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Finance.GeneralLedger.Posting; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Finance.VAT.Setup; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Purchases.Payables; -using Microsoft.Sales.History; - -report 7000086 "Batch Settl. Posted Bill Grs." -{ - Caption = 'Batch Settl. Posted Bill Grs.'; - Permissions = TableData "Cust. Ledger Entry" = imd, - TableData "Vendor Ledger Entry" = imd, - TableData "G/L Register" = m, - TableData "Posted Cartera Doc." = imd, - TableData "Closed Cartera Doc." = imd, - TableData "Posted Bill Group" = imd, - TableData "Closed Bill Group" = imd; - ProcessingOnly = true; - - dataset - { - dataitem(PostedBillGr; "Posted Bill Group") - { - DataItemTableView = sorting("No.") order(ascending); - dataitem(PostedDoc; "Posted Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemTableView = sorting("Bill Gr./Pmt. Order No.", Status, "Category Code", Redrawn, "Due Date") where(Status = const(Open), Type = const(Receivable)); - - trigger OnAfterGetRecord() - var - FromJnl: Boolean; - begin - IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("No."); - BankAcc.Get(PostedBillGr."Bank Account No."); - OnReadPostedBillGroupOnAfterGetBankAcc(BankAcc); - Delay := BankAcc."Delay for Notices"; - OnReadPostedBillGroupOnAfterSetDelay(BankAcc, Delay, PostedBillGr); - - if DueOnly and (PostingDate < "Due Date" + Delay) then - CurrReport.Skip(); - - TotalDocCount := TotalDocCount + 1; - DocCount := DocCount + 1; - Window.Update(3, Round(DocCount / TotalDoc * 10000, 1)); - Window.Update(4, StrSubstNo('%1 %2', "Document Type", "Document No.")); - - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedBillGr."No."; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::Customer); - CustLedgEntry.Get(PostedDoc."Entry No."); - if PostedDoc."Document Type" = PostedDoc."Document Type"::Bill then begin - GenJnlLine.Description := CopyStr( - StrSubstNo(Text1100004, PostedDoc."Document No.", PostedDoc."No."), - 1, MaxStrLen(GenJnlLine.Description)); - if GLSetup."Unrealized VAT" then begin - FromJnl := false; - if PostedDoc."From Journal" then - FromJnl := true; - ExistsNoRealVAT := GenJnlPostLine.CustFindVATSetup(VATPostingSetup, CustLedgEntry, FromJnl); - end; - end else - GenJnlLine.Description := CopyStr( - StrSubstNo(Text1100005, PostedDoc."Document No."), - 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Account No.", CustLedgEntry."Customer No."); - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, -PostedDoc."Remaining Amount"); - GenJnlLine."Applies-to Doc. Type" := CustLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := CustLedgEntry."Document No."; - GenJnlLine."Applies-to Bill No." := CustLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := CustLedgEntry."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry, PostedBillGr); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - - if ("Document Type" = "Document Type"::Bill) and - GLSetup."Unrealized VAT" and - ExistVATEntry and - (not IsRedrawn) - then begin - CustLedgEntry.CalcFields("Remaining Amount", "Remaining Amt. (LCY)"); - OnBeforeCustUnrealizedVAT2(PostedDoc, GenJnlLine, CustLedgEntry, PostedBillGr, NoRealVATBuffer); - CarteraManagement.CustUnrealizedVAT2( - CustLedgEntry, - CustLedgEntry."Remaining Amt. (LCY)", - GenJnlLine, - ExistVATEntry, - FirstVATEntryNo, - LastVATEntryNo, - NoRealVATBuffer, - FromJnl, - "Document No."); - OnAfterCustUnrealizedVAT2(PostedDoc, GenJnlLine, CustLedgEntry, PostedBillGr, NoRealVATBuffer); - - if NoRealVATBuffer.Find('-') then begin - repeat - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer.Account, - NoRealVATBuffer.Amount); - InsertGenJournalLine( - GenJnlLine."Account Type"::"G/L Account", - NoRealVATBuffer."Balance Account", - -NoRealVATBuffer.Amount); - until NoRealVATBuffer.Next() = 0; - NoRealVATBuffer.DeleteAll(); - end; - end; - - GroupAmount := GroupAmount + "Remaining Amount"; - GroupAmountLCY := GroupAmountLCY + "Remaining Amt. (LCY)"; - CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Honored; - CustLedgEntry.Modify(); - - if BGPOPostBuffer.Get('', '', CustLedgEntry."Entry No.") then begin - BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; - BGPOPostBuffer.Modify(); - end else begin - BGPOPostBuffer.Init(); - BGPOPostBuffer."Entry No." := CustLedgEntry."Entry No."; - BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; - BGPOPostBuffer.Insert(); - end; - - if (PostedBillGr."Dealing Type" = PostedBillGr."Dealing Type"::Discount) and - (PostedBillGr.Factoring <> PostedBillGr.Factoring::" ") - then - DiscFactLiabs(PostedDoc); - end; - - trigger OnPostDataItem() - var - CustLedgEntry2: Record "Cust. Ledger Entry"; - begin - if (DocCount = 0) or (GroupAmount = 0) then - CurrReport.Skip(); - - if PostedBillGr.Factoring = PostedBillGr.Factoring::" " then begin - CustLedgEntry2.Get(BGPOPostBuffer."Entry No."); - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedBillGr."No."; - if "Dealing Type" = "Dealing Type"::Discount then begin - BankAcc.TestField("Bank Acc. Posting Group"); - BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); - BankAccPostingGr.TestField("Liabs. for Disc. Bills Acc."); - GenJnlLine.Validate("Account No.", BankAccPostingGr."Liabs. for Disc. Bills Acc."); - end else begin - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); - GenJnlLine.Validate("Account No.", BankAcc."No."); - end; - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedBillGr."No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedBillGr."Currency Code"); - GenJnlLine.Validate(Amount, GroupAmount); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := CustLedgEntry."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry2, PostedBillGr); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - end else - FactBankAccounting(); - - if PostedBillGr."Currency Code" <> '' then - if SumLCYAmt <> 0 then begin - Currency.SetFilter(Code, PostedBillGr."Currency Code"); - Currency.FindFirst(); - if SumLCYAmt > 0 then begin - Currency.TestField("Residual Gains Account"); - Acct := Currency."Residual Gains Account"; - end else begin - Currency.TestField("Residual Losses Account"); - Acct := Currency."Residual Losses Account"; - end; - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedBillGr."No."; - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); - GenJnlLine.Validate("Account No.", Acct); - GenJnlLine.Description := Text1100010; - GenJnlLine.Validate("Currency Code", ''); - GenJnlLine.Validate(Amount, -SumLCYAmt); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine.Validate("Shortcut Dimension 1 Code", BankAcc."Global Dimension 1 Code"); - GenJnlLine.Validate("Shortcut Dimension 2 Code", BankAcc."Global Dimension 2 Code"); - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry2, PostedBillGr); - GenJnlLine.Insert(); - end; - - OnPostDataItemPostedDocOnBeforePostSettlement(GenJnlLine, PostedBillGr, PostingDate); - DocPost.PostSettlement(GenJnlLine); - GenJnlLine.DeleteAll(); - - DocPost.CloseBillGroupIfEmpty(PostedBillGr, PostingDate); - - if ExistVATEntry then begin - GLReg.FindLast(); - GLReg."From VAT Entry No." := FirstVATEntryNo; - GLReg."To VAT Entry No." := LastVATEntryNo; - GLReg.Modify(); - end; - end; - - trigger OnPreDataItem() - begin - SumLCYAmt := 0; - GenJnlLineNextNo := 0; - TotalDoc := Count; - ExistVATEntry := false; - end; - } - - trigger OnAfterGetRecord() - begin - BillGrCount := BillGrCount + 1; - Window.Update(1, Round(BillGrCount / TotalBillGr * 10000, 1)); - Window.Update(2, StrSubstNo('%1', "No.")); - Window.Update(3, 0); - GroupAmount := 0; - - TotalDisctdAmt := 0; - end; - - trigger OnPostDataItem() - begin - Window.Close(); - - Commit(); - - Message( - Text1100003, - TotalDocCount, BillGrCount, GroupAmountLCY); - end; - - trigger OnPreDataItem() - begin - DocPost.CheckPostingDate(PostingDate); - - SourceCodeSetup.Get(); - SourceCode := SourceCodeSetup."Cartera Journal"; - - GroupAmountLCY := 0; - BillGrCount := 0; - DocCount := 0; - TotalDocCount := 0; - TotalBillGr := Count; - Window.Open( - Text1100000 + - Text1100001 + - Text1100002); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(PostingDate; PostingDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Posting Date'; - NotBlank = true; - ToolTip = 'Specifies the posting date.'; - } - field(DueOnly; DueOnly) - { - ApplicationArea = Basic, Suite; - Caption = 'Due bills only'; - ToolTip = 'Specifies if you want to only include documents that have become overdue. If it does not matter if a document is overdue at the time of settlement, leave this field blank.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - trigger OnInitReport() - begin - PostingDate := WorkDate(); - end; - - trigger OnPreReport() - begin - GLSetup.Get(); - end; - - var - Text1100000: Label 'Settling @1@@@@@@@@@@@@@@@@@@@@@@@\\'; - Text1100001: Label 'Bill Groups #2###### @3@@@@@@@@@@@@@\'; - Text1100002: Label 'Receiv. Documents #4######'; - Text1100003: Label '%1 Documents in %2 Bill Groups totaling %3 (LCY) have been settled.'; - Text1100004: Label 'Receivable bill settlement %1/%2'; - Text1100005: Label 'Receivable document settlement %1'; - Text1100009: Label 'Bill Group settlement %1'; - Text1100010: Label 'Residual adjust generated by rounding Amount'; - Text1100011: Label 'Bill Group settlement %1 Customer No. %2'; - Text1100012: Label 'Receivable document settlement %1/%2'; - SourceCodeSetup: Record "Source Code Setup"; - GenJnlLine: Record "Gen. Journal Line" temporary; - CustLedgEntry: Record "Cust. Ledger Entry"; - BankAccPostingGr: Record "Bank Account Posting Group"; - BankAcc: Record "Bank Account"; - Currency: Record Currency; - GLSetup: Record "General Ledger Setup"; - GLReg: Record "G/L Register"; - VATPostingSetup: Record "VAT Posting Setup"; - DocPost: Codeunit "Document-Post"; - CarteraManagement: Codeunit CarteraManagement; - GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; - Window: Dialog; - Delay: Decimal; - SourceCode: Code[10]; - Acct: Code[20]; - DocCount: Integer; - TotalDocCount: Integer; - GroupAmount: Decimal; - GroupAmountLCY: Decimal; - GenJnlLineNextNo: Integer; - SumLCYAmt: Decimal; - TotalDisctdAmt: Decimal; - BillGrCount: Integer; - TotalBillGr: Integer; - TotalDoc: Integer; - ExistVATEntry: Boolean; - LastVATEntryNo: Integer; - FirstVATEntryNo: Integer; - IsRedrawn: Boolean; - BGPOPostBuffer: Record "BG/PO Post. Buffer" temporary; - NoRealVATBuffer: Record "BG/PO Post. Buffer" temporary; - ExistsNoRealVAT: Boolean; - - protected var - PostingDate: Date; - DueOnly: Boolean; - - [Scope('OnPrem')] - procedure DiscFactLiabs(PostedDoc2: Record "Posted Cartera Doc.") - var - Currency2: Record Currency; - DisctedAmt: Decimal; - RoundingPrec: Decimal; - begin - DisctedAmt := 0; - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - - if PostedDoc2."Currency Code" <> '' then begin - Currency2.Get(PostedDoc2."Currency Code"); - RoundingPrec := Currency2."Amount Rounding Precision"; - end else - RoundingPrec := GLSetup."Amount Rounding Precision"; - - DisctedAmt := Round(DocPost.FindDisctdAmt( - PostedDoc2."Remaining Amount", - PostedDoc2."Account No.", - PostedDoc2."Bank Account No."), RoundingPrec); - - TotalDisctdAmt := TotalDisctdAmt + DisctedAmt; - - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedBillGr."No."; - BankAcc.TestField("Bank Acc. Posting Group"); - BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"G/L Account"); - BankAccPostingGr.TestField("Liabs. for Factoring Acc."); - GenJnlLine.Validate("Account No.", BankAccPostingGr."Liabs. for Factoring Acc."); - GenJnlLine.Description := CopyStr( - StrSubstNo(Text1100011, - PostedBillGr."No.", - PostedDoc2."Account No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedBillGr."Currency Code"); - GenJnlLine.Validate(Amount, DisctedAmt); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := PostedDoc2."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := PostedDoc2."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := PostedDoc2."Dimension Set ID"; - BGPOPostBuffer."Gain - Loss Amount (LCY)" := BGPOPostBuffer."Gain - Loss Amount (LCY)" + GenJnlLine.Amount; - BGPOPostBuffer.Modify(); - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry, PostedBillGr); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - end; - - [Scope('OnPrem')] - procedure FactBankAccounting() - var - CustLedgEntry2: Record "Cust. Ledger Entry"; - begin - case true of - PostedDoc."Dealing Type" = PostedDoc."Dealing Type"::Discount: - begin - CustLedgEntry2.Get(BGPOPostBuffer."Entry No."); - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedBillGr."No."; - BankAcc.TestField("Bank Acc. Posting Group"); - BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); - GenJnlLine.Validate("Account No.", BankAcc."No."); - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedBillGr."No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedBillGr."Currency Code"); - GenJnlLine.Validate(Amount, GroupAmount - TotalDisctdAmt); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry2."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry2."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := CustLedgEntry2."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry2, PostedBillGr); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - end; - else begin - CustLedgEntry2.Get(BGPOPostBuffer."Entry No."); - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedBillGr."No."; - BankAcc.TestField("Bank Acc. Posting Group"); - BankAccPostingGr.Get(BankAcc."Bank Acc. Posting Group"); - GenJnlLine.Validate("Account Type", GenJnlLine."Account Type"::"Bank Account"); - GenJnlLine.Validate("Account No.", BankAcc."No."); - GenJnlLine.Description := CopyStr(StrSubstNo(Text1100009, PostedBillGr."No."), 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedBillGr."Currency Code"); - GenJnlLine.Validate(Amount, GroupAmount); - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry2."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry2."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := CustLedgEntry2."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry2, PostedBillGr); - GenJnlLine.Insert(); - SumLCYAmt := SumLCYAmt + GenJnlLine."Amount (LCY)"; - end; - end; - end; - - local procedure InsertGenJournalLine(AccType: Enum "Gen. Journal Account Type"; AccNo: Code[20]; Amount2: Decimal) - begin - GenJnlLineNextNo := GenJnlLineNextNo + 10000; - - Clear(GenJnlLine); - GenJnlLine.Init(); - GenJnlLine."Line No." := GenJnlLineNextNo; - GenJnlLine."Posting Date" := PostingDate; - GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment; - GenJnlLine."Document No." := PostedBillGr."No."; - GenJnlLine."Account Type" := AccType; - GenJnlLine."Account No." := AccNo; - GenJnlLine.Description := CopyStr( - StrSubstNo(Text1100012, PostedDoc."Document No.", PostedDoc."No."), - 1, MaxStrLen(GenJnlLine.Description)); - GenJnlLine.Validate("Currency Code", PostedDoc."Currency Code"); - GenJnlLine.Validate(Amount, -Amount2); - GenJnlLine."Applies-to Doc. Type" := CustLedgEntry."Document Type"; - GenJnlLine."Applies-to Doc. No." := ''; - GenJnlLine."Applies-to Bill No." := CustLedgEntry."Bill No."; - GenJnlLine."Source Code" := SourceCode; - GenJnlLine."System-Created Entry" := true; - GenJnlLine."Shortcut Dimension 1 Code" := CustLedgEntry."Global Dimension 1 Code"; - GenJnlLine."Shortcut Dimension 2 Code" := CustLedgEntry."Global Dimension 2 Code"; - GenJnlLine."Dimension Set ID" := CustLedgEntry."Dimension Set ID"; - OnBeforeGenJournalLineInsert(PostedDoc, GenJnlLine, VATPostingSetup, CustLedgEntry, CustLedgEntry, PostedBillGr); - GenJnlLine.Insert(); - end; - - [IntegrationEvent(false, false)] - local procedure OnAfterCustUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var PostedBillGroup: Record "Posted Bill Group"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeCustUnrealizedVAT2(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var PostedBillGroup: Record "Posted Bill Group"; var BgPoPostBuffer: Record "BG/PO Post. Buffer") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnBeforeGenJournalLineInsert(var PostedCarteraDoc: Record "Posted Cartera Doc."; var GenJournalLine: Record "Gen. Journal Line"; var VATPostingSetup: Record "VAT Posting Setup"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var CustLedgerEntry2: Record "Cust. Ledger Entry"; var PostedBillGroup: Record "Posted Bill Group") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnReadPostedBillGroupOnAfterGetBankAcc(BankAccount: Record "Bank Account") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnReadPostedBillGroupOnAfterSetDelay(var BankAccount: Record "Bank Account"; var Delay: Decimal; PostedBillGr: Record "Posted Bill Group") - begin - end; - - [IntegrationEvent(false, false)] - local procedure OnPostDataItemPostedDocOnBeforePostSettlement(var GenJournalLine: Record "Gen. Journal Line"; PostedBillGroup: Record "Posted Bill Group"; PostingDate: Date); - begin - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroup.Table.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroup.Table.al deleted file mode 100644 index 736f9f4db62..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroup.Table.al +++ /dev/null @@ -1,514 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Bank.DirectDebit; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; -using Microsoft.Foundation.Enums; -using Microsoft.Foundation.NoSeries; -using Microsoft.Sales.History; - -table 7000005 "Bill Group" -{ - Caption = 'Bill Group'; - DrillDownPageID = "Bill Groups List"; - LookupPageID = "Bill Groups List"; - DataClassification = CustomerContent; - - fields - { - field(2; "No."; Code[20]) - { - Caption = 'No.'; - - trigger OnValidate() - var - NoSeries: Codeunit "No. Series"; - begin - if "No." = xRec."No." then - exit; - - CheckPrinted(); - ResetPrinted(); - - CarteraSetup.Get(); - NoSeries.TestManual(CarteraSetup."Bill Group Nos."); - "No. Series" := ''; - - UpdateDescription(); - CheckNoNotUsed(); - end; - } - field(3; "Bank Account No."; Code[20]) - { - Caption = 'Bank Account No.'; - TableRelation = "Bank Account"; - - trigger OnValidate() - begin - CalcFields("Bank Account Name"); - - if "Bank Account No." = '' then - exit; - - BankAcc.Get("Bank Account No."); - BankAcc.TestField(Blocked, false); - - if BillGrIsEmpty() then begin - Validate("Currency Code", BankAcc."Currency Code"); - exit; - end; - - BankAcc.TestField("Currency Code", "Currency Code"); - - CalcFields(Amount); - if (Amount <> 0) and (Factoring = Factoring::" ") then - CarteraManagement.CheckDiscCreditLimit(Rec); - - if "Bank Account No." <> xRec."Bank Account No." then begin - CheckPrinted(); - ResetPrinted(); - end; - end; - } - field(4; "Bank Account Name"; Text[100]) - { - CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); - Caption = 'Bank Account Name'; - Editable = false; - FieldClass = FlowField; - } - field(5; "Posting Description"; Text[100]) - { - Caption = 'Posting Description'; - } - field(6; "Dealing Type"; Enum "Cartera Dealing Type") - { - Caption = 'Dealing Type'; - - trigger OnValidate() - begin - Validate("Currency Code"); - - CalcFields(Amount); - if (Factoring = Factoring::" ") and (Amount <> 0) then - CarteraManagement.CheckDiscCreditLimit(Rec); - - if "Dealing Type" <> xRec."Dealing Type" then begin - CheckPrinted(); - ResetPrinted(); - end; - end; - } - field(7; Amount; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Cartera Doc."."Remaining Amount" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Receivable))); - Caption = 'Amount'; - Editable = false; - FieldClass = FlowField; - } - field(8; "Reason Code"; Code[10]) - { - Caption = 'Reason Code'; - TableRelation = "Reason Code"; - } - field(9; "No. Printed"; Integer) - { - Caption = 'No. Printed'; - } - field(10; "Posting Date"; Date) - { - Caption = 'Posting Date'; - - trigger OnValidate() - begin - if "Posting Date" <> xRec."Posting Date" then begin - CheckPrinted(); - ResetPrinted(); - end; - end; - } - field(11; Comment; Boolean) - { - CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), - Type = filter(Receivable))); - Caption = 'Comment'; - Editable = false; - FieldClass = FlowField; - } - field(12; "Category Filter"; Code[10]) - { - Caption = 'Category Filter'; - FieldClass = FlowFilter; - TableRelation = "Category Code"; - ValidateTableRelation = false; - } - field(13; "Due Date Filter"; Date) - { - Caption = 'Due Date Filter'; - FieldClass = FlowFilter; - } - field(14; "Global Dimension 1 Filter"; Code[20]) - { - CaptionClass = '1,3,1'; - Caption = 'Global Dimension 1 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(15; "Global Dimension 2 Filter"; Code[20]) - { - CaptionClass = '1,3,2'; - Caption = 'Global Dimension 2 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(16; "No. Series"; Code[20]) - { - Caption = 'No. Series'; - Editable = false; - TableRelation = "No. Series"; - } - field(33; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - - trigger OnLookup() - begin - Currency.Reset(); - - if Currency.Get("Currency Code") then; - Currencies.SetRecord(Currency); - Currencies.LookupMode(true); - if ACTION::LookupOK = Currencies.RunModal() then begin - Currencies.GetRecord(Currency); - Clear(Currencies); - Validate("Currency Code", Currency.Code); - end else - Clear(Currencies); - end; - - trigger OnValidate() - begin - if BankAcc.Get("Bank Account No.") and ("Currency Code" <> BankAcc."Currency Code") - then - TestField("Currency Code", BankAcc."Currency Code"); - - if ("Currency Code" <> xRec."Currency Code") and not BillGrIsEmpty() then - FieldError("Currency Code", - StrSubstNo(Text1100003, TableCaption)); - - if "Currency Code" <> '' then begin - Currency.Reset(); - if "Dealing Type" = "Dealing Type"::Discount then - Currency.SetRange("Bill Groups - Discount", true) - else - Currency.SetRange("Bill Groups - Collection", true); - Currency.Code := "Currency Code"; - if not Currency.Find() then - Error( - Text1100004, - "Currency Code"); - end; - - if "Currency Code" <> xRec."Currency Code" then begin - CheckPrinted(); - ResetPrinted(); - end; - end; - } - field(34; "Amount (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Cartera Doc."."Remaining Amt. (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - "Category Code" = field("Category Filter"), - "Due Date" = field("Due Date Filter"), - Type = const(Receivable))); - Caption = 'Amount (LCY)'; - Editable = false; - FieldClass = FlowField; - } - field(39; Factoring; Option) - { - Caption = 'Factoring'; - OptionCaption = ' ,Unrisked,Risked'; - OptionMembers = " ",Unrisked,Risked; - - trigger OnValidate() - begin - Doc.Reset(); - Doc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place, "Document Type"); - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); - if Factoring = Factoring::" " then begin - Doc.SetFilter("Document Type", '<>%1', Doc."Document Type"::Bill); - if Doc.FindFirst() then - Error(Text1100005); - end else begin - Doc.SetFilter("Document Type", '%1', Doc."Document Type"::Bill); - if Doc.FindFirst() then - Error(Text1100006); - end; - end; - } - field(1200; "Partner Type"; Enum "Partner Type") - { - Caption = 'Partner Type'; - } - } - - keys - { - key(Key1; "No.") - { - Clustered = true; - } - key(Key2; "Bank Account No.") - { - } - } - - fieldgroups - { - } - - trigger OnDelete() - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No."); - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); - if Doc.FindFirst() then - Error(Text1100002); - - BGPOCommentLine.SetRange("BG/PO No.", "No."); - BGPOCommentLine.DeleteAll(); - end; - - trigger OnInsert() - var - NoSeries: Codeunit "No. Series"; - begin - if "No." = '' then begin - CarteraSetup.Get(); - CarteraSetup.TestField("Bill Group Nos."); - "No. Series" := CarteraSetup."Bill Group Nos."; - if NoSeries.AreRelated("No. Series", xRec."No. Series") then - "No. Series" := xRec."No. Series"; - "No." := NoSeries.GetNextNo("No. Series"); - end; - - if GetFilter("Bank Account No.") <> '' then - if GetRangeMin("Bank Account No.") = GetRangeMax("Bank Account No.") then begin - Option := StrMenu(Text1100000); - case Option of - 0: - Error(Text1100001, TableCaption); - 1: - "Dealing Type" := "Dealing Type"::Collection; - 2: - "Dealing Type" := "Dealing Type"::Discount; - end; - BankAcc.Get(GetRangeMin("Bank Account No.")); - Validate("Currency Code", BankAcc."Currency Code"); - Validate("Bank Account No.", BankAcc."No."); - end; - - CheckNoNotUsed(); - UpdateDescription(); - "Posting Date" := WorkDate(); - end; - - var - Text1100000: Label '&Collection,&Discount'; - Text1100001: Label 'The creation of a new %1 was cancelled by the user'; - Text1100002: Label 'This Bill Group is not empty. Remove all its bills and try again.'; - Text1100003: Label 'can only be changed when the %1 is empty'; - Text1100004: Label 'The operation is not allowed for bill groups using %1. Check your currency setup.'; - Text1100005: Label 'Invoices should be removed.'; - Text1100006: Label 'Bills should be removed.'; - Text1100007: Label 'This bill group has already been printed. Proceed anyway?'; - Text1100008: Label 'The update has been interrupted by the user.'; - Text1100009: Label 'Bill Group'; - Text1100010: Label ' is currently in use in a Posted Bill Group.'; - Text1100011: Label ' is currently in use in a Closed Bill Group.'; - Text1100012: Label 'untitled'; - BillGr: Record "Bill Group"; - PostedBillGr: Record "Posted Bill Group"; - ClosedBillGr: Record "Closed Bill Group"; - Doc: Record "Cartera Doc."; - CarteraSetup: Record "Cartera Setup"; - Currency: Record Currency; - BankAcc: Record "Bank Account"; - BGPOCommentLine: Record "BG/PO Comment Line"; - Currencies: Page Currencies; - CarteraManagement: Codeunit CarteraManagement; - Option: Integer; - SilentDirectDebitFormat: Option " ",Standard,N58; - DirectDebitOptionTxt: Label 'Direct Debit'; - InvoiceDiscountingOptionTxt: Label 'Invoice Discounting'; - InstructionTxt: Label 'Select which format to use.'; - DirectDebitFormatSilentlySelected: Boolean; - - [Scope('OnPrem')] - procedure AssistEdit(OldBillGr: Record "Bill Group"): Boolean - var - NoSeries: Codeunit "No. Series"; - begin - BillGr := Rec; - CarteraSetup.Get(); - CarteraSetup.TestField("Bill Group Nos."); - if NoSeries.LookupRelatedNoSeries(CarteraSetup."Bill Group Nos.", OldBillGr."No. Series", BillGr."No. Series") then begin - BillGr."No." := NoSeries.GetNextNo(BillGr."No. Series"); - Rec := BillGr; - exit(true); - end; - end; - - local procedure CheckPrinted() - begin - if "No. Printed" <> 0 then - if not Confirm(Text1100007) then - Error(Text1100008); - end; - - [Scope('OnPrem')] - procedure ResetPrinted() - begin - "No. Printed" := 0; - end; - - local procedure UpdateDescription() - begin - "Posting Description" := Text1100009 + ' ' + "No."; - end; - - local procedure CheckNoNotUsed() - begin - if PostedBillGr.Get("No.") then - FieldError("No.", PostedBillGr."No." + Text1100010); - if ClosedBillGr.Get("No.") then - FieldError("No.", ClosedBillGr."No." + Text1100011); - end; - - [Scope('OnPrem')] - procedure PrintRecords(ShowRequestForm: Boolean) - var - CarteraReportSelection: Record "Cartera Report Selections"; - begin - BillGr.Copy(Rec); - CarteraReportSelection.SetRange(Usage, CarteraReportSelection.Usage::"Bill Group"); - CarteraReportSelection.SetFilter("Report ID", '<>0'); - CarteraReportSelection.Find('-'); - repeat - REPORT.RunModal(CarteraReportSelection."Report ID", ShowRequestForm, false, BillGr); - until CarteraReportSelection.Next() = 0; - end; - - local procedure BillGrIsEmpty(): Boolean - begin - Doc.SetCurrentKey(Type, "Bill Gr./Pmt. Order No."); - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); - exit(not Doc.FindFirst()) - end; - - procedure Caption(): Text - begin - if "No." = '' then - exit(Text1100012); - CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); - end; - - [Scope('OnPrem')] - procedure ExportToFile() - var - DirectDebitCollection: Record "Direct Debit Collection"; - DirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; - BankAccount: Record "Bank Account"; - begin - DirectDebitCollection.CreateRecord("No.", "Bank Account No.", "Partner Type"); - DirectDebitCollection."Source Table ID" := DATABASE::"Bill Group"; - DirectDebitCollection.Modify(); - CheckSEPADirectDebitFormat(DirectDebitCollection); - BankAccount.Get("Bank Account No."); - Commit(); - DirectDebitCollectionEntry.SetRange("Direct Debit Collection No.", DirectDebitCollection."No."); - RunFileExportCodeunit(BankAccount.GetDDExportCodeunitID(), DirectDebitCollection."No.", DirectDebitCollectionEntry); - DeleteDirectDebitCollection(DirectDebitCollection."No."); - end; - - [Scope('OnPrem')] - procedure RunFileExportCodeunit(CodeunitID: Integer; DirectDebitCollectionNo: Integer; var DirectDebitCollectionEntry: Record "Direct Debit Collection Entry") - var - LastError: Text; - begin - if not CODEUNIT.Run(CodeunitID, DirectDebitCollectionEntry) then begin - LastError := GetLastErrorText; - DeleteDirectDebitCollection(DirectDebitCollectionNo); - Commit(); - Error(LastError); - end; - end; - - [Scope('OnPrem')] - procedure DeleteDirectDebitCollection(DirectDebitCollectionNo: Integer) - var - DirectDebitCollection: Record "Direct Debit Collection"; - begin - if DirectDebitCollection.Get(DirectDebitCollectionNo) then - DirectDebitCollection.Delete(true); - end; - - [Scope('OnPrem')] - procedure SelectDirectDebitFormatSilently(NewDirectDebitFormat: Option) - begin - SilentDirectDebitFormat := NewDirectDebitFormat; - DirectDebitFormatSilentlySelected := true; - end; - - local procedure CheckSEPADirectDebitFormat(var DirectDebitCollection: Record "Direct Debit Collection") - var - BankAccount: Record "Bank Account"; - DirectDebitFormat: Option; - Selection: Integer; - begin - BankAccount.Get("Bank Account No."); - if BankAccount.GetDDExportCodeunitID() = CODEUNIT::"SEPA DD-Export File" then begin - if not DirectDebitFormatSilentlySelected then begin - Selection := StrMenu(StrSubstNo('%1,%2', DirectDebitOptionTxt, InvoiceDiscountingOptionTxt), 1, InstructionTxt); - - if Selection = 0 then - exit; - - case Selection of - 1: - DirectDebitFormat := DirectDebitCollection."Direct Debit Format"::Standard; - 2: - DirectDebitFormat := DirectDebitCollection."Direct Debit Format"::N58; - end; - end else - DirectDebitFormat := SilentDirectDebitFormat; - - DirectDebitCollection."Direct Debit Format" := DirectDebitFormat; - DirectDebitCollection.Modify(); - end; - end; -} diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupListing.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupListing.Report.al deleted file mode 100644 index 41cb0d12bc9..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupListing.Report.al +++ /dev/null @@ -1,434 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Foundation.Company; -using Microsoft.Sales.Customer; -using System.Utilities; - -report 7000000 "Bill Group Listing" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Sales/Receivables/BillGroupListing.rdlc'; - ApplicationArea = Basic, Suite; - Caption = 'Bill Group Listing'; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem(BillGr; "Bill Group") - { - DataItemTableView = sorting("No."); - PrintOnlyIfDetail = true; - RequestFilterFields = "No."; - column(BillGr_No_; "No.") - { - } - dataitem(CopyLoop; "Integer") - { - DataItemTableView = sorting(Number); - dataitem(PageLoop; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(BillGr__No__; BillGr."No.") - { - } - column(STRSUBSTNO_Text1100003_CopyText_; StrSubstNo(Text1100003, CopyText)) - { - } - column(CompanyAddr_1_; CompanyAddr[1]) - { - } - column(CompanyAddr_2_; CompanyAddr[2]) - { - } - column(CompanyAddr_3_; CompanyAddr[3]) - { - } - column(CompanyAddr_4_; CompanyAddr[4]) - { - } - column(CompanyAddr_5_; CompanyAddr[5]) - { - } - column(CompanyAddr_6_; CompanyAddr[6]) - { - } - column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.") - { - } - column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.") - { - } - column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.") - { - } - column(BillGr__Posting_Date_; Format(BillGr."Posting Date")) - { - } - column(BankAccAddr_4_; BankAccAddr[4]) - { - } - column(BankAccAddr_5_; BankAccAddr[5]) - { - } - column(BankAccAddr_6_; BankAccAddr[6]) - { - } - column(BankAccAddr_7_; BankAccAddr[7]) - { - } - column(BankAccAddr_3_; BankAccAddr[3]) - { - } - column(BankAccAddr_2_; BankAccAddr[2]) - { - } - column(BankAccAddr_1_; BankAccAddr[1]) - { - } - column(BillGr__Currency_Code_; BillGr."Currency Code") - { - } - column(Operation; Operation) - { - } - column(FactoringType; FactoringType) - { - } - column(OutputNo; OutputNo) - { - } - column(PrintAmountsInLCY; PrintAmountsInLCY) - { - } - column(PageLoop_Number; Number) - { - } - column(BillGr__No__Caption; BillGr__No__CaptionLbl) - { - } - column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl) - { - } - column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl) - { - } - column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl) - { - } - column(BillGr__Posting_Date_Caption; BillGr__Posting_Date_CaptionLbl) - { - } - column(BillGr__Currency_Code_Caption; BillGr__Currency_Code_CaptionLbl) - { - } - column(PageCaption; PageCaptionLbl) - { - } - dataitem("Cartera Doc."; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = BillGr; - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Receivable)); - column(BillGrAmount; BillGrAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(BillGrAmount_Control23; BillGrAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Cust_City; Cust.City) - { - } - column(Cust_County; Cust.County) - { - } - column(Cust__Post_Code_; Cust."Post Code") - { - } - column(Cust_Name; Cust.Name) - { - } - column(Cartera_Doc___Account_No__; "Account No.") - { - } - column(Cartera_Doc___Document_No__; "Document No.") - { - } - column(Cartera_Doc___Due_Date_; Format("Due Date")) - { - } - column(Cartera_Doc___Document_Type_; "Document Type") - { - } - column(Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill; "Document Type" <> "Document Type"::Bill) - { - } - column(Cust_Name_Control28; Cust.Name) - { - } - column(Cust_City_Control30; Cust.City) - { - } - column(BillGrAmount_Control31; BillGrAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Cust_County_Control35; Cust.County) - { - } - column(Cartera_Doc___Document_No___Control3; "Document No.") - { - } - column(Cartera_Doc___No__; "No.") - { - } - column(Cust__Post_Code__Control9; Cust."Post Code") - { - } - column(Cartera_Doc___Due_Date__Control8; Format("Due Date")) - { - } - column(Cartera_Doc___Account_No___Control1; "Account No.") - { - } - column(Cartera_Doc___Document_Type__Control66; "Document Type") - { - } - column(Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill; "Document Type" = "Document Type"::Bill) - { - } - column(BillGrAmount_Control36; BillGrAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(BillGrAmount_Control39; BillGrAmount) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(Cartera_Doc__Type; Type) - { - } - column(Cartera_Doc__Entry_No_; "Entry No.") - { - } - column(Cartera_Doc__Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") - { - } - column(All_amounts_are_in_LCYCaption; All_amounts_are_in_LCYCaptionLbl) - { - } - column(Cartera_Doc___Account_No___Control1Caption; Cartera_Doc___Account_No___Control1CaptionLbl) - { - } - column(Cust_Name_Control28Caption; Cust_Name_Control28CaptionLbl) - { - } - column(Cust__Post_Code__Control9Caption; Cust__Post_Code__Control9CaptionLbl) - { - } - column(Cust_City_Control30Caption; Cust_City_Control30CaptionLbl) - { - } - column(BillGrAmount_Control31Caption; BillGrAmount_Control31CaptionLbl) - { - } - column(Cust_County_Control35Caption; Cust_County_Control35CaptionLbl) - { - } - column(Cartera_Doc___Due_Date__Control8Caption; Cartera_Doc___Due_Date__Control8CaptionLbl) - { - } - column(Bill_No_Caption; Bill_No_CaptionLbl) - { - } - column(Document_No_Caption; Document_No_CaptionLbl) - { - } - column(Cartera_Doc___Document_Type__Control66Caption; FieldCaption("Document Type")) - { - } - column(ContinuedCaption; ContinuedCaptionLbl) - { - } - column(EmptyStringCaption; EmptyStringCaptionLbl) - { - } - column(ContinuedCaption_Control15; ContinuedCaption_Control15Lbl) - { - } - column(TotalCaption; TotalCaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - Cust.Get("Account No."); - - if PrintAmountsInLCY then - BillGrAmount := "Remaining Amt. (LCY)" - else - BillGrAmount := "Remaining Amount"; - end; - - trigger OnPreDataItem() - begin - Clear(BillGrAmount); - end; - } - } - - trigger OnAfterGetRecord() - begin - if Number > 1 then - CopyText := Text1100002; - OutputNo := OutputNo + 1; - end; - - trigger OnPreDataItem() - begin - NoOfLoops := Abs(NoOfCopies) + 1; - CopyText := ''; - SetRange(Number, 1, NoOfLoops); - OutputNo := 1; - end; - } - - trigger OnAfterGetRecord() - begin - if "Dealing Type" = "Dealing Type"::Discount then - Operation := Text1100000 - else - Operation := Text1100001; - FactoringType := GetFactoringType(); - - BankAcc.Get(BillGr."Bank Account No."); - FormatAddress.FormatAddr( - BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", - BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); - - if not CurrReport.Preview then - PrintCounter.PrintCounter(DATABASE::"Bill Group", "No."); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - FormatAddress.Company(CompanyAddr, CompanyInfo); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(NoOfCopies; NoOfCopies) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Copies'; - ToolTip = 'Specifies how many copies of the document to print.'; - } - field(PrintAmountsInLCY; PrintAmountsInLCY) - { - ApplicationArea = Basic, Suite; - Caption = 'Show Amounts in LCY'; - ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - var - Text1100000: Label 'For Discount'; - Text1100001: Label 'For Collection'; - Text1100002: Label 'COPY'; - Text1100003: Label 'Bill Group %1'; - Text1100005: Label 'Risked Factoring'; - Text1100006: Label 'Unrisked Factoring'; - CompanyInfo: Record "Company Information"; - BankAcc: Record "Bank Account"; - Cust: Record Customer; - FormatAddress: Codeunit "Format Address"; - PrintCounter: Codeunit "BG/PO-Post and Print"; - BankAccAddr: array[8] of Text[100]; - CompanyAddr: array[8] of Text[100]; - Operation: Text[80]; - NoOfLoops: Integer; - NoOfCopies: Integer; - CopyText: Text[30]; - PrintAmountsInLCY: Boolean; - BillGrAmount: Decimal; - FactoringType: Text[30]; - OutputNo: Integer; - BillGr__No__CaptionLbl: Label 'Bill Group No.'; - CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.'; - CompanyInfo__Fax_No__CaptionLbl: Label 'Fax No.'; - CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Reg. No.'; - BillGr__Posting_Date_CaptionLbl: Label 'Date'; - BillGr__Currency_Code_CaptionLbl: Label 'Currency Code'; - PageCaptionLbl: Label 'Page'; - All_amounts_are_in_LCYCaptionLbl: Label 'All amounts are in LCY'; - Cartera_Doc___Account_No___Control1CaptionLbl: Label 'Customer No.'; - Cust_Name_Control28CaptionLbl: Label 'Name'; - Cust__Post_Code__Control9CaptionLbl: Label 'Post Code'; - Cust_City_Control30CaptionLbl: Label 'City /'; - BillGrAmount_Control31CaptionLbl: Label 'Remaining Amount'; - Cust_County_Control35CaptionLbl: Label 'County'; - Cartera_Doc___Due_Date__Control8CaptionLbl: Label 'Due Date'; - Bill_No_CaptionLbl: Label 'Bill No.'; - Document_No_CaptionLbl: Label 'Document No.'; - ContinuedCaptionLbl: Label 'Continued'; - EmptyStringCaptionLbl: Label '/', Locked = true; - ContinuedCaption_Control15Lbl: Label 'Continued'; - TotalCaptionLbl: Label 'Total'; - - [Scope('OnPrem')] - procedure GetCurrencyCode(): Code[10] - begin - if PrintAmountsInLCY then - exit(''); - - exit("Cartera Doc."."Currency Code"); - end; - - [Scope('OnPrem')] - procedure GetFactoringType(): Text[30] - begin - if BillGr.Factoring <> BillGr.Factoring::" " then begin - if BillGr.Factoring = BillGr.Factoring::Risked then - exit(Text1100005); - - exit(Text1100006); - end; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupListing.rdlc b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupListing.rdlc deleted file mode 100644 index 46f714f4bfb..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupListing.rdlc +++ /dev/null @@ -1,2306 +0,0 @@ - - - 0 - - - - SQL - - - None - bd53c71a-0fd0-4847-8d06-a3ee23d671d9 - - - - - - - - - - - 17.95cm - - - - - 12.267cm - - - - - - - - - - 1.8cm - - - 1.4cm - - - 1.7cm - - - 0.9cm - - - 2cm - - - 3.5cm - - - 1.65cm - - - 2.8cm - - - 2.2cm - - - - - 0.423cm - - - - - true - - - - - =First(Fields!All_amounts_are_in_LCYCaption.Value) - - - - - - All_amounts_are_in_LCYCaption - 38 - - - 6 - - - - - - - - - - - true - - - - - - - - - - - textbox37 - 37 - - - 3 - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!Cartera_Doc___Due_Date__Control8Caption.Value) - - - - - - - 36 - - - - - - - - true - - - - - =First(Fields!Cartera_Doc___Document_Type__Control66Caption.Value) - - - - - - 35 - - - - - - - - true - - - - - =First(Fields!Document_No_Caption.Value) - - - - - - - 34 - - - - - - - - true - - - - - =First(Fields!Bill_No_Caption.Value) - - - - - - - 33 - - - - - - - - true - - - - - =First(Fields!Cartera_Doc___Account_No___Control1Caption.Value) - - - - - - - 32 - - - - - - - - true - - - - - =First(Fields!Cust_Name_Control28Caption.Value) - - - - - - 31 - - - - - - - - true - - - - - =First(Fields!Cust__Post_Code__Control9Caption.Value) - - - - - - 30 - - - - - - - - true - - - - - =First(Fields!Cust_City_Control30Caption.Value)+ Chr(10) + First(Fields!Cust_County_Control35Caption.Value) - - - - - - 29 - - =iif(Fields!Cust_City_Control30Caption.Value="",true,false) - - NoOutput - - - - - - - - true - - - - - =First(Fields!BillGrAmount_Control31Caption.Value) - - - - - - - 28 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - - textbox6 - 27 - - - 9 - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!Cartera_Doc___Due_Date_.Value - - - - - - - 26 - - - - - - - - true - - - - - =Fields!Cartera_Doc___Document_Type_.Value - - - - - - 25 - - - - - - - - true - - - - - =Fields!Cartera_Doc___Document_No__.Value - - - - - - - 24 - - - - - - - - true - - - - - - - - - - - textbox35 - 23 - - - - - - - - true - - - - - =Fields!Cartera_Doc___Account_No__.Value - - - - - - - 22 - - - - - - - - true - - - - - =Fields!Cust_Name.Value - - - - - - 21 - - - - - - - - true - - - - - =Fields!Cust__Post_Code_.Value - - - - - - - 20 - - - - - - - - true - - - - - =Fields!Cust_City.Value - - - - - - 19 - - - - - - - - true - true - - - - - =Fields!BillGrAmount.Value - - - - - - 18 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - 17 - - - 7 - - - - - - - - - - - - true - - - - - =Fields!Cust_County.Value - - - - - - 16 - - - - - - - - true - - - - - - - - - - - 15 - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!Cartera_Doc___Due_Date_.Value - - - - - - - 14 - - - - - - - - true - - - - - =Fields!Cartera_Doc___Document_Type_.Value - - - - - - 13 - - - - - - - - true - - - - - =Fields!Cartera_Doc___Document_No__.Value - - - - - - - 12 - - - - - - - - true - - - - - =Fields!EmptyStringCaption.Value + " " + Fields!Cartera_Doc___No__.Value - - - - - - - 11 - - - - - - - - true - - - - - =Fields!Cartera_Doc___Account_No__.Value - - - - - - - 10 - - - - - - - - true - - - - - =Fields!Cust_Name.Value - - - - - - 9 - - - - - - - - true - - - - - =Fields!Cust__Post_Code_.Value - - - - - - - 8 - - - - - - - - true - - - - - =Fields!Cust_City.Value - - - - - - 7 - - - - - - - - true - true - - - - - =Fields!BillGrAmount.Value - - - - - - 6 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - 2 - - - 7 - - - - - - - - - - - - true - - - - - =Fields!Cust_County.Value - - - - - - 1 - - - - - - - - true - - - - - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - textbox2 - - - 9 - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =First(Fields!TotalCaption.Value) - - - - - - TotalCaption - 5 - - - 4 - - - - - - - - - true - - - - - - - - - - - textbox9 - 4 - - - 4 - - - - - - - - - true - true - - - - - =Sum(Fields!BillGrAmount.Value) - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - =IIF(Fields!PrintAmountsInLCY.Value,False,True) - - After - true - true - - - After - true - true - - - After - true - true - - - - Detail - - - - - =IIF(Fields!Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill.Value,FALSE,TRUE) - - - - - =IIF(Fields!Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill.Value,FALSE,TRUE) - - - - - =IIF(Fields!Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill.Value,FALSE,TRUE) - - - - - =IIF(Fields!Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill.Value,FALSE,TRUE) - - - - Detail_Collection - Output - true - - - Before - true - - - Before - true - - - - DataSet_Result - 8.037cm - 29 - - - true - - - - - =First(Fields!BankAccAddr_1_.Value) - - - - - - 1.269cm - 0.423cm - 4.5cm - 28 - - - - true - - - - - =Fields!BillGr__No__.Value - - - - - - 5.499cm - 14.6cm - 0.423cm - 2.7cm - 27 - - - - true - - - - - =First(Fields!CompanyAddr_1_.Value) - - - - - - 1.269cm - 11.4cm - 0.423cm - 6.3cm - 26 - - - - true - - - - - =First(Fields!CompanyAddr_2_.Value) - - - - - - 1.692cm - 11.4cm - 0.423cm - 6.3cm - 25 - - - - true - - - - - =First(Fields!CompanyAddr_3_.Value) - - - - - - 2.115cm - 11.4cm - 0.423cm - 6.3cm - 24 - - - - true - - - - - =First(Fields!CompanyAddr_4_.Value) - - - - - - 2.538cm - 11.4cm - 0.423cm - 6.3cm - 23 - - - - true - - - - - =First(Fields!CompanyAddr_5_.Value) - - - - - - 2.961cm - 11.4cm - 0.423cm - 6.3cm - 22 - - - - true - - - - - =First(Fields!CompanyAddr_6_.Value) - - - - - - 3.384cm - 11.4cm - 0.423cm - 6.3cm - 21 - - - - true - - - - - =First(Fields!CompanyInfo__Phone_No__.Value) - - - - - - 3.807cm - 13.5cm - 0.423cm - 4.2cm - 20 - - - - true - - - - - =First(Fields!CompanyInfo__Fax_No__.Value) - - - - - - 4.23cm - 13.5cm - 0.423cm - 4.2cm - 19 - - - - true - - - - - =First(Fields!CompanyInfo__VAT_Registration_No__.Value) - - - - - - 4.653cm - 13.5cm - 0.423cm - 4.2cm - 18 - - - - true - - - - - =First(Fields!BillGr__Posting_Date_.Value) - - - - - - - 7.191cm - 14.6cm - 0.423cm - 2.99048cm - 17 - - - - true - - - - - =First(Fields!BankAccAddr_4_.Value) - - - - - - 2.538cm - 0.423cm - 4.5cm - 16 - - - - true - - - - - =First(Fields!BankAccAddr_5_.Value) - - - - - - 2.961cm - 0.423cm - 4.5cm - 15 - - - - true - - - - - =First(Fields!BankAccAddr_6_.Value) - - - - - - 3.384cm - 0.423cm - 4.5cm - 14 - - - - true - - - - - =First(Fields!BankAccAddr_7_.Value) - - - - - - 3.807cm - 0.423cm - 4.5cm - 13 - - - - true - - - - - =First(Fields!BankAccAddr_3_.Value) - - - - - - 2.115cm - 0.423cm - 4.5cm - 12 - - - - true - - - - - =First(Fields!BankAccAddr_2_.Value) - - - - - - 1.692cm - 0.423cm - 4.5cm - 11 - - - - true - - - - - =First(Fields!BillGr__Currency_Code_.Value) - - - - - - 5.922cm - 14.6cm - 0.423cm - 2.7cm - 10 - - - - true - - - - - =First(Fields!Operation.Value) - - - - - - 6.345cm - 11.4cm - 0.423cm - 6.3cm - 9 - - - - true - - - - - =First(Fields!FactoringType.Value) - - - - - - 6.768cm - 11.4cm - 0.423cm - 6.3cm - 8 - - - - true - - - - - =First(Fields!BillGr__No__Caption.Value) - - - - - - 5.499cm - 11.4cm - 0.423cm - 3cm - 7 - - - - true - - - - - =First(Fields!CompanyInfo__Phone_No__Caption.Value) - - - - - - 3.807cm - 11.4cm - 0.423cm - 1.89cm - 6 - - - - true - - - - - =First(Fields!CompanyInfo__Fax_No__Caption.Value) - - - - - - 4.23cm - 11.4cm - 0.423cm - 1.89cm - 5 - - - - true - - - - - =First(Fields!CompanyInfo__VAT_Registration_No__Caption.Value) - - - - - - 4.653cm - 11.4cm - 0.423cm - 1.89cm - 4 - - - - true - - - - - =First(Fields!BillGr__Posting_Date_Caption.Value) - - - - - - 7.191cm - 11.4cm - 0.423cm - 2.96587cm - 3 - - - - true - - - - - =First(Fields!BillGr__Currency_Code_Caption.Value) - - - - - - 5.922cm - 11.4cm - 0.423cm - 3cm - 2 - - - - true - - - - - =First(Fields!STRSUBSTNO_Text1100003_CopyText_.Value) - - - - - - 11.4cm - 0.423cm - 6.3cm - 1 - - - - true - - - - - - - - - - - - - - - - - - =Fields!BillGr__No__.Value - =Fields!OutputNo.Value - - - Between - - - Output - true - - - - DataSet_Result - - End - - - - 12.267cm - - 17.95cm - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - -Shared offset as Integer -Shared newPage as Object -Shared currentgroup1 as Object -Shared currentgroup2 as Object -Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object - If NewPage - offset = pagenumber - 1 - End If - Return pagenumber - offset -End Function - -Public Function IsNewPage(group1 as Object, group2 as Object) As Boolean -newPage = FALSE -If Not (group1 = currentgroup1) - newPage = TRUE - currentgroup1 = group1 - currentgroup2 = group2 - ELSE - If Not (group2 = currentgroup2) - newPage = TRUE - currentgroup2 = group2 - End If - End If - Return newPage -End Function - - =User!Language - true - Invalid - 59a9809d-9719-4f60-98f9-91748dcfbe4c - - - - - BillGr_No_ - - - BillGr__No__ - - - STRSUBSTNO_Text1100003_CopyText_ - - - CompanyAddr_1_ - - - CompanyAddr_2_ - - - CompanyAddr_3_ - - - CompanyAddr_4_ - - - CompanyAddr_5_ - - - CompanyAddr_6_ - - - CompanyInfo__Phone_No__ - - - CompanyInfo__Fax_No__ - - - CompanyInfo__VAT_Registration_No__ - - - BillGr__Posting_Date_ - - - BankAccAddr_4_ - - - BankAccAddr_5_ - - - BankAccAddr_6_ - - - BankAccAddr_7_ - - - BankAccAddr_3_ - - - BankAccAddr_2_ - - - BankAccAddr_1_ - - - BillGr__Currency_Code_ - - - Operation - - - FactoringType - - - OutputNo - - - PrintAmountsInLCY - - - PageLoop_Number - - - BillGr__No__Caption - - - CompanyInfo__Phone_No__Caption - - - CompanyInfo__Fax_No__Caption - - - CompanyInfo__VAT_Registration_No__Caption - - - BillGr__Posting_Date_Caption - - - BillGr__Currency_Code_Caption - - - PageCaption - - - BillGrAmount - - - BillGrAmountFormat - - - BillGrAmount_Control23 - - - BillGrAmount_Control23Format - - - Cust_City - - - Cust_County - - - Cust__Post_Code_ - - - Cust_Name - - - Cartera_Doc___Account_No__ - - - Cartera_Doc___Document_No__ - - - Cartera_Doc___Due_Date_ - - - Cartera_Doc___Document_Type_ - - - Cartera_Doc____Document_Type______Cartera_Doc____Document_Type___Bill - - - Cust_Name_Control28 - - - Cust_City_Control30 - - - BillGrAmount_Control31 - - - BillGrAmount_Control31Format - - - Cust_County_Control35 - - - Cartera_Doc___Document_No___Control3 - - - Cartera_Doc___No__ - - - Cust__Post_Code__Control9 - - - Cartera_Doc___Due_Date__Control8 - - - Cartera_Doc___Account_No___Control1 - - - Cartera_Doc___Document_Type__Control66 - - - Cartera_Doc____Document_Type_____Cartera_Doc____Document_Type___Bill - - - BillGrAmount_Control36 - - - BillGrAmount_Control36Format - - - BillGrAmount_Control39 - - - BillGrAmount_Control39Format - - - Cartera_Doc__Type - - - Cartera_Doc__Entry_No_ - - - Cartera_Doc__Bill_Gr__Pmt__Order_No_ - - - All_amounts_are_in_LCYCaption - - - Cartera_Doc___Account_No___Control1Caption - - - Cust_Name_Control28Caption - - - Cust__Post_Code__Control9Caption - - - Cust_City_Control30Caption - - - BillGrAmount_Control31Caption - - - Cust_County_Control35Caption - - - Cartera_Doc___Due_Date__Control8Caption - - - Bill_No_Caption - - - Document_No_Caption - - - Cartera_Doc___Document_Type__Control66Caption - - - ContinuedCaption - - - EmptyStringCaption - - - ContinuedCaption_Control15 - - - TotalCaption - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupTest.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupTest.Report.al deleted file mode 100644 index c3fc6f30157..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupTest.Report.al +++ /dev/null @@ -1,1088 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Sales.Customer; -using System.Utilities; - -report 7000008 "Bill Group - Test" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Sales/Receivables/BillGroupTest.rdlc'; - Caption = 'Bill Group - Test'; - - dataset - { - dataitem(BillGr; "Bill Group") - { - RequestFilterFields = "No."; - column(BillGr_No_; "No.") - { - } - column(BillGr_Bank_Account_No_; "Bank Account No.") - { - } - column(BillGr_Currency_Code; "Currency Code") - { - } - dataitem(PageCounter; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(USERID; UserId) - { - } - column(FORMAT_TODAY_0_4_; Format(Today, 0, 4)) - { - } - column(COMPANYNAME; COMPANYPROPERTY.DisplayName()) - { - } - column(BillGr_TABLECAPTION__________BillGrFilter; BillGr.TableCaption + ':' + BillGrFilter) - { - } - column(BillGr_TABLECAPTION_________BillGr__No__; BillGr.TableCaption + ' ' + BillGr."No.") - { - } - column(BankAccAddr_1_; BankAccAddr[1]) - { - } - column(BankAccAddr_2_; BankAccAddr[2]) - { - } - column(BankAccAddr_3_; BankAccAddr[3]) - { - } - column(BankAccAddr_4_; BankAccAddr[4]) - { - } - column(BankAccAddr_5_; BankAccAddr[5]) - { - } - column(BankAccAddr_6_; BankAccAddr[6]) - { - } - column(BankAccAddr_7_; BankAccAddr[7]) - { - } - column(BillGr__Bank_Account_Name_; BillGr."Bank Account Name") - { - } - column(OperationText; OperationText) - { - } - column(BillGr__Posting_Date_; Format(BillGr."Posting Date")) - { - } - column(BillGr__Posting_Description_; BillGr."Posting Description") - { - } - column(PostingGroup; PostingGroup) - { - } - column(BillGr__Currency_Code_; BillGr."Currency Code") - { - } - column(FactoringType; FactoringType) - { - } - column(PageCounter_Number; Number) - { - } - column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl) - { - } - column(Bill_Group___TestCaption; Bill_Group___TestCaptionLbl) - { - } - column(BillGr__Bank_Account_Name_Caption; BillGr__Bank_Account_Name_CaptionLbl) - { - } - column(OperationTextCaption; OperationTextCaptionLbl) - { - } - column(BillGr__Posting_Date_Caption; BillGr__Posting_Date_CaptionLbl) - { - } - column(BillGr__Posting_Description_Caption; BillGr__Posting_Description_CaptionLbl) - { - } - column(PostingGroupCaption; PostingGroupCaptionLbl) - { - } - column(BillGr__Currency_Code_Caption; BillGr__Currency_Code_CaptionLbl) - { - } - dataitem(HeaderErrorCounter; "Integer") - { - DataItemTableView = sorting(Number); - column(ErrorText_Number_; ErrorText[Number]) - { - } - column(HeaderErrorCounter_Number; Number) - { - } - column(ErrorText_Number_Caption; ErrorText_Number_CaptionLbl) - { - } - - trigger OnPostDataItem() - begin - ErrorCounter := 0; - end; - - trigger OnPreDataItem() - begin - SetRange(Number, 1, ErrorCounter); - end; - } - dataitem(Doc; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = BillGr; - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Receivable)); - column(Doc__Entry_No__; "Entry No.") - { - } - column(Doc__Due_Date_; Format("Due Date")) - { - } - column(Doc__Document_No__; "Document No.") - { - } - column(Doc__No__; "No.") - { - } - column(Doc__Account_No__; "Account No.") - { - } - column(Cust_Name; Cust.Name) - { - } - column(Cust__Post_Code_; Cust."Post Code") - { - } - column(Cust_City; Cust.City) - { - } - column(Cust_County; Cust.County) - { - } - column(Doc__Remaining_Amount_; "Remaining Amount") - { - AutoFormatExpression = "Currency Code"; - AutoFormatType = 1; - } - column(Doc__Document_Type_; "Document Type") - { - } - column(Doc__Document_Type____Doc__Document_Type___Bill; "Document Type" = "Document Type"::Bill) - { - } - column(Cust_County_Control97; Cust.County) - { - } - column(Cust_Name_Control98; Cust.Name) - { - } - column(Cust__Post_Code__Control99; Cust."Post Code") - { - } - column(Cust_City_Control100; Cust.City) - { - } - column(Doc__Remaining_Amount__Control101; "Remaining Amount") - { - AutoFormatExpression = "Currency Code"; - AutoFormatType = 1; - } - column(Doc__Account_No___Control102; "Account No.") - { - } - column(Doc__Document_No___Control104; "Document No.") - { - } - column(Doc__Due_Date__Control105; Format("Due Date")) - { - } - column(Doc__Document_Type__Control128; "Document Type") - { - } - column(Doc__Document_Type____Doc__Document_Type___Invoice; "Document Type" = "Document Type"::Invoice) - { - } - column(Doc_Type; Type) - { - } - column(Doc_Bill_Gr__Pmt__Order_No_; "Bill Gr./Pmt. Order No.") - { - } - column(Cust_NameCaption; Cust_NameCaptionLbl) - { - } - column(Post_CodeCaption; Post_CodeCaptionLbl) - { - } - column(City__Caption; City__CaptionLbl) - { - } - column(CountyCaption; CountyCaptionLbl) - { - } - column(Doc__Due_Date_Caption; Doc__Due_Date_CaptionLbl) - { - } - column(Doc__Document_No__Caption; FieldCaption("Document No.")) - { - } - column(Doc__No__Caption; Doc__No__CaptionLbl) - { - } - column(Doc__Account_No__Caption; Doc__Account_No__CaptionLbl) - { - } - column(Doc__Remaining_Amount_Caption; FieldCaption("Remaining Amount")) - { - } - column(Doc__Document_Type__Control128Caption; FieldCaption("Document Type")) - { - } - dataitem(LineErrorCounter; "Integer") - { - DataItemTableView = sorting(Number); - column(ErrorText_Number__Control56; ErrorText[Number]) - { - } - column(LineErrorCounter_Number; Number) - { - } - column(ErrorText_Number__Control56Caption; ErrorText_Number__Control56CaptionLbl) - { - } - - trigger OnPostDataItem() - begin - ErrorCounter := 0; - end; - - trigger OnPreDataItem() - begin - SetRange(Number, 1, ErrorCounter); - end; - } - - trigger OnAfterGetRecord() - begin - Cust.Get("Account No."); - - DocCount := DocCount + 1; - - if "Collection Agent" <> "Collection Agent"::Bank then - AddError(StrSubstNo(Text1100010, FieldCaption("Collection Agent"), "Collection Agent"::Bank)); - - if "Currency Code" <> BillGr."Currency Code" then - AddError(StrSubstNo(Text1100010, FieldCaption("Currency Code"), BillGr."Currency Code")); - - if "Remaining Amt. (LCY)" = 0 then - AddError(StrSubstNo(Text1100011, FieldCaption("Remaining Amt. (LCY)"))); - - if Type <> Type::Receivable then - AddError(StrSubstNo(Text1100010, FieldCaption(Type), Type::Receivable)); - - if Accepted = Accepted::No then - AddError(StrSubstNo(Text1100012, FieldCaption(Accepted), false)); - - if (BillGr.Factoring <> BillGr.Factoring::" ") and ("Document Type" = "Document Type"::Bill) then - AddError(StrSubstNo(Text1100012, FieldCaption("Document Type"), "Document Type"::Bill)); - - if (BillGr.Factoring = BillGr.Factoring::" ") and ("Document Type" <> "Document Type"::Bill) then - AddError(StrSubstNo(Text1100010, FieldCaption("Document Type"), "Document Type"::Bill)); - - CustLedgEntry.Get("Entry No."); - CustPostingGr.Get(CustLedgEntry."Customer Posting Group"); - if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then begin - if CustPostingGr."Discted. Bills Acc." = '' then - AddError( - StrSubstNo( - Text1100013, - CustPostingGr.FieldCaption("Discted. Bills Acc."), - CustPostingGr.TableCaption(), - CustPostingGr.Code)); - AccountNo := CustPostingGr."Discted. Bills Acc."; - end else begin - if CustPostingGr."Bills on Collection Acc." = '' then - AddError( - StrSubstNo( - Text1100013, - CustPostingGr.FieldCaption("Bills on Collection Acc."), - CustPostingGr.TableCaption(), - CustPostingGr.Code)); - AccountNo := CustPostingGr."Bills on Collection Acc."; - end; - - NoOfDays := "Due Date" - BillGr."Posting Date"; - if NoOfDays < 0 then begin - NoOfDays := 0; - if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then - AddError( - Text1100014); - end; - - if CalcExpenses then begin - if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and (BillGr.Factoring = BillGr.Factoring::" ") then begin - FeeRange.CalcDiscExpensesAmt( - BankAcc2."Operation Fees Code", - BankAcc2."Currency Code", - "Remaining Amount", - "Entry No."); - FeeRange.CalcDiscInterestsAmt( - BankAcc2."Operation Fees Code", - BankAcc2."Currency Code", - NoOfDays, - "Remaining Amount", - "Entry No."); - end else - if BillGr.Factoring = BillGr.Factoring::" " then - FeeRange.CalcCollExpensesAmt( - BankAcc2."Operation Fees Code", - BankAcc2."Currency Code", - "Remaining Amount", - "Entry No."); - if BillGr.Factoring <> BillGr.Factoring::" " then begin - if BillGr.Factoring = BillGr.Factoring::Risked then - FeeRange.CalcRiskFactExpensesAmt( - BankAcc2."Operation Fees Code", - BankAcc2."Currency Code", - "Remaining Amount", - "Entry No.") - else - FeeRange.CalcUnriskFactExpensesAmt( - BankAcc2."Operation Fees Code", - BankAcc2."Currency Code", - "Remaining Amount", - "Entry No."); - - if (CustRating.Get(BankAcc2."Customer Ratings Code", BankAcc2."Currency Code", "Account No.") and - (CustRating."Risk Percentage" <> 0)) - then begin - if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then - FeeRange.CalcDiscInterestsAmt( - BankAcc2."Operation Fees Code", - BankAcc2."Currency Code", - NoOfDays, - DocPost.FindDisctdAmt("Remaining Amount", "Account No.", BillGr."Bank Account No."), - "Entry No."); - end else - if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then - AddError( - StrSubstNo( - Text1100015, - CustRating.TableCaption(), - BankAcc2.TableCaption(), - BankAcc2."No.", - BankAcc2.FieldCaption("Currency Code"), - BankAcc2."Currency Code", - Cust.TableCaption(), - Cust.FieldCaption("No."), - "Account No.")); - end; - end; - - if CheckOtherBanks then begin - if DocPostBuffer.Find('+') then; - DocPostBuffer."Entry No." := DocPostBuffer."Entry No." + 1; - DocPostBuffer."No. of Days" := NoOfDays; - DocPostBuffer.Amount := "Remaining Amt. (LCY)"; - DocPostBuffer.Insert(); - end; - - if CustPostingGr."Bills Account" = '' then - AddError( - StrSubstNo( - Text1100013, - CustPostingGr.FieldCaption("Bills Account"), - CustPostingGr.TableCaption(), - CustPostingGr.Code)); - - BalanceAccNo := CustPostingGr."Bills Account"; - if BGPOPostBuffer.Get(AccountNo, BalanceAccNo) then begin - BGPOPostBuffer.Amount := BGPOPostBuffer.Amount + "Remaining Amount"; - BGPOPostBuffer.Modify(); - end else begin - BGPOPostBuffer.Account := AccountNo; - BGPOPostBuffer."Balance Account" := BalanceAccNo; - BGPOPostBuffer.Amount := "Remaining Amount"; - BGPOPostBuffer.Insert(); - end; - end; - - trigger OnPostDataItem() - begin - if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and BankAcc2.Find() then begin - if BankAcc2."Bank Acc. Posting Group" = '' then - AddError( - StrSubstNo( - Text1100016, - BankAcc2.FieldCaption("Bank Acc. Posting Group"), - BillGr.TableCaption(), - BillGr."Bank Account No.")); - if BankAccPostingGr.Get(BankAcc2."Bank Acc. Posting Group") then - if BankAccPostingGr."Liabs. for Disc. Bills Acc." = '' then - AddError( - StrSubstNo( - Text1100013, - BankAccPostingGr.FieldCaption("Liabs. for Disc. Bills Acc."), - BankAccPostingGr.TableCaption(), - BankAccPostingGr.Code)); - end; - end; - - trigger OnPreDataItem() - begin - Clear(DocPostBuffer); - - if CalcExpenses then begin - if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and - (BillGr.Factoring = BillGr.Factoring::" ") - then begin - FeeRange.InitDiscExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); - FeeRange.InitDiscInterests(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); - end else - if BillGr.Factoring = BillGr.Factoring::" " then - FeeRange.InitCollExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); - if BillGr.Factoring <> BillGr.Factoring::" " then begin - if BillGr.Factoring = BillGr.Factoring::Risked then - FeeRange.InitRiskFactExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code") - else - FeeRange.InitUnriskFactExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); - if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then begin - FeeRange.InitDiscExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); - FeeRange.InitDiscInterests(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); - end else - FeeRange.InitCollExpenses(BankAcc2."Operation Fees Code", BankAcc2."Currency Code"); - end; - end; - - DocCount := 0; - end; - } - dataitem(Total; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(DocCount; DocCount) - { - } - column(BillGr_Amount; BillGr.Amount) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(SetLabel; SetLabel()) - { - } - column(Total_Number; Number) - { - } - column(TotalCaption; TotalCaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - BillGr.CalcFields(Amount); - end; - } - } - dataitem("Integer"; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(BillGrFactoringInt; BillGrFactoringInt) - { - } - column(BillGrDealingTypeInt; BillGrDealingTypeInt) - { - } - column(SetLabel2; SetLabel2()) - { - } - column(Integer_Number; Number) - { - } - column(FORMAT_CreditLimitExceeded__Control76Caption; FORMAT_CreditLimitExceeded__Control76CaptionLbl) - { - } - column(BankAcc__Credit_Limit_for_Discount_Caption; BankAcc.FieldCaption("Credit Limit for Discount")) - { - } - column(RiskIncGr_Control77Caption; RiskIncGr_Control77CaptionLbl) - { - } - column(BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption; BankAcc.FieldCaption("Posted Receiv. Bills Rmg. Amt.")) - { - } - column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Caption; FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70CaptionLbl) - { - } - column(FeeRange_GetTotalCollExpensesAmt_Control63Caption; FeeRange_GetTotalCollExpensesAmt_Control63CaptionLbl) - { - } - column(FeeRange_GetTotalDiscExpensesAmt_Control61Caption; FeeRange_GetTotalDiscExpensesAmt_Control61CaptionLbl) - { - } - column(FeeRange_GetTotalDiscInterestsAmt_Control60Caption; FeeRange_GetTotalDiscInterestsAmt_Control60CaptionLbl) - { - } - column(BankAcc__No__Caption; BankAcc__No__CaptionLbl) - { - } - column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Caption; FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89CaptionLbl) - { - } - column(FeeRange_GetTotalCollExpensesAmt_Control88Caption; FeeRange_GetTotalCollExpensesAmt_Control88CaptionLbl) - { - } - column(FeeRange_GetTotalDiscExpensesAmt_Control87Caption; FeeRange_GetTotalDiscExpensesAmt_Control87CaptionLbl) - { - } - column(FeeRange_GetTotalDiscInterestsAmt_Control86Caption; FeeRange_GetTotalDiscInterestsAmt_Control86CaptionLbl) - { - } - column(BankAcc__No___Control90Caption; BankAcc__No___Control90CaptionLbl) - { - } - column(BankAcc__No___Control90Caption_Control59; BankAcc__No___Control90Caption_Control59Lbl) - { - } - column(FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106; FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106Lbl) - { - } - column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_114; FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Lbl) - { - } - dataitem(BillGrBankAcc; "Bank Account") - { - DataItemLink = "No." = field("Bank Account No."); - DataItemLinkReference = BillGr; - DataItemTableView = sorting("No."); - column(FORMAT_CreditLimitExceeded_; Format(CreditLimitExceeded)) - { - } - column(BillGrBankAcc__Credit_Limit_for_Discount_; "Credit Limit for Discount") - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(RiskIncGr; RiskIncGr) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__; "Posted Receiv. Bills Rmg. Amt.") - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt; FeeRange.GetTotalCollExpensesAmt() + FeeRange.GetTotalDiscExpensesAmt() + FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalCollExpensesAmt; FeeRange.GetTotalCollExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscExpensesAmt; FeeRange.GetTotalDiscExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscInterestsAmt; FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BillGrBankAcc__No__; "No.") - { - } - column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control91; FeeRange.GetTotalCollExpensesAmt() + FeeRange.GetTotalDiscExpensesAmt() + FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalCollExpensesAmt_Control92; FeeRange.GetTotalCollExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscExpensesAmt_Control93; FeeRange.GetTotalDiscExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscInterestsAmt_Control94; FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BillGrBankAcc__No___Control95; "No.") - { - } - column(BillGrBankAcc__No___Control108; "No.") - { - } - column(FeeRange_GetTotalDiscInterestsAmt_Control109; FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalRiskFactExpensesAmt; FeeRange.GetTotalRiskFactExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt; FeeRange.GetTotalDiscInterestsAmt() + FeeRange.GetTotalRiskFactExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalUnriskFactExpensesAmt; FeeRange.GetTotalUnriskFactExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscInterestsAmt_Control112; FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BillGrBankAcc__No___Control113; "No.") - { - } - column(FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt; FeeRange.GetTotalDiscInterestsAmt() + FeeRange.GetTotalUnriskFactExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - - trigger OnAfterGetRecord() - begin - SetRange("Dealing Type Filter", 1); // Discount - CalcFields("Posted Receiv. Bills Rmg. Amt."); - if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then - RiskIncGr := "Posted Receiv. Bills Rmg. Amt." + BillGr.Amount - else - RiskIncGr := "Posted Receiv. Bills Rmg. Amt."; - CreditLimitExceeded := RiskIncGr > "Credit Limit for Discount"; - - if not CalcExpenses then - CurrReport.Break(); - end; - } - dataitem(BankAcc; "Bank Account") - { - DataItemLink = "Currency Code" = field("Currency Code"); - DataItemLinkReference = BillGr; - DataItemTableView = sorting("No."); - RequestFilterFields = "No."; - column(FeeRange_GetTotalDiscInterestsAmt_Control60; FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscExpensesAmt_Control61; FeeRange.GetTotalDiscExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalCollExpensesAmt_Control63; FeeRange.GetTotalCollExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BankAcc__No__; "No.") - { - } - column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70; FeeRange.GetTotalCollExpensesAmt() + FeeRange.GetTotalDiscExpensesAmt() + FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FORMAT_CreditLimitExceeded__Control76; Format(CreditLimitExceeded)) - { - } - column(RiskIncGr_Control77; RiskIncGr) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BankAcc__Posted_Receiv__Bills_Rmg__Amt__; "Posted Receiv. Bills Rmg. Amt.") - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BankAcc__Credit_Limit_for_Discount_; "Credit Limit for Discount") - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscInterestsAmt_Control86; FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscExpensesAmt_Control87; FeeRange.GetTotalDiscExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalCollExpensesAmt_Control88; FeeRange.GetTotalCollExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89; FeeRange.GetTotalCollExpensesAmt() + FeeRange.GetTotalDiscExpensesAmt() + FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BankAcc__No___Control90; "No.") - { - } - column(FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt_Control117; FeeRange.GetTotalDiscInterestsAmt() + FeeRange.GetTotalRiskFactExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalRiskFactExpensesAmt_Control118; FeeRange.GetTotalRiskFactExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscInterestsAmt_Control119; FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BankAcc__No___Control120; "No.") - { - } - column(FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt_Control121; FeeRange.GetTotalDiscInterestsAmt() + FeeRange.GetTotalUnriskFactExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalUnriskFactExpensesAmt_Control122; FeeRange.GetTotalUnriskFactExpensesAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(FeeRange_GetTotalDiscInterestsAmt_Control123; FeeRange.GetTotalDiscInterestsAmt()) - { - AutoFormatExpression = BillGr."Currency Code"; - AutoFormatType = 1; - } - column(BankAcc__No___Control124; "No.") - { - } - column(BankAcc_Currency_Code; "Currency Code") - { - } - - trigger OnAfterGetRecord() - begin - if "No." = BillGr."Bank Account No." then - CurrReport.Skip(); - - SetRange("Dealing Type Filter", 1); // Discount - CalcFields("Posted Receiv. Bills Rmg. Amt."); - if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then - RiskIncGr := "Posted Receiv. Bills Rmg. Amt." + BillGr.Amount - else - RiskIncGr := "Posted Receiv. Bills Rmg. Amt."; - CreditLimitExceeded := RiskIncGr > "Credit Limit for Discount"; - - if not DocPostBuffer.Find('-') then - CurrReport.Skip(); - - Clear(FeeRange); - if not FeeRange.Find('=<>') then - CurrReport.Skip(); - if BillGr."Dealing Type" = BillGr."Dealing Type"::Discount then begin - FeeRange.InitDiscExpenses("Operation Fees Code", "Currency Code"); - FeeRange.InitDiscInterests("Operation Fees Code", "Currency Code"); - repeat - FeeRange.CalcDiscExpensesAmt( - "Operation Fees Code", - "Currency Code", - DocPostBuffer.Amount, - DocPostBuffer."Entry No."); - FeeRange.CalcDiscInterestsAmt( - "Operation Fees Code", - "Currency Code", - NoOfDays, - DocPostBuffer.Amount, - DocPostBuffer."Entry No."); - until DocPostBuffer.Next() = 0; - end else begin - FeeRange.InitCollExpenses("Operation Fees Code", "Currency Code"); - repeat - FeeRange.CalcCollExpensesAmt( - "Operation Fees Code", - "Currency Code", - DocPostBuffer.Amount, - DocPostBuffer."Entry No."); - until DocPostBuffer.Next() = 0; - end; - end; - } - } - - trigger OnAfterGetRecord() - begin - if "Dealing Type" = "Dealing Type"::Discount then - OperationText := Text1100000 - else - OperationText := Text1100001; - FactoringType := GetFactoringType(); - - Clear(BankAcc2); - Clear(PostingGroup); - Clear(CalcExpenses); - - if BankAcc2.Get(BillGr."Bank Account No.") then begin - if BankAcc2."Currency Code" <> BillGr."Currency Code" then - AddError( - StrSubstNo( - Text1100002, - BankAcc2.FieldCaption("Currency Code"), - BillGr."Currency Code", - BankAcc2.TableCaption, - BankAcc2."No.")); - if BankAcc2."Operation Fees Code" = '' then - AddError( - StrSubstNo( - Text1100003, - BankAcc2.FieldCaption("Operation Fees Code"), - BankAcc2.TableCaption, - BankAcc2."No.")); - if BankAcc2."Customer Ratings Code" = '' then - AddError( - StrSubstNo( - Text1100003, - BankAcc2.FieldCaption("Customer Ratings Code"), - BankAcc2.TableCaption, - BankAcc2."No.")); - if BillGr."Posting Date" <> 0D then - CalcExpenses := true; - FormatAddress.FormatAddr( - BankAccAddr, BankAcc2.Name, BankAcc2."Name 2", '', BankAcc2.Address, BankAcc2."Address 2", - BankAcc2.City, BankAcc2."Post Code", BankAcc2.County, BankAcc2."Country/Region Code"); - PostingGroup := BankAcc2."Bank Acc. Posting Group"; - CompanyIsBlocked := BankAcc2.Blocked; - BillGr."Bank Account Name" := BankAcc2.Name; - if (BillGr."Dealing Type" = BillGr."Dealing Type"::Discount) and (BillGr.Factoring = BillGr.Factoring::" ") then begin - BankAcc2.SetRange("Dealing Type Filter", 1); - // Discount - BankAcc2.CalcFields("Posted Receiv. Bills Rmg. Amt."); - BillGr.CalcFields(Amount); - if BankAcc2."Posted Receiv. Bills Rmg. Amt." + BillGr.Amount > BankAcc2."Credit Limit for Discount" then - AddError(Text1100004); - end; - end; - - if "Bank Account No." = '' then - AddError(StrSubstNo(Text1100005, FieldCaption("Bank Account No."))) - else - if PostingGroup = '' then - AddError( - StrSubstNo( - Text1100006, - BankAcc2.TableCaption(), - "Bank Account No.", - BankAcc2.FieldCaption("Bank Acc. Posting Group"))); - - if "Posting Date" = 0D then - AddError(StrSubstNo(Text1100005, FieldCaption("Posting Date"))); - - if "No. Printed" = 0 then - AddError(Text1100007); - - if CompanyIsBlocked then - AddError(StrSubstNo(Text1100008, BankAcc2.TableCaption(), "Bank Account No.")); - - Doc.Reset(); - Doc.SetCurrentKey(Type, "Collection Agent", "Bill Gr./Pmt. Order No."); - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetRange("Bill Gr./Pmt. Order No.", "No."); - if not Doc.Find('-') then - AddError(Text1100009); - - BillGrDealingTypeInt := "Dealing Type".AsInteger(); - BillGrFactoringInt := Factoring - end; - - trigger OnPreDataItem() - begin - if BankAccNoFilter <> '' then begin - SetCurrentKey("Bank Account No."); - SetRange("Bank Account No.", BankAccNoFilter); - end; - end; - } - } - - requestpage - { - - layout - { - } - - actions - { - } - } - - labels - { - } - - trigger OnPreReport() - begin - BillGrFilter := BillGr.GetFilters(); - CheckOtherBanks := BankAcc.GetFilter("No.") <> ''; - BankAccNoFilter := BankAcc.GetFilter("No."); - end; - - var - Text1100000: Label 'For Discount'; - Text1100001: Label 'For Collection'; - Text1100002: Label '%1 must be %2 in %3 %4.'; - Text1100003: Label '%1 must be specified in %2 %3.'; - Text1100004: Label 'The credit limit will be exceeded.'; - Text1100005: Label '%1 must be specified.'; - Text1100006: Label '%1 %2 has no %3.'; - Text1100007: Label 'The bill group has not been printed.'; - Text1100008: Label '%1 %2 is blocked.'; - Text1100009: Label 'The bill group is empty.'; - Text1100010: Label '%1 must be %2.'; - Text1100011: Label '%1 must not be zero.'; - Text1100012: Label '%1 cannot be %2.'; - Text1100013: Label 'Specify %1 in %2 %3.'; - Text1100014: Label 'This Bill is due before the posting date of the bill group. It should not be included in a group for discount.'; - Text1100015: Label 'The %1 for %2 %3 %4 %5 %6 %7 %8 doesn''t exist.'; - Text1100016: Label 'Specify %1 for %2 %3.'; - Text1100017: Label 'Risked Factoring'; - Text1100018: Label 'Unrisked Factoring'; - Text1100019: Label 'No. of invoices'; - Text1100020: Label 'No. of bills'; - Text1100021: Label 'Risked Factoring Expenses'; - Text1100022: Label 'Unrisked Factoring Expenses'; - BankAcc2: Record "Bank Account"; - Cust: Record Customer; - CustLedgEntry: Record "Cust. Ledger Entry"; - CustPostingGr: Record "Customer Posting Group"; - DocPostBuffer: Record "Doc. Post. Buffer" temporary; - BGPOPostBuffer: Record "BG/PO Post. Buffer" temporary; - BankAccPostingGr: Record "Bank Account Posting Group"; - FeeRange: Record "Fee Range"; - CustRating: Record "Customer Rating"; - DocPost: Codeunit "Document-Post"; - FormatAddress: Codeunit "Format Address"; - BillGrFilter: Text[250]; - BankAccAddr: array[8] of Text[100]; - OperationText: Text[80]; - ErrorText: array[99] of Text[250]; - ErrorCounter: Integer; - PostingGroup: Code[20]; - CompanyIsBlocked: Boolean; - DocCount: Integer; - AccountNo: Text[20]; - BalanceAccNo: Text[20]; - CreditLimitExceeded: Boolean; - RiskIncGr: Decimal; - CalcExpenses: Boolean; - CheckOtherBanks: Boolean; - NoOfDays: Integer; - FactoringType: Text[30]; - BankAccNoFilter: Text[20]; - BillGrFactoringInt: Integer; - BillGrDealingTypeInt: Integer; - CurrReport_PAGENOCaptionLbl: Label 'Page'; - Bill_Group___TestCaptionLbl: Label 'Bill Group - Test'; - BillGr__Bank_Account_Name_CaptionLbl: Label 'Bank Account Name'; - OperationTextCaptionLbl: Label 'Operation'; - BillGr__Posting_Date_CaptionLbl: Label 'Posting Date'; - BillGr__Posting_Description_CaptionLbl: Label 'Posting Description'; - PostingGroupCaptionLbl: Label 'Posting Group'; - BillGr__Currency_Code_CaptionLbl: Label 'Currency Code'; - ErrorText_Number_CaptionLbl: Label 'Warning!'; - Cust_NameCaptionLbl: Label 'Name'; - Post_CodeCaptionLbl: Label 'Post Code'; - City__CaptionLbl: Label 'City /'; - CountyCaptionLbl: Label 'County'; - Doc__Due_Date_CaptionLbl: Label 'Due Date'; - Doc__No__CaptionLbl: Label 'Bill No.'; - Doc__Account_No__CaptionLbl: Label 'Customer No.'; - ErrorText_Number__Control56CaptionLbl: Label 'Warning!'; - TotalCaptionLbl: Label 'Total'; - FORMAT_CreditLimitExceeded__Control76CaptionLbl: Label 'Exceeded'; - RiskIncGr_Control77CaptionLbl: Label 'Risk Including this Bill Group'; - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70CaptionLbl: Label 'Total Expenses'; - FeeRange_GetTotalCollExpensesAmt_Control63CaptionLbl: Label 'Collection Expenses'; - FeeRange_GetTotalDiscExpensesAmt_Control61CaptionLbl: Label 'Discount Expenses'; - FeeRange_GetTotalDiscInterestsAmt_Control60CaptionLbl: Label 'Discount Interests'; - BankAcc__No__CaptionLbl: Label 'Bank Account No.'; - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89CaptionLbl: Label 'Total Expenses'; - FeeRange_GetTotalCollExpensesAmt_Control88CaptionLbl: Label 'Collection Expenses'; - FeeRange_GetTotalDiscExpensesAmt_Control87CaptionLbl: Label 'Discount Expenses'; - FeeRange_GetTotalDiscInterestsAmt_Control86CaptionLbl: Label 'Discount Interests'; - BankAcc__No___Control90CaptionLbl: Label 'Bank Account No.'; - BankAcc__No___Control90Caption_Control59Lbl: Label 'Bank Account No.'; - FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106Lbl: Label 'Discount Interests'; - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Lbl: Label 'Total Expenses'; - - local procedure AddError(Text: Text[250]) - begin - ErrorCounter := ErrorCounter + 1; - ErrorText[ErrorCounter] := Text; - end; - - [Scope('OnPrem')] - procedure GetFactoringType(): Text[30] - begin - if BillGr.Factoring <> BillGr.Factoring::" " then begin - if BillGr.Factoring = BillGr.Factoring::Risked then - exit(Text1100017); - - exit(Text1100018); - end; - end; - - [Scope('OnPrem')] - procedure SetLabel(): Text[30] - begin - if BillGr.Factoring <> BillGr.Factoring::" " then - exit(Text1100019); - - exit(Text1100020); - end; - - [Scope('OnPrem')] - procedure SetLabel2(): Text[30] - begin - if BillGr.Factoring <> BillGr.Factoring::" " then begin - if BillGr.Factoring = BillGr.Factoring::Risked then - exit(Text1100021); - - exit(Text1100022); - end; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupTest.rdlc b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupTest.rdlc deleted file mode 100644 index d9fb8ff6f80..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupTest.rdlc +++ /dev/null @@ -1,5697 +0,0 @@ - - - 0 - - - - SQL - - - None - 84343ccd-463d-47c8-9326-35fd629e652f - - - - - - - - - - - 17.47302cm - - - - - 21.38517cm - - - - - - - true - - - - - - - - - - - 0.01cm - 0.1cm - 25 - - =Code.SetData(First(Fields!Bill_Group___TestCaption.Value) + Chr(177) + - First(Fields!COMPANYNAME.Value) + Chr(177) + - First(Fields!FORMAT_TODAY_0_4_.Value) + Chr(177) + - First(Fields!CurrReport_PAGENOCaption.Value) + Chr(177) + - First(Fields!BillGr_TABLECAPTION__________BillGrFilter.Value)) - - - - - - - - 1.575cm - - - 1.95cm - - - 1.95cm - - - 1.95cm - - - 1.95cm - - - 1.95cm - - - 1.95cm - - - 1.95cm - - - 1.875cm - - - - - 0.846cm - - - - - true - - - - - =First(Fields!BankAcc__No__Caption.Value) - - - - - - BankAcc__No__Caption - 76 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalDiscInterestsAmt_Control60Caption.Value) - - - - - - - FeeRange_GetTotalDiscInterestsAmt_Control60Caption - 75 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalDiscExpensesAmt_Control61Caption.Value) - - - - - - - FeeRange_GetTotalDiscExpensesAmt_Control61Caption - 74 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalCollExpensesAmt_Control63Caption.Value) - - - - - - - FeeRange_GetTotalCollExpensesAmt_Control63Caption - 73 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Caption.Value) - - - - - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Caption - 72 - - - - - - - - true - - - - - =First(Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption.Value) - - - - - - - BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption - 71 - - - - - - - - true - - - - - =First(Fields!RiskIncGr_Control77Caption.Value) - - - - - - - RiskIncGr_Control77Caption - 70 - - - - - - - - true - - - - - =First(Fields!BankAcc__Credit_Limit_for_Discount_Caption.Value) - - - - - - - BankAcc__Credit_Limit_for_Discount_Caption - 69 - - - - - - - - true - - - - - =First(Fields!FORMAT_CreditLimitExceeded__Control76Caption.Value) - - - - - - FORMAT_CreditLimitExceeded__Control76Caption - 68 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - textbox49 - 67 - - - 9 - - - - - - - - - - - - - - 0.846cm - - - - - true - - - - - =First(Fields!BankAcc__No___Control90Caption.Value) - - - - - - BankAcc__No___Control90Caption - 66 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalDiscInterestsAmt_Control86Caption.Value) - - - - - - - FeeRange_GetTotalDiscInterestsAmt_Control86Caption - 65 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalDiscExpensesAmt_Control87Caption.Value) - - - - - - - FeeRange_GetTotalDiscExpensesAmt_Control87Caption - 64 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalCollExpensesAmt_Control88Caption.Value) - - - - - - - FeeRange_GetTotalCollExpensesAmt_Control88Caption - 63 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Caption.Value) - - - - - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Caption - 62 - - - - - - - - true - - - - - - - - - - - - textbox99 - 61 - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - textbox58 - 60 - - - 9 - - - - - - - - - - - - - - 0.86cm - - - - - true - - - - - =First(Fields!BankAcc__No___Control90Caption_Control59.Value) - - - - - - BankAcc__No___Control90Caption_Control59 - 59 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106.Value) - - - - - - - FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106 - 58 - - - - - - - - true - - - - - =First(Fields!SetLabel2.Value) - - - - - - - SetLabel2 - 57 - - - - - - - - true - - - - - - - - - - - - textbox93 - 56 - - - - - - - - true - - - - - =First(Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_114.Value) - - - - - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_114 - 55 - - - - - - - - true - - - - - - - - - - - - textbox111 - 54 - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BillGrBankAcc__No__.Value - - - - - - 53 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt.Value - - - - - - - 52 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscExpensesAmt.Value - - - - - - - FeeRange_GetTotalDiscExpensesAmt - 51 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalCollExpensesAmt.Value - - - - - - - FeeRange_GetTotalCollExpensesAmt - 50 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt.Value - - - - - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt - 49 - - - - - - - - true - true - - - - - =Fields!BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value - - - - - - - BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__ - 48 - - - - - - - - true - true - - - - - =Fields!RiskIncGr.Value - - - - - - - RiskIncGr - 47 - - - - - - - - true - true - - - - - =Fields!BillGrBankAcc__Credit_Limit_for_Discount_.Value - - - - - - - BillGrBankAcc__Credit_Limit_for_Discount_ - 46 - - - - - - - - true - true - - - - - =Fields!FORMAT_CreditLimitExceeded_.Value - - - - - - FORMAT_CreditLimitExceeded_ - 45 - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BillGrBankAcc__No__.Value - - - - - - 44 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt.Value - - - - - - - 43 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscExpensesAmt.Value - - - - - - - 42 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalCollExpensesAmt.Value - - - - - - - 41 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt.Value - - - - - - - 40 - - - - - - - - true - - - - - - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BillGrBankAcc__No__.Value - - - - - - 38 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt.Value - - - - - - - 37 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalRiskFactExpensesAmt.Value - - - - - - - 36 - - - - - - - - true - - - - - - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt.Value - - - - - - - 34 - - - - - - - - true - - - - - - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BillGrBankAcc__No__.Value - - - - - - 32 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt.Value - - - - - - - 31 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalUnriskFactExpensesAmt.Value - - - - - - - 30 - - - - - - - - true - - - - - - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt.Value - - - - - - - 28 - - - - - - - - true - - - - - - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__No__.Value - - - - - - BankAcc__No__ - 26 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt_Control60.Value - - - - - - - 25 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscExpensesAmt_Control61.Value - - - - - - - 24 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalCollExpensesAmt_Control63.Value - - - - - - - FeeRange_GetTotalCollExpensesAmt_Control63 - 23 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70.Value - - - - - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70 - 22 - - - - - - - - true - true - - - - - =Fields!BankAcc__Posted_Receiv__Bills_Rmg__Amt__.Value - - - - - - - BankAcc__Posted_Receiv__Bills_Rmg__Amt__ - 21 - - - - - - - - true - true - - - - - =Fields!RiskIncGr_Control77.Value - - - - - - - RiskIncGr_Control77 - 20 - - - - - - - - true - true - - - - - =Fields!BankAcc__Credit_Limit_for_Discount_.Value - - - - - - - BankAcc__Credit_Limit_for_Discount_ - 19 - - - - - - - - true - true - - - - - =Fields!FORMAT_CreditLimitExceeded__Control76.Value - - - - - - FORMAT_CreditLimitExceeded__Control76 - 18 - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__No__.Value - - - - - - 17 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt_Control60.Value - - - - - - - 16 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscExpensesAmt_Control61.Value - - - - - - - 15 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalCollExpensesAmt_Control63.Value - - - - - - - 14 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70.Value - - - - - - - 13 - - - - - - - - true - - - - - - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__No__.Value - - - - - - 11 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt_Control60.Value - - - - - - - 10 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalRiskFactExpensesAmt_Control118.Value - - - - - - - 9 - - - - - - - - true - - - - - - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt_Control117.Value - - - - - - - 7 - - - - - - - - true - - - - - - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!BankAcc__No__.Value - - - - - - 5 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt_Control60.Value - - - - - - - 4 - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalUnriskFactExpensesAmt_Control122.Value - - - - - - - 3 - - - - - - - - true - - - - - - - - - - - - - true - true - - - - - =Fields!FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt_Control121.Value - - - - - - - 1 - - - - - - - - true - - - - - - - - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - =IIF(Fields!BillGrDealingTypeInt.Value=1 AND - (Fields!BillGrFactoringInt.Value=0),FALSE,TRUE) - - After - true - - - - =IIF(Fields!BillGrDealingTypeInt.Value=1 AND - (Fields!BillGrFactoringInt.Value=0),FALSE,TRUE) - - After - true - - - - =IIF(Fields!BillGrDealingTypeInt.Value=0 AND - (Fields!BillGrFactoringInt.Value=0),FALSE,TRUE) - - After - true - - - - =IIF(Fields!BillGrDealingTypeInt.Value=0 AND - (Fields!BillGrFactoringInt.Value=0),FALSE,TRUE) - - After - true - - - - =IIF(Fields!BillGrFactoringInt.Value=0,TRUE,FALSE) - - After - true - - - - Detail - - - - - =IIF(Fields!BillGrDealingTypeInt.Value=1 AND - Fields!BillGrFactoringInt.Value=0 AND - Fields!BillGrBankAcc__No__.Value<>"",FALSE,TRUE) - - - - - =IIF(Fields!BillGrDealingTypeInt.Value=0 AND - Fields!BillGrFactoringInt.Value=0 AND - Fields!BillGrBankAcc__No__.Value<>"",FALSE,TRUE) - - - - - =IIF(Fields!BillGrFactoringInt.Value=2 AND - Fields!BillGrBankAcc__No__.Value<>"",FALSE,TRUE) - - - - - =IIF(Fields!BillGrFactoringInt.Value=1 AND - Fields!BillGrBankAcc__No__.Value<>"",FALSE,TRUE) - - - - - =IIF(Fields!BillGrDealingTypeInt.Value=1 AND - Fields!BillGrFactoringInt.Value=0 AND - Fields!BankAcc__No__.Value<>"",FALSE,TRUE) - - - - - =IIF(Fields!BillGrDealingTypeInt.Value=0 AND - Fields!BillGrFactoringInt.Value=0 AND - Fields!BankAcc__No__.Value<>"",FALSE,TRUE) - - - - - =IIF(Fields!BillGrFactoringInt.Value=2 AND - Fields!BankAcc__No__.Value<>"",FALSE,TRUE) - - - - - =IIF(Fields!BillGrFactoringInt.Value=1 AND - Fields!BankAcc__No__.Value<>"",FALSE,TRUE) - - - - Detail_Collection - Output - true - - - - DataSet_Result - - - =Fields!FORMAT_CreditLimitExceeded__Control76Caption.Value - GreaterThan - - ="" - - - - 14.60317cm - 6.73313in - 24 - - - true - - - - - =First(Fields!PostingGroup.Value) - - - - - - - 6.768cm - 5.1cm - 0.423cm - 5cm - 23 - - - - true - - - - - =First(Fields!BillGr__Currency_Code_.Value) - - - - - - - 7.191cm - 5.1cm - 0.423cm - 5cm - 22 - - - - true - - - - - =First(Fields!PostingGroupCaption.Value) - - - - - - - 6.768cm - 0.423cm - 5cm - 21 - - - - true - - - - - =First(Fields!BillGr__Currency_Code_Caption.Value) - - - - - - - 7.191cm - 0.423cm - 5cm - 20 - - - - - - - 2.47755cm - - - 1.94318cm - - - 10.88181cm - - - 1.79744cm - - - - - 0.423cm - - - - - true - - - - - - - - - - - textbox48 - 8 - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!TotalCaption.Value - - - - - - TotalCaption - 7 - - - 2 - - - - - - - true - - - - - - - - - - - textbox41 - 6 - - - - - - - - true - true - - - - - =Fields!BillGr_Amount.Value - - - - - - - BillGr_Amount - 5 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - textbox28 - 4 - - - 4 - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!SetLabel.Value - - - - - - SetLabel - 3 - - - - - - - - true - - - - - =Fields!DocCount.Value - - - - - - - DocCount_1 - 2 - - - - - - - - true - - - - - - - - - - - textbox34 - 1 - - - 2 - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - textbox13 - - - 4 - - - - - - - - - - - - - - - - - - - - - - Detail - - - - - - - - - Detail_Collection - Output - true - - - - DataSet_Result - - - =Fields!TotalCaption.Value - GreaterThan - - ="" - - - - 12.38095cm - 2.115cm - 6.73312in - 19 - - - - - - 1.275cm - - - 0.75cm - - - 1.65cm - - - 0.9cm - - - 1.65cm - - - 4.5cm - - - 1.65cm - - - 2.85cm - - - 1.875cm - - - - - 0.846cm - - - - - true - - - - - =First(Fields!Doc__Due_Date_Caption.Value) - - - - - - Doc__Due_Date_Caption - 34 - - - - - - - - true - - - - - =First(Fields!Doc__Document_Type__Control128Caption.Value) - - - - - - Doc__Document_Type__Control128Caption - 33 - - - - - - - - true - - - - - =First(Fields!Doc__Document_No__Caption.Value) - - - - - - Doc__Document_No__Caption - 32 - - - - - - - - true - - - - - =First(Fields!Doc__No__Caption.Value) - - - - - - Doc__No__Caption - 31 - - - - - - - - true - - - - - =First(Fields!Doc__Account_No__Caption.Value) - - - - - - textbox83 - 30 - - - - - - - - true - - - - - =First(Fields!Cust_NameCaption.Value) - - - - - - Cust_NameCaption - 29 - - - - - - - - true - - - - - =First(Fields!Post_CodeCaption.Value) - - - - - - Post_CodeCaption_1 - 28 - - - - - - - - true - - - - - =First(Fields!City__Caption.Value)+Chr(10)+First(Fields!CountyCaption.Value) - - - - - - City__Caption - 27 - - =iif(First(Fields!Post_CodeCaption.Value)="",true,false) - - NoOutput - - - - - - - - true - - - - - =First(Fields!Doc__Remaining_Amount_Caption.Value) - - - - - - - Doc__Remaining_Amount_Caption - 26 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - textbox50 - 25 - - - 9 - - - - - - - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!Doc__Due_Date_.Value - - - - - - 24 - - - - - - - - true - - - - - =Fields!Doc__Document_Type_.Value - - - - - - 23 - - - - - - - - true - - - - - =Fields!Doc__Document_No__.Value - - - - - - - 22 - - - - - - - - true - - - - - =Fields!Doc__No__.Value - - - - - - - 21 - - - - - - - - true - - - - - =Fields!Doc__Account_No__.Value - - - - - - - 20 - - - - - - - - true - - - - - =Fields!Cust_Name.Value - - - - - - 19 - - - - - - - - true - - - - - =Fields!Cust__Post_Code_.Value - - - - - - - 18 - - - - - - - - true - - - - - =Fields!Cust_City.Value - - - - - - 17 - - - - - - - - true - true - - - - - =Fields!Doc__Remaining_Amount_.Value - - - - - - - 16 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - 15 - - - 7 - - - - - - - - - - - - true - - - - - =Fields!Cust_County.Value - - - - - - 14 - - - - - - - - true - - - - - - - - - - - 13 - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!Doc__Due_Date_.Value - - - - - - 12 - - - - - - - - true - - - - - =Fields!Doc__Document_Type_.Value - - - - - - 11 - - - - - - - - true - - - - - =Fields!Doc__Document_No__.Value - - - - - - - 10 - - - - - - - - true - - - - - - - - - - - - - true - - - - - =Fields!Doc__Account_No__.Value - - - - - - - 8 - - - - - - - - true - - - - - =Fields!Cust_Name.Value - - - - - - 7 - - - - - - - - true - - - - - =Fields!Cust__Post_Code_.Value - - - - - - - 6 - - - - - - - - true - - - - - =Fields!Cust_City.Value - - - - - - 5 - - - - - - - - true - true - - - - - =Fields!Doc__Remaining_Amount_.Value - - - - - - - 4 - - - - - - - - 0.423cm - - - - - true - - - - - - - - - - - 3 - - - 7 - - - - - - - - - - - - true - - - - - =Fields!Cust_County.Value - - - - - - 2 - - - - - - - - true - - - - - - - - - - - 1 - - - - - - - - 0.423cm - - - - - true - - - - - =Fields!ErrorText_Number__Control56Caption.Value - - - - - - ErrorText_Number__Control56Caption - - - 2 - - - - - - - true - - - - - =Fields!ErrorText_Number__Control56.Value - - - - - - textbox47 - - - 7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - After - true - - - After - true - - - - - =Fields!Doc__Entry_No__.Value - - - - - - =IIF(Fields!Doc__Document_Type____Doc__Document_Type___Bill.Value,FALSE,TRUE) - - After - true - - - - =IIF(Fields!Doc__Document_Type____Doc__Document_Type___Bill.Value,FALSE,TRUE) - - After - true - - - - =IIF(Fields!Doc__Document_Type____Doc__Document_Type___Invoice.Value,FALSE,TRUE) - - After - true - - - - =IIF(Fields!Doc__Document_Type____Doc__Document_Type___Invoice.Value,FALSE,TRUE) - - After - true - - - - Detail - - - - - =IIF(Fields!ErrorText_Number__Control56.Value="",TRUE,FALSE) - - - - Detail_Collection - Output - true - - - - - - DataSet_Result - - - =Fields!Doc__Document_No__.Value - GreaterThan - - ="" - - - - =Fields!Doc_Type.Value - GreaterThan - - ="" - - - - 8.883cm - 3.384cm - 6.73313in - 18 - - - - - - 1.6cm - - - 15.8cm - - - - - 0.423cm - - - - - true - - - - - =Fields!ErrorText_Number_Caption.Value - - - - - - ErrorText_Number_Caption - 1 - - - - - - - - true - - - - - =Fields!ErrorText_Number_.Value - - - - - - ErrorText_Number_ - - - - - - - - - - - - - - - - - - - Detail - - - - - =IIF(Fields!ErrorText_Number_.Value="",TRUE,FALSE) - - - - Detail_Collection - Output - true - - - - 8.037cm - 0.423cm - 6.85125in - 17 - - - true - - - - - =First(Fields!BillGr__Posting_Date_.Value) - - - - - - - 5.922cm - 5.1cm - 0.423cm - 5cm - 16 - - - - true - - - - - =First(Fields!BillGr__Posting_Description_.Value) - - - - - - - 6.345cm - 5.1cm - 0.423cm - 5cm - 15 - - - - true - - - - - =First(Fields!OperationText.Value) - - - - - - 5.076cm - 5.1cm - 0.423cm - 5cm - 14 - - - - true - - - - - =First(Fields!BillGr__Bank_Account_Name_.Value) - - - - - - 4.653cm - 5.1cm - 0.423cm - 5cm - 13 - - - - true - - - - - =First(Fields!BillGr__Posting_Date_Caption.Value) - - - - - - - 5.922cm - 0.423cm - 5cm - 12 - - - - true - - - - - =First(Fields!BillGr__Posting_Description_Caption.Value) - - - - - - - 6.345cm - 0.423cm - 5cm - 11 - - - - true - - - - - =First(Fields!FactoringType.Value) - - - - - - - 5.499cm - 0.423cm - 5cm - 10 - - - - true - - - - - =First(Fields!OperationTextCaption.Value) - - - - - - - 5.076cm - 0.423cm - 5cm - 9 - - - - true - - - - - =First(Fields!BillGr__Bank_Account_Name_Caption.Value) - - - - - - - 4.653cm - 0.423cm - 5cm - 8 - - - - true - - - - - =First(Fields!BankAccAddr_4_.Value) - - - - - - - 2.538cm - 0.423cm - 5cm - 7 - - - - true - - - - - =First(Fields!BankAccAddr_5_.Value) - - - - - - - 2.961cm - 0.423cm - 5cm - 6 - - - - true - - - - - =First(Fields!BankAccAddr_6_.Value) - - - - - - - 3.384cm - 0.423cm - 5cm - 5 - - - - true - - - - - =First(Fields!BankAccAddr_7_.Value) - - - - - - - 3.807cm - 0.423cm - 5cm - 4 - - - - true - - - - - =First(Fields!BankAccAddr_3_.Value) - - - - - - - 2.115cm - 0.423cm - 5cm - 3 - - - - true - - - - - =First(Fields!BankAccAddr_2_.Value) - - - - - - - 1.692cm - 0.423cm - 5cm - 2 - - - - true - - - - - =First(Fields!BankAccAddr_1_.Value) - - - - - - - 1.296cm - 0.423cm - 5cm - 1 - - - - true - - - - - =First(Fields!BillGr_TABLECAPTION_________BillGr__No__.Value) - - - - - - - 0.423cm - 0.423cm - 5cm - - - - true - - - - - - - - - - - - - - - - - - =Fields!BillGr_No_.Value - - - Between - - - Output - true - - - - DataSet_Result - - End - - 21.38517cm - 17.47302cm - - - 21.38517cm - - 18.15cm - - - 2.14258cm - true - true - - - true - - - - - =Code.GetData(5) - - - - - - - 1.71958cm - 7 - - - - true - - - - - =Globals!PageNumber - - - - - - - 0.44945cm - 17.7cm - 0.423cm - 5 - - - - true - true - - - - - =User!UserID - - - - - - - 0.87245cm - 15.9cm - 0.423cm - 4 - - - - true - - - - - =Code.GetData(3) - - - - - - - 0.02646cm - 15cm - 0.423cm - 3 - - - - true - - - - - =Code.GetData(2) - - - - - - 0.44945cm - 0.423cm - 7.5cm - 2 - - - - true - - - - - =Code.GetData(4) - - - - - - 0.44945cm - 17.14286cm - 0.423cm - 0.75cm - 1 - - - - true - - - - - =Code.GetData(1) - - - - - - 0.02646cm - 0.423cm - 7.5cm - - - - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 2cm - 2cm - - - - Public Function BlankZero(ByVal Value As Decimal) - if Value = 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankPos(ByVal Value As Decimal) - if Value > 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankZeroAndPos(ByVal Value As Decimal) - if Value >= 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNeg(ByVal Value As Decimal) - if Value < 0 then - Return "" - end if - Return Value -End Function - -Public Function BlankNegAndZero(ByVal Value As Decimal) - if Value <= 0 then - Return "" - end if - Return Value -End Function - -Shared Data as Object - -Public Function SetData(NewData as Object) - If NewData <> "" Then - Data = NewData - End If - Return True -End Function - -Public Function GetData(Num as Integer) as Object - Return Cstr(Choose(Num, Split(Cstr(Data),Chr(177)))) -End Function - =User!Language - true - Invalid - 79def18b-5b55-4313-81a4-7c8cb97c6352 - - - - - BillGr_No_ - - - BillGr_Bank_Account_No_ - - - BillGr_Currency_Code - - - USERID - - - FORMAT_TODAY_0_4_ - - - COMPANYNAME - - - BillGr_TABLECAPTION__________BillGrFilter - - - BillGr_TABLECAPTION_________BillGr__No__ - - - BankAccAddr_1_ - - - BankAccAddr_2_ - - - BankAccAddr_3_ - - - BankAccAddr_4_ - - - BankAccAddr_5_ - - - BankAccAddr_6_ - - - BankAccAddr_7_ - - - BillGr__Bank_Account_Name_ - - - OperationText - - - BillGr__Posting_Date_ - - - BillGr__Posting_Description_ - - - PostingGroup - - - BillGr__Currency_Code_ - - - FactoringType - - - PageCounter_Number - - - CurrReport_PAGENOCaption - - - Bill_Group___TestCaption - - - BillGr__Bank_Account_Name_Caption - - - OperationTextCaption - - - BillGr__Posting_Date_Caption - - - BillGr__Posting_Description_Caption - - - PostingGroupCaption - - - BillGr__Currency_Code_Caption - - - ErrorText_Number_ - - - HeaderErrorCounter_Number - - - ErrorText_Number_Caption - - - Doc__Entry_No__ - - - Doc__Due_Date_ - - - Doc__Document_No__ - - - Doc__No__ - - - Doc__Account_No__ - - - Cust_Name - - - Cust__Post_Code_ - - - Cust_City - - - Cust_County - - - Doc__Remaining_Amount_ - - - Doc__Remaining_Amount_Format - - - Doc__Document_Type_ - - - Doc__Document_Type____Doc__Document_Type___Bill - - - Cust_County_Control97 - - - Cust_Name_Control98 - - - Cust__Post_Code__Control99 - - - Cust_City_Control100 - - - Doc__Remaining_Amount__Control101 - - - Doc__Remaining_Amount__Control101Format - - - Doc__Account_No___Control102 - - - Doc__Document_No___Control104 - - - Doc__Due_Date__Control105 - - - Doc__Document_Type__Control128 - - - Doc__Document_Type____Doc__Document_Type___Invoice - - - Doc_Type - - - Doc_Bill_Gr__Pmt__Order_No_ - - - Cust_NameCaption - - - Post_CodeCaption - - - City__Caption - - - CountyCaption - - - Doc__Due_Date_Caption - - - Doc__Document_No__Caption - - - Doc__No__Caption - - - Doc__Account_No__Caption - - - Doc__Remaining_Amount_Caption - - - Doc__Document_Type__Control128Caption - - - ErrorText_Number__Control56 - - - LineErrorCounter_Number - - - ErrorText_Number__Control56Caption - - - DocCount - - - BillGr_Amount - - - BillGr_AmountFormat - - - SetLabel - - - Total_Number - - - TotalCaption - - - BillGrFactoringInt - - - BillGrDealingTypeInt - - - SetLabel2 - - - Integer_Number - - - FORMAT_CreditLimitExceeded__Control76Caption - - - BankAcc__Credit_Limit_for_Discount_Caption - - - RiskIncGr_Control77Caption - - - BankAcc__Posted_Receiv__Bills_Rmg__Amt__Caption - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Caption - - - FeeRange_GetTotalCollExpensesAmt_Control63Caption - - - FeeRange_GetTotalDiscExpensesAmt_Control61Caption - - - FeeRange_GetTotalDiscInterestsAmt_Control60Caption - - - BankAcc__No__Caption - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Caption - - - FeeRange_GetTotalCollExpensesAmt_Control88Caption - - - FeeRange_GetTotalDiscExpensesAmt_Control87Caption - - - FeeRange_GetTotalDiscInterestsAmt_Control86Caption - - - BankAcc__No___Control90Caption - - - BankAcc__No___Control90Caption_Control59 - - - FeeRange_GetTotalDiscInterestsAmt_Control86Caption_Control106 - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_114 - - - FORMAT_CreditLimitExceeded_ - - - BillGrBankAcc__Credit_Limit_for_Discount_ - - - BillGrBankAcc__Credit_Limit_for_Discount_Format - - - RiskIncGr - - - RiskIncGrFormat - - - BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__ - - - BillGrBankAcc__Posted_Receiv__Bills_Rmg__Amt__Format - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmtFormat - - - FeeRange_GetTotalCollExpensesAmt - - - FeeRange_GetTotalCollExpensesAmtFormat - - - FeeRange_GetTotalDiscExpensesAmt - - - FeeRange_GetTotalDiscExpensesAmtFormat - - - FeeRange_GetTotalDiscInterestsAmt - - - FeeRange_GetTotalDiscInterestsAmtFormat - - - BillGrBankAcc__No__ - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control91 - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control91Format - - - FeeRange_GetTotalCollExpensesAmt_Control92 - - - FeeRange_GetTotalCollExpensesAmt_Control92Format - - - FeeRange_GetTotalDiscExpensesAmt_Control93 - - - FeeRange_GetTotalDiscExpensesAmt_Control93Format - - - FeeRange_GetTotalDiscInterestsAmt_Control94 - - - FeeRange_GetTotalDiscInterestsAmt_Control94Format - - - BillGrBankAcc__No___Control95 - - - BillGrBankAcc__No___Control108 - - - FeeRange_GetTotalDiscInterestsAmt_Control109 - - - FeeRange_GetTotalDiscInterestsAmt_Control109Format - - - FeeRange_GetTotalRiskFactExpensesAmt - - - FeeRange_GetTotalRiskFactExpensesAmtFormat - - - FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt - - - FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmtFormat - - - FeeRange_GetTotalUnriskFactExpensesAmt - - - FeeRange_GetTotalUnriskFactExpensesAmtFormat - - - FeeRange_GetTotalDiscInterestsAmt_Control112 - - - FeeRange_GetTotalDiscInterestsAmt_Control112Format - - - BillGrBankAcc__No___Control113 - - - FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt - - - FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmtFormat - - - FeeRange_GetTotalDiscInterestsAmt_Control60 - - - FeeRange_GetTotalDiscInterestsAmt_Control60Format - - - FeeRange_GetTotalDiscExpensesAmt_Control61 - - - FeeRange_GetTotalDiscExpensesAmt_Control61Format - - - FeeRange_GetTotalCollExpensesAmt_Control63 - - - FeeRange_GetTotalCollExpensesAmt_Control63Format - - - BankAcc__No__ - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70 - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control70Format - - - FORMAT_CreditLimitExceeded__Control76 - - - RiskIncGr_Control77 - - - RiskIncGr_Control77Format - - - BankAcc__Posted_Receiv__Bills_Rmg__Amt__ - - - BankAcc__Posted_Receiv__Bills_Rmg__Amt__Format - - - BankAcc__Credit_Limit_for_Discount_ - - - BankAcc__Credit_Limit_for_Discount_Format - - - FeeRange_GetTotalDiscInterestsAmt_Control86 - - - FeeRange_GetTotalDiscInterestsAmt_Control86Format - - - FeeRange_GetTotalDiscExpensesAmt_Control87 - - - FeeRange_GetTotalDiscExpensesAmt_Control87Format - - - FeeRange_GetTotalCollExpensesAmt_Control88 - - - FeeRange_GetTotalCollExpensesAmt_Control88Format - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89 - - - FeeRange_GetTotalCollExpensesAmt_FeeRange_GetTotalDiscExpensesAmt_FeeRange_GetTotalDiscInterestsAmt_Control89Format - - - BankAcc__No___Control90 - - - FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt_Control117 - - - FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalRiskFactExpensesAmt_Control117Format - - - FeeRange_GetTotalRiskFactExpensesAmt_Control118 - - - FeeRange_GetTotalRiskFactExpensesAmt_Control118Format - - - FeeRange_GetTotalDiscInterestsAmt_Control119 - - - FeeRange_GetTotalDiscInterestsAmt_Control119Format - - - BankAcc__No___Control120 - - - FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt_Control121 - - - FeeRange_GetTotalDiscInterestsAmt___FeeRange_GetTotalUnriskFactExpensesAmt_Control121Format - - - FeeRange_GetTotalUnriskFactExpensesAmt_Control122 - - - FeeRange_GetTotalUnriskFactExpensesAmt_Control122Format - - - FeeRange_GetTotalDiscInterestsAmt_Control123 - - - FeeRange_GetTotalDiscInterestsAmt_Control123Format - - - BankAcc__No___Control124 - - - BankAcc_Currency_Code - - - - DataSource - - - - - \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroups.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroups.Page.al deleted file mode 100644 index 5c0d5b4372c..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroups.Page.al +++ /dev/null @@ -1,326 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Bank.Payment; -using Microsoft.Finance.ReceivablesPayables; - -page 7000009 "Bill Groups" -{ - Caption = 'Bill Groups'; - DataCaptionExpression = Rec.Caption(); - PageType = Document; - RefreshOnActivate = true; - SourceTable = "Bill Group"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("No."; Rec."No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of this bill group.'; - - trigger OnAssistEdit() - begin - if Rec.AssistEdit(xRec) then - CurrPage.Update(); - end; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank, to which this bill group is being submitted.'; - - trigger OnLookup(var Text: Text): Boolean - begin - BankSel.SetCurrBillGr(Rec); - if ACTION::LookupOK = BankSel.RunModal() then begin - BankSel.GetRecord(BankAcc); - Rec."Dealing Type" := "Cartera Dealing Type".FromInteger(BankSel.IsForDiscount()); - Clear(BankSel); - Rec.Validate("Bank Account No.", BankAcc."No."); - end else - Clear(BankSel); - end; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the bank to which this bill group is submitted.'; - } - field("Dealing Type"; Rec."Dealing Type") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the type of payment. Collection: The document will be sent to the bank for processing as a receivable. Discount: The document will be sent to the bank for processing as a prepayment discount. When a document is submitted for discount, the bill group bank advances the amount of the document (or a portion of it, in the case of invoices). Later, the bank is responsible for processing the collection of the document on the due date.'; - } - field("Partner Type"; Rec."Partner Type") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies if the bill group is of type person or company.'; - } - field(Factoring; Rec.Factoring) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the factoring method used for the invoices that make up this bill group.'; - } - field("Posting Date"; Rec."Posting Date") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the posting date when this bill group will be entered.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code for the bill group.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total of the sums of the documents included in the bill group.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - Importance = Promoted; - ToolTip = 'Specifies the total amount for all of the documents included in the bill group.'; - } - } - part(Docs; "Docs. in BG Subform") - { - ApplicationArea = Basic, Suite; - SubPageLink = Type = const(Receivable), - "Collection Agent" = const(Bank), - "Bill Gr./Pmt. Order No." = field("No."); - SubPageView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.", "Currency Code", Accepted, "Due Date", Place); - } - group(Auditing) - { - Caption = 'Auditing'; - field("Reason Code"; Rec."Reason Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies why the entry is created. When reason codes are assigned to journal line or sales and purchase documents, all entries with a reason code will be marked during posting.'; - } - field("No. Printed"; Rec."No. Printed") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the number of copies that were printed.'; - } - } - } - area(factboxes) - { - part("File Export Errors"; "Payment Journal Errors Part") - { - ApplicationArea = Basic, Suite; - Caption = 'File Export Errors'; - Provider = Docs; - SubPageLink = "Journal Template Name" = filter(''), - "Journal Batch Name" = filter('7000005'), - "Document No." = field("Bill Gr./Pmt. Order No."), - "Journal Line No." = field("Entry No."); - } - part(Control1901421207; "BG Analysis Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1903433307; "Bank Account Information FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("Bank Account No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group(BillGroup) - { - Caption = 'Bill &Group'; - Image = VoucherGroup; - action(Comments) - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = Type = filter(Receivable), - "BG/PO No." = field("No."); - ToolTip = 'View or create a comment.'; - } - separator(Action18) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - RunObject = Page "Bill Groups Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action33) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - BillGr.Copy(Rec); - BillGr.SetRecFilter(); - end; - BillGr.PrintRecords(true); - end; - } - } - } - area(processing) - { - group(Posting) - { - Caption = 'P&osting'; - Image = Post; - action(TestReport) - { - ApplicationArea = Basic, Suite; - Caption = 'Test Report'; - Ellipsis = true; - Image = TestReport; - ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; - - trigger OnAction() - begin - if not Rec.Find() then - exit; - BillGr.Reset(); - BillGr := Rec; - BillGr.SetRecFilter(); - REPORT.Run(REPORT::"Bill Group - Test", true, false, BillGr); - end; - } - action(Post) - { - ApplicationArea = Basic, Suite; - Caption = 'P&ost'; - Ellipsis = true; - Image = Post; - ShortCutKey = 'F9'; - ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; - - trigger OnAction() - begin - if Rec.Find() then - PostBGPO.ReceivablePostOnly(Rec); - end; - } - action(PostandPrint) - { - ApplicationArea = Basic, Suite; - Caption = 'Post and &Print'; - Ellipsis = true; - Image = PostPrint; - ShortCutKey = 'Shift+F9'; - ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; - - trigger OnAction() - begin - if Rec.Find() then - PostBGPO.ReceivablePostAndPrint(Rec); - end; - } - action(ExportToFile) - { - ApplicationArea = Basic, Suite; - Caption = 'Export Bill Group to File'; - Image = ExportFile; - ToolTip = 'Export a file with the payment information on the lines.'; - - trigger OnAction() - begin - Rec.ExportToFile(); - end; - } - } - action(BillGroupsMaturity) - { - ApplicationArea = Basic, Suite; - Caption = 'Bill Groups Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Bill Groups Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View matured bill groups.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref(Post_Promoted; Post) - { - } - actionref(PostandPrint_Promoted; PostandPrint) - { - } - actionref(ExportToFile_Promoted; ExportToFile) - { - } - actionref(BillGroupsMaturity_Promoted; BillGroupsMaturity) - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - BankAcc: Record "Bank Account"; - BillGr: Record "Bill Group"; - BankSel: Page "Bank Account Selection"; - PostBGPO: Codeunit "BG/PO-Post and Print"; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsAnalysis.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsAnalysis.Page.al deleted file mode 100644 index 6618248aacc..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsAnalysis.Page.al +++ /dev/null @@ -1,98 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000020 "Bill Groups Analysis" -{ - Caption = 'Bill Groups Analysis'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = Card; - SaveValues = true; - SourceTable = "Bill Group"; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field("Category Filter"; Rec."Category Filter") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies a sort filter for the documents included in this bill group.'; - - trigger OnValidate() - begin - CategoryFilterOnAfterValidate(); - end; - } - } - group(Control3) - { - ShowCaption = false; - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - Editable = false; - ToolTip = 'Specifies the currency code for the bill group.'; - } - field(DocCount; DocCount) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Documents'; - Editable = false; - ToolTip = 'Specifies the number of documents included.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total of the sums of the documents included in the bill group.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount for all of the documents included in the bill group.'; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateStatistics(); - end; - - var - Doc: Record "Cartera Doc."; - DocCount: Integer; - - local procedure UpdateStatistics() - begin - Doc.SetRange(Type, Doc.Type::Receivable); - Doc.SetRange("Collection Agent", Doc."Collection Agent"::Bank); - Doc.SetRange("Bill Gr./Pmt. Order No.", Rec."No."); - Rec.CopyFilter("Global Dimension 1 Filter", Doc."Global Dimension 1 Code"); - Rec.CopyFilter("Global Dimension 2 Filter", Doc."Global Dimension 2 Code"); - Rec.CopyFilter("Category Filter", Doc."Category Code"); - Rec.CopyFilter("Due Date Filter", Doc."Due Date"); - DocCount := Doc.Count(); - end; - - local procedure CategoryFilterOnAfterValidate() - begin - UpdateStatistics(); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsList.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsList.Page.al deleted file mode 100644 index b92278a3c66..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsList.Page.al +++ /dev/null @@ -1,235 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000011 "Bill Groups List" -{ - ApplicationArea = Basic, Suite; - Caption = 'Bill Groups'; - CardPageID = "Bill Groups"; - Editable = false; - PageType = List; - SourceTable = "Bill Group"; - UsageCategory = Lists; - - layout - { - area(content) - { - repeater(Control1) - { - ShowCaption = false; - field("No."; Rec."No.") - { - ApplicationArea = All; - ToolTip = 'Specifies the number of this bill group.'; - } - field("Bank Account No."; Rec."Bank Account No.") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number or code of the bank, to which this bill group is being submitted.'; - } - field("Bank Account Name"; Rec."Bank Account Name") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the number of the bank to which this bill group is submitted.'; - } - field("Currency Code"; Rec."Currency Code") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the currency code for the bill group.'; - } - field(Amount; Rec.Amount) - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total of the sums of the documents included in the bill group.'; - } - field("Amount (LCY)"; Rec."Amount (LCY)") - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the total amount for all of the documents included in the bill group.'; - } - } - } - area(factboxes) - { - part(Control1901421207; "BG Analysis Fact Box") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("No."); - Visible = true; - } - part(Control1903433307; "Bank Account Information FB") - { - ApplicationArea = Basic, Suite; - SubPageLink = "No." = field("Bank Account No."); - Visible = true; - } - systempart(Control1905767507; Notes) - { - ApplicationArea = Notes; - Visible = true; - } - } - } - - actions - { - area(navigation) - { - group("Bill &Group") - { - Caption = 'Bill &Group'; - Image = VoucherGroup; - action(Comments) - { - ApplicationArea = Basic, Suite; - Caption = 'Co&mments'; - Image = ViewComments; - RunObject = Page "BG/PO Comment Sheet"; - RunPageLink = Type = filter(Receivable), - "BG/PO No." = field("No."); - ToolTip = 'View or create a comment.'; - } - separator(Action21) - { - } - action(Analysis) - { - ApplicationArea = Basic, Suite; - Caption = 'Analysis'; - Image = "Report"; - RunObject = Page "Bill Groups Analysis"; - RunPageLink = "No." = field("No."), - "Due Date Filter" = field("Due Date Filter"), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View details about the related documents. First you define which document category and currency you want to analyze documents for.'; - } - separator(Action24) - { - } - action(Listing) - { - ApplicationArea = Basic, Suite; - Caption = 'Listing'; - Ellipsis = true; - Image = List; - ToolTip = 'View detailed information about the posted bill group or payment order.'; - - trigger OnAction() - begin - if Rec.Find() then begin - BillGr.Copy(Rec); - BillGr.SetRecFilter(); - end; - BillGr.PrintRecords(true); - end; - } - } - } - area(processing) - { - group("P&osting") - { - Caption = 'P&osting'; - Image = Post; - action(TestReport) - { - ApplicationArea = Basic, Suite; - Caption = 'Test Report'; - Ellipsis = true; - Image = TestReport; - ToolTip = 'Preview the resulting entries to see the consequences before you perform the actual posting.'; - - trigger OnAction() - begin - if not Rec.Find() then - exit; - BillGr.Reset(); - BillGr := Rec; - BillGr.SetRecFilter(); - REPORT.Run(REPORT::"Bill Group - Test", true, false, BillGr); - end; - } - action(Post) - { - ApplicationArea = Basic, Suite; - Caption = 'P&ost'; - Ellipsis = true; - Image = Post; - ShortCutKey = 'F9'; - ToolTip = 'Post the documents to indicate that they are ready to submit to the bank for payment or collection. '; - - trigger OnAction() - begin - if Rec.Find() then - PostBillGr.ReceivablePostOnly(Rec); - end; - } - action("Post and &Print") - { - ApplicationArea = Basic, Suite; - Caption = 'Post and &Print'; - Ellipsis = true; - Image = PostPrint; - ShortCutKey = 'Shift+F9'; - ToolTip = 'Post and then print the documents to indicate that they are ready to submit to the bank for payment or collection.'; - - trigger OnAction() - begin - if Rec.Find() then - PostBillGr.ReceivablePostAndPrint(Rec); - end; - } - } - action(GeneralBillGroupsMaturity) - { - ApplicationArea = Basic, Suite; - Caption = 'Bill Groups Maturity'; - Image = DocumentsMaturity; - RunObject = Page "Bill Groups Maturity"; - RunPageLink = "No." = field("No."), - "Global Dimension 1 Filter" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Filter" = field("Global Dimension 2 Filter"), - "Category Filter" = field("Category Filter"); - ToolTip = 'View matured bill groups.'; - } - } - area(Promoted) - { - group(Category_Process) - { - Caption = 'Process'; - - actionref(Post_Promoted; Post) - { - } - actionref("Post and &Print_Promoted"; "Post and &Print") - { - } - actionref(GeneralBillGroupsMaturity_Promoted; GeneralBillGroupsMaturity) - { - } - } - group(Category_Report) - { - Caption = 'Reports'; - - actionref(Listing_Promoted; Listing) - { - } - } - } - } - - var - BillGr: Record "Bill Group"; - PostBillGr: Codeunit "BG/PO-Post and Print"; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsMaturity.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsMaturity.Page.al deleted file mode 100644 index df00b0e30ac..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillGroupsMaturity.Page.al +++ /dev/null @@ -1,97 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Finance.ReceivablesPayables; - -page 7000031 "Bill Groups Maturity" -{ - Caption = 'Bill Groups Maturity'; - DataCaptionExpression = Rec.Caption(); - DeleteAllowed = false; - InsertAllowed = false; - ModifyAllowed = false; - PageType = List; - SaveValues = true; - SourceTable = "Bill Group"; - - layout - { - area(content) - { - group(General) - { - Caption = 'General'; - field("Category Filter"; Rec."Category Filter") - { - ApplicationArea = Basic, Suite; - Caption = 'Category Filter'; - ToolTip = 'Specifies the categories that the data is included for.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - } - group(Options) - { - Caption = 'Options'; - field(PeriodType; PeriodType) - { - ApplicationArea = Basic, Suite; - Caption = 'View by'; - OptionCaption = 'Day,Week,Month,Quarter,Year,Period'; - ToolTip = 'Specifies by which period amounts are displayed.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - field(AmountType; AmountType) - { - ApplicationArea = Basic, Suite; - Caption = 'View as'; - OptionCaption = 'Net Change,Balance at Date'; - ToolTip = 'Specifies how amounts are displayed. Net Change: The net change in the balance for the selected period. Balance at Date: The balance as of the last day in the selected period.'; - - trigger OnValidate() - begin - UpdateSubForm(); - end; - } - } - part(MaturityLines; "BG/PO Maturity Lines") - { - ApplicationArea = Basic, Suite; - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateSubForm(); - end; - - trigger OnOpenPage() - begin - UpdateSubForm(); - end; - - var - PeriodType: Option Day,Week,Month,Quarter,Year,Period; - AmountType: Option "Net Change","Balance at Date"; - - local procedure UpdateSubForm() - begin - CurrPage.MaturityLines.PAGE.SetReceivable(Rec, PeriodType, AmountType); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN19.Codeunit.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN19.Codeunit.al deleted file mode 100644 index 6200f208d45..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN19.Codeunit.al +++ /dev/null @@ -1,31 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.DirectDebit; - -codeunit 7000092 "Bill group - Export N19" -{ - TableNo = "Direct Debit Collection Entry"; - - trigger OnRun() - var - BillGroup: Record "Bill Group"; - DirectDebitCollection: Record "Direct Debit Collection"; - BillGroupNo: Code[20]; - begin - DirectDebitCollection.Get(Rec.GetRangeMin("Direct Debit Collection No.")); - BillGroupNo := DirectDebitCollection.Identifier; - DirectDebitCollection.Delete(); - if not BillGroup.Get(BillGroupNo) then - Error(ExportDirectDebitErr); - Commit(); - REPORT.Run(REPORT::"Bill group - Export N19", true, false, BillGroup); - end; - - var - ExportDirectDebitErr: Label 'You cannot export the direct debit with the selected SEPA Direct Debit Exp. Format in To Bank Account No.'; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN19.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN19.Report.al deleted file mode 100644 index edadaeef763..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN19.Report.al +++ /dev/null @@ -1,483 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Company; -using Microsoft.Sales.Customer; -using System.IO; - -report 7000092 "Bill group - Export N19" -{ - Caption = 'Bill group - Export N19'; - Permissions = TableData "Bill Group" = m; - ProcessingOnly = true; - - dataset - { - dataitem("Bill Group"; "Bill Group") - { - DataItemTableView = sorting("No.") where(Factoring = const(" ")); - RequestFilterFields = "No."; - dataitem("Cartera Doc."; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where(Type = const(Receivable)); - - trigger OnAfterGetRecord() - begin - DocType := DocMisc.DocType("Payment Method Code"); - - CustLedgEntry.Get("Entry No."); - - Customer.Get(CustLedgEntry."Customer No."); - if not CustBankAcc.Get(CustLedgEntry."Customer No.", "Cust./Vendor Bank Acc. Code") then - Error(Text1100007, - CustBankAcc.TableCaption(), - "Cust./Vendor Bank Acc. Code", - Customer.TableCaption(), - CustLedgEntry."Customer No."); - - CustCCCBankCode := CustBankAcc."CCC Bank No."; - CustCCCBankBranchNo := CustBankAcc."CCC Bank Branch No."; - CustCCCControlDigits := CustBankAcc."CCC Control Digits"; - CustCCCAccNo := CustBankAcc."CCC Bank Account No."; - - if CheckErrors then begin - DocMisc.CheckControlDigit(CustCCCControlDigits, CustCCCBankCode, CustCCCAccNo, CustCCCBankBranchNo); - if (CustBankAcc."CCC Control Digits" <> CustCCCControlDigits) and - (CustCCCControlDigits <> '**') - then begin - CustBankAcc."CCC Control Digits" := CustCCCControlDigits; - CustBankAcc.Modify(); - end; - end; - - if (CustCCCBankCode = '') or (CustCCCBankBranchNo = '') or - (CustCCCControlDigits = '') or (CustCCCAccNo = '') - then begin - CustCCCBankCode := '0000'; - CustCCCBankBranchNo := '0000'; - CustCCCControlDigits := '00'; - CustCCCAccNo := '0000000000'; - end; - - CustAddress[1] := CopyStr(Customer.Name, 1, 30); - CustAddress[2] := CopyStr(Customer.Address, 1, 30); - CustAddress[3] := CopyStr(Customer.City, 1, 30); - CustAddress[4] := CopyStr(Customer."Post Code", 1, 30); - CustNoNIF := Customer."VAT Registration No."; - AdditionalInfo := Text1100008 + "Document No." + '/' + "No."; - AdditionalInfo2 := "Document No." + '/' + "No."; - - if Accepted = Accepted::Yes then - IsAccepted := '1' - else - IsAccepted := '0'; - - TotalDocs := TotalDocs + 1; - TotalDocsCust := TotalDocsCust + 1; - TotalPrintedCust := TotalPrintedCust + 1; - TotalPosted := TotalPosted + 3; - - case true of - LCY = LCY::Euro: - if IsEuro then - DocAmount := EuroAmount("Remaining Amt. (LCY)") - else - DocAmount := ConvertStr(Format("Remaining Amount", 10, Text1100009), ' ', '0'); - LCY = LCY::Other: - if IsEuro then - DocAmount := EuroAmount("Remaining Amount") - else - DocAmount := ConvertStr(Format("Remaining Amount", 10, Text1100009), ' ', '0'); - end; - - RegisterCode2 := RegisterCode + 6; - DLDACurrency(); - - Clear(OutText); - OutText := - RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - PadStr(Format(CustNoNIF), 12, ' ') + PadStr(Format(Customer.Name), 40, ' ') + - ConvertStr(PadStr(CustCCCBankCode, 4, ' '), ' ', '0') + ConvertStr(PadStr(CustCCCBankBranchNo, 4, ' '), ' ', '0') + - PadStr(CustCCCControlDigits, 2, ' ') + ConvertStr(PadStr(CustCCCAccNo, 10, ' '), ' ', '0') + - DocAmount + Text1100010 + PadStr(AdditionalInfo2, 10, ' ') + PadStr(AdditionalInfo, 40, ' ') + PadStr('', 8, ' '); - - OutFile.Write(OutText); - end; - - trigger OnPostDataItem() - begin - Clear(OutText); - TotalPrintedCust := TotalPrintedCust + 1; - - case true of - LCY = LCY::Euro: - if IsEuro then begin - "Bill Group".CalcFields("Amount (LCY)"); - TotalAmount := "Bill Group"."Amount (LCY)" + TotalAmount; - BillGrAmount := EuroAmount("Bill Group"."Amount (LCY)") - end else begin - "Bill Group".CalcFields(Amount); - TotalAmount := "Bill Group".Amount + TotalAmount; - BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100006), ' ', '0') - end; - LCY = LCY::Other: - if IsEuro then begin - "Bill Group".CalcFields(Amount); - TotalAmount := "Bill Group".Amount + TotalAmount; - BillGrAmount := EuroAmount("Bill Group".Amount) - end else begin - "Bill Group".CalcFields(Amount); - TotalAmount := "Bill Group".Amount + TotalAmount; - BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100006), ' ', '0') - end; - end; - - RegisterCode2 := RegisterCode + 8; - DLDACurrency(); - - OutText := - RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + PadStr('', 12, ' ') + - PadStr('', 40, ' ') + PadStr('', 20, ' ') + BillGrAmount + PadStr('', 6, ' ') + - ConvertStr(Format(TotalDocsCust, 10, Text1100006), ' ', '0') + ConvertStr(Format(TotalPrintedCust, 10, Text1100006), ' ', '0') + - PadStr('', 20, ' ') + PadStr('', 18, ' '); - OutFile.Write(OutText); - - TotalDocsCust := 0; - TotalPrinted := TotalPrinted + TotalPrintedCust; - TotalPrintedCust := 0; - end; - } - - trigger OnAfterGetRecord() - begin - BillGrNo := CopyStr("No.", 7, 3); - - CCCBankNo := BankAcc."CCC Bank No."; - CCCBankBranchNo := BankAcc."CCC Bank Branch No."; - CCCControlDigits := BankAcc."CCC Control Digits"; - CCCAccNo := BankAcc."CCC Bank Account No."; - - if (CCCBankNo = '') or (CCCBankBranchNo = '') or - (CCCControlDigits = '') or (CCCAccNo = '') - then - Error(Text1100005, BankAcc."No."); - - RegisterCode2 := RegisterCode + 3; - DLDACurrency(); - - Clear(OutText); - if ChargDate <> 0D then - OutText := - RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - Format(WorkDate(), 6, 5) + Format(ChargDate, 6, 5) + PadStr(CompanyInfo.Name, 40, ' ') + - ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + - ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0') + - PadStr('', 8, ' ') + '01' + PadStr('', 10, ' ') + PadStr('', 40, ' ') + PadStr('', 14, ' ') - else begin - DateMaxEfe := DateMax(); - OutText := - RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - Format(WorkDate(), 6, 5) + Format(DateMaxEfe, 6, 5) + PadStr(CompanyInfo.Name, 40, ' ') + - ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + - ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0') + - PadStr('', 8, ' ') + '01' + PadStr('', 10, ' ') + PadStr('', 40, ' ') + PadStr('', 14, ' '); - end; - OutFile.Write(OutText); - - TotalPrintedCust := TotalPrintedCust + 1; - end; - - trigger OnPostDataItem() - var - FileMgt: Codeunit "File Management"; - begin - "No. Printed" := "No. Printed" + 1; - TotalPrinted := TotalPrinted + 2; - - RegisterCode2 := RegisterCode + 9; - DLDACurrency(); - - if IsEuro then - GeneralTotal := EuroAmount(TotalAmount) - else - GeneralTotal := ConvertStr(Format(TotalAmount, 10, Text1100006), ' ', '0'); - - OutText := - RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + PadStr('', 12, ' ') + - PadStr('', 40, ' ') + '0001' + PadStr('', 16, ' ') + GeneralTotal + PadStr('', 6, ' ') + - ConvertStr(Format(TotalDocs, 10, Text1100006), ' ', '0') + ConvertStr(Format(TotalPrinted, 10, Text1100006), ' ', '0') + - PadStr('', 20, ' ') + PadStr('', 18, ' '); - OutFile.Write(OutText); - OutFile.Close(); - if not SilentMode then - Download(ExternalFile, '', 'C:', Text10701, ToFile) - else - FileMgt.CopyServerFile(ExternalFile, SilentFile, true); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - - Find('-'); - BankAcc.Get("Bank Account No."); - - if BankSuffix = '' then - Error(Text1100000); - - if BankSuffixBankAcc = '' then begin - Suffix.SetRange(Suffix, BankSuffix); - if Suffix.FindFirst() then - BankSuffixBankAcc := Suffix."Bank Acc. Code"; - end; - - if not DocMisc.CheckBankSuffix(BankSuffixBankAcc, "Bank Account No.") then - if not Confirm(Text1100001 + - Text1100002, - false, - FieldCaption("Bank Account No."), - TableCaption) - then - Error(Text1100003); - - IsEuro := DocMisc.GetRegisterCode("Currency Code", RegisterCode, RegisterString); - - RegisterCode2 := RegisterCode + 1; - DLDACurrency(); - - Clear(OutText); - OutText := - RegisterString + '80' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - Format(WorkDate(), 6, 5) + PadStr('', 6, ' ') + - PadStr(CompanyInfo.Name, 40, ' ') + PadStr('', 20, ' ') + ConvertStr(BankAcc."CCC Bank No.", ' ', '0') + - ConvertStr(BankAcc."CCC Bank Branch No.", ' ', '0') + PadStr('', 12, ' ') + PadStr('', 40, ' ') + PadStr('', 14, ' '); - OutFile.Write(OutText); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(ChargDate; ChargDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Charging Date'; - ToolTip = 'Specifies the date you want the bank to make the charge.'; - } - field(CheckErrors; CheckErrors) - { - ApplicationArea = Basic, Suite; - Caption = 'Check Errors'; - ToolTip = 'Specifies if you want error messages when sending the norms to magnetic media.'; - } - field(BankSuffix; BankSuffix) - { - ApplicationArea = Basic, Suite; - Caption = 'Bank Suffix'; - TableRelation = Suffix.Suffix; - ToolTip = 'Specifies the suffix assigned by the bank to manage bill groups. Usually, each bank assigns the company a different suffix for managing bill groups, depending on whether they are receivable or discount management operations.'; - - trigger OnLookup(var Text: Text): Boolean - var - Suffix: Record Suffix; - Suffixes: Page Suffixes; - begin - Suffixes.SetTableView(Suffix); - Suffixes.SetRecord(Suffix); - Suffixes.LookupMode(true); - Suffixes.Editable(false); - if Suffixes.RunModal() = ACTION::LookupOK then begin - Suffixes.GetRecord(Suffix); - BankSuffixBankAcc := Suffix."Bank Acc. Code"; - BankSuffix := Suffix.Suffix; - end; - end; - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - if ExternalFile = '' then - ExternalFile := 'C:\' + Text10702; - end; - } - - labels - { - } - - trigger OnInitReport() - begin - CompanyInfo.Get(); - VATRegNo := CopyStr(DelChr(CompanyInfo."VAT Registration No.", '=', ' .-/'), 1, 9); - SilentMode := false; - end; - - trigger OnPreReport() - var - FileMgt: Codeunit "File Management"; - begin - // IF ChargDate = 0D THEN - // ChargDate:=; - - if WithExpenses then - Expenses := '1' - else - Expenses := '0'; - - if PrintedDocs then - PrintedDocs2 := '0' - else - PrintedDocs2 := '1'; - - OutFile.TextMode := true; - OutFile.WriteMode := true; - ExternalFile := FileMgt.ServerTempFileName(''); - ToFile := Text10702; - OutFile.Create(ExternalFile); - end; - - var - Text1100000: Label 'Bank Suffix cannot be blank.'; - Text1100001: Label 'The Bank Suffix selected belongs to a %1 different than the %2. \'; - Text1100002: Label 'Do you want to continue?.'; - Text1100003: Label 'Process cancelled by request of user.'; - Text1100005: Label 'Some data for Bank Account %1 are missing.'; - Text1100006: Label '', Locked = true; - Text1100007: Label 'There is not %1 %2 for %3 %4.'; - Text1100008: Label 'Bill'; - Text1100009: Label '', Locked = true; - Text1100010: Label 'DEVOL.'; - CompanyInfo: Record "Company Information"; - Customer: Record Customer; - CustLedgEntry: Record "Cust. Ledger Entry"; - BankAcc: Record "Bank Account"; - CustBankAcc: Record "Customer Bank Account"; - DocMisc: Codeunit "Document-Misc"; - OutFile: File; - ExternalFile: Text[1024]; - WithExpenses: Boolean; - PrintedDocs: Boolean; - CheckErrors: Boolean; - VATRegNo: Text[9]; - CCCBankNo: Text[4]; - CustCCCBankCode: Text[4]; - CCCBankBranchNo: Text[4]; - CustCCCBankBranchNo: Text[4]; - CCCControlDigits: Text[2]; - CustCCCControlDigits: Text[2]; - CCCAccNo: Text[10]; - CustCCCAccNo: Text[10]; - BillGrNo: Code[4]; - DocType: Code[1]; - AdditionalInfo: Text[30]; - AdditionalInfo2: Text[30]; - CustAddress: array[4] of Text[50]; - TotalPosted: Decimal; - TotalDocs: Decimal; - TotalDocsCust: Decimal; - TotalPrintedCust: Decimal; - TotalPrinted: Decimal; - TotalAmount: Decimal; - Expenses: Code[1]; - IsAccepted: Code[1]; - PrintedDocs2: Code[1]; - OutText: Text[162]; - ChargDate: Date; - RegisterCode: Integer; - RegisterCode2: Integer; - RegisterString: Text[2]; - DocAmount: Text[10]; - BillGrAmount: Text[10]; - GeneralTotal: Text[10]; - CustNoNIF: Text[30]; - Doc2: Record "Cartera Doc."; - DateMaxEfe: Date; - IsEuro: Boolean; - LCY: Option Euro,Other; - BankSuffix: Code[3]; - BankSuffixBankAcc: Code[20]; - Suffix: Record Suffix; - ToFile: Text[1024]; - Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; - Text10702: Label 'EFECTOS.ASC'; - SilentMode: Boolean; - SilentFile: Text; - - [Scope('OnPrem')] - procedure DLDACurrency() - begin - if StrLen(Format(RegisterCode)) = 1 then - RegisterString := '0' + Format(RegisterCode2) - else - RegisterString := Format(RegisterCode2); - end; - - [Scope('OnPrem')] - procedure EuroAmount(Amount: Decimal): Text[10] - var - TextAmount: Text[15]; - begin - TextAmount := ConvertStr(Format(Amount), ' ', '0'); - if StrPos(TextAmount, ',') = 0 then - TextAmount := TextAmount + '00' - else begin - if StrLen(CopyStr(TextAmount, StrPos(TextAmount, ','), StrLen(TextAmount))) = 2 then - TextAmount := TextAmount + '0'; - TextAmount := DelChr(TextAmount, '=', ','); - end; - if StrPos(TextAmount, '.') = 0 then - TextAmount := TextAmount - else - TextAmount := DelChr(TextAmount, '=', '.'); - - while StrLen(TextAmount) < 10 do - TextAmount := '0' + TextAmount; - - exit(TextAmount); - end; - - [Scope('OnPrem')] - procedure DateMax() Datemax: Date - begin - Doc2.SetRange(Type, 0); - Doc2.SetRange("Bill Gr./Pmt. Order No.", "Bill Group"."No."); - Doc2.Find('-'); - Datemax := Doc2."Due Date"; - repeat - if Datemax < Doc2."Due Date" then - Datemax := Doc2."Due Date"; - until Doc2.Next() = 0; - Doc2.Reset(); - exit(Datemax); - end; - - [Scope('OnPrem')] - procedure EnableSilentMode(FileName: Text) - begin - SilentMode := true; - SilentFile := FileName; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN32.Codeunit.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN32.Codeunit.al deleted file mode 100644 index d73e58b2555..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN32.Codeunit.al +++ /dev/null @@ -1,31 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.DirectDebit; - -codeunit 7000093 "Bill group - Export N32" -{ - TableNo = "Direct Debit Collection Entry"; - - trigger OnRun() - var - BillGroup: Record "Bill Group"; - DirectDebitCollection: Record "Direct Debit Collection"; - BillGroupNo: Code[20]; - begin - DirectDebitCollection.Get(Rec.GetRangeMin("Direct Debit Collection No.")); - BillGroupNo := DirectDebitCollection.Identifier; - DirectDebitCollection.Delete(); - if not BillGroup.Get(BillGroupNo) then - Error(ExportDirectDebitErr); - Commit(); - REPORT.Run(REPORT::"Bill group - Export N32", true, false, BillGroup); - end; - - var - ExportDirectDebitErr: Label 'You cannot export the direct debit with the selected SEPA Direct Debit Exp. Format in To Bank Account No.'; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN32.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN32.Report.al deleted file mode 100644 index 65e103d1b4c..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN32.Report.al +++ /dev/null @@ -1,440 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Company; -using Microsoft.Sales.Customer; -using System.IO; - -report 7000093 "Bill group - Export N32" -{ - Caption = 'Bill group - Export N32'; - Permissions = TableData "Bill Group" = m; - ProcessingOnly = true; - - dataset - { - dataitem("Bill Group"; "Bill Group") - { - DataItemTableView = sorting("No.") where(Factoring = const(" ")); - RequestFilterFields = "No."; - dataitem(Doc; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Receivable)); - - trigger OnAfterGetRecord() - begin - DocNo := CopyStr("Document No.", 1, 10) + '/' + "No."; - - DocType := DocMisc.DocType("Payment Method Code"); - - CustLedgEntry.Get("Entry No."); - - Customer.Get(CustLedgEntry."Customer No."); - if not CustBankAcc.Get(CustLedgEntry."Customer No.", "Cust./Vendor Bank Acc. Code") then - Error(Text1100007); - - Customer2 := CustBankAcc."CCC Bank No."; - CustCCCBankBranchNo := CustBankAcc."CCC Bank Branch No."; - CustCCCControlDigits := CustBankAcc."CCC Control Digits"; - CustCCCAccNo := CustBankAcc."CCC Bank Account No."; - - if (Customer2 = '') or (CustCCCBankBranchNo = '') or - (CustCCCControlDigits = '') or (CustCCCAccNo = '') - then - Error(Text1100008, CustBankAcc."Customer No."); - - CustAddress[1] := Customer.Name; - CustAddress[2] := Customer.Address; - CustAddress[3] := Customer.City; - CustAddress[4] := Customer."Post Code"; - - AdditionalInfo := Text1100009 + "Document No." + '/' + "No."; - - if Accepted = Accepted::Yes then - IsAccepted := '1' - else - IsAccepted := '2'; - - TotalDocs := TotalDocs + 1; - TotalPosted := TotalPosted + 3; - - case true of - LCY = LCY::Euro: - if IsEuro then begin - DocAmount := DelStr(EuroAmount("Remaining Amt. (LCY)"), 1, 1); - TotalAmount := TotalAmount + "Remaining Amt. (LCY)"; - end else begin - DocAmount := ConvertStr(Format("Remaining Amount", 9, Text1100010), ' ', '0'); - TotalAmount := TotalAmount + "Remaining Amount"; - end; - LCY = LCY::Other: - begin - if IsEuro then - DocAmount := DelStr(EuroAmount("Remaining Amount"), 1, 1) - else - DocAmount := ConvertStr(Format("Remaining Amount", 9, Text1100010), ' ', '0'); - TotalAmount := TotalAmount + "Remaining Amount"; - end; - end; - - Clear(OutText); - OutText := - '25' + RegisterString + ' ' + PadStr(DocNo, 15, ' ') + Format(WorkDate(), 6, 5) + PadStr(BillGrNo, 4, '0') + - PadStr(CopyStr(CompanyInfo."Post Code", 1, 2), 2, '0') + PadStr('', 9, ' ') + PadStr(CompanyInfo.City, 20, ' ') + - PadStr('', 25, ' ') + DocAmount + - PadStr('', 15, ' ') + Format("Due Date", 6, 5); - OutFile.Write(OutText); - - Clear(OutText); - OutText := - '26' + RegisterString + ' ' + PadStr(DocNo, 15, ' ') + PadStr('', 2, ' ') + DocType + Format("Bill Group"."Posting Date", 6, 5) + - IsAccepted + Expenses + Customer2 + CustCCCBankBranchNo + CustCCCControlDigits + CustCCCAccNo + - PadStr(CompanyInfo.Name, 34, ' ') + PadStr(CustAddress[1], 34, ' ') + PadStr(AdditionalInfo, 3, ' '); - OutFile.Write(OutText); - - Clear(OutText); - OutText := - '27' + RegisterString + ' ' + PadStr(DocNo, 15, ' ') + PadStr('', 2, ' ') + PadStr(CustAddress[2], 34, ' ') + - PadStr(CustAddress[4], 5, ' ') + PadStr(CustAddress[3], 20, ' ') + PadStr(CustAddress[4], 2, ' '); - OutFile.Write(OutText); - end; - - trigger OnPostDataItem() - begin - case true of - LCY = LCY::Euro: - if IsEuro then begin - "Bill Group".CalcFields("Amount (LCY)"); - BillGrAmount := EuroAmount("Bill Group"."Amount (LCY)") - end else begin - "Bill Group".CalcFields(Amount); - BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100006), ' ', '0') - end; - LCY = LCY::Other: - if IsEuro then begin - "Bill Group".CalcFields(Amount); - BillGrAmount := EuroAmount("Bill Group".Amount) - end else begin - "Bill Group".CalcFields(Amount); - BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100006), ' ', '0') - end; - end; - - TotalPosted := TotalPosted + 2; - Clear(OutText); - OutText := - '71' + RegisterString + ' ' + Format(WorkDate(), 6, 5) + PadStr(BillGrNo, 4, '0') + PadStr('', 59, ' ') + - BillGrAmount + PadStr('', 46, ' ') + - ConvertStr(Format(TotalPosted, 7, Text1100006), ' ', '0') + - ConvertStr(Format(TotalDocs, 6, Text1100006), ' ', '0'); - OutFile.Write(OutText); - - DiskTotalPosted := DiskTotalPosted + TotalPosted; - DiskTotalDocs := DiskTotalDocs + TotalDocs; - end; - - trigger OnPreDataItem() - begin - TotalDocs := 0; - TotalPosted := 0; - end; - } - - trigger OnAfterGetRecord() - begin - if StrLen("No.") <= 4 then - BillGrNo := PadStr("No.", 4, '0') - else - BillGrNo := CopyStr("No.", StrLen("No.") - 3, 4); - - Clear(OutText); - OutText := - '11' + RegisterString + ' ' + Format(WorkDate(), 6, 5) + PadStr(ConvertStr(BillGrNo, ' ', '0'), 4, '0') + - PadStr('', 12, ' ') + PadStr(VATRegNo, 9, ' ') + PadStr(BankSuffix, 6, ' ') + PrintedDocs2 + PadStr('', 21, ' ') + - ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + - ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0') + - ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + - ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0') + - ConvertStr(CCCBankNo, ' ', '0') + ConvertStr(CCCBankBranchNo, ' ', '0') + - ConvertStr(CCCControlDigits, ' ', '0') + ConvertStr(CCCAccNo, ' ', '0'); - OutFile.Write(OutText); - end; - - trigger OnPostDataItem() - var - FileMgt: Codeunit "File Management"; - begin - "No. Printed" := "No. Printed" + 1; - Clear(OutText); - - if IsEuro then - OutText := - '98' + RegisterString + ' ' + PadStr('', 69, ' ') + EuroAmount(TotalAmount) + - PadStr('', 41, ' ') + ConvertStr(Format(TotalBillGr, 5, Text1100006), ' ', '0') + - ConvertStr(Format(DiskTotalPosted + 2, 7, Text1100006), ' ', '0') + - ConvertStr(Format(DiskTotalDocs, 6, Text1100006), ' ', '0') - else - OutText := - '98' + RegisterString + ' ' + PadStr('', 69, ' ') + ConvertStr(Format(TotalAmount, 10, Text1100006), ' ', '0') + - PadStr('', 41, ' ') + ConvertStr(Format(TotalBillGr, 5, Text1100006), ' ', '0') + - ConvertStr(Format(DiskTotalPosted + 2, 7, Text1100006), ' ', '0') + - ConvertStr(Format(DiskTotalDocs, 6, Text1100006), ' ', '0'); - - OutFile.Write(OutText); - OutFile.Close(); - - if SilentMode then - FileMgt.CopyServerFile(ExternalFile, SilentModeFileName, true) - else - Download(ExternalFile, '', 'C:', Text10701, ToFile); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - - Find('-'); - - if BankSuffix = '' then - Error(Text1100000); - - if BankSuffixBankAcc = '' then begin - Suffix.SetRange(Suffix, BankSuffix); - if Suffix.FindFirst() then - BankSuffixBankAcc := Suffix."Bank Acc. Code"; - end; - - IsEuro := DocMisc.GetRegisterCode("Currency Code", TotalBillGr, RegisterString); - - if not DocMisc.CheckBankSuffix(BankSuffixBankAcc, "Bank Account No.") then - if not Confirm(Text1100002 + - Text1100003, - false, - FieldCaption("Bank Account No."), - TableCaption) - then - Error(Text1100004); - - TotalBillGr := Count; - - if StrLen("No.") <= 4 then - DiskNo := PadStr("No.", 4, '0') - else - DiskNo := CopyStr("No.", StrLen("No.") - 3, 4); - - BankAcc.Get("Bank Account No."); - CCCBankNo := BankAcc."CCC Bank No."; - CCCBankBranchNo := BankAcc."CCC Bank Branch No."; - CCCControlDigits := BankAcc."CCC Control Digits"; - CCCAccNo := BankAcc."CCC Bank Account No."; - - if (CCCBankNo = '') or (CCCBankBranchNo = '') or - (CCCControlDigits = '') or (CCCAccNo = '') - then - Error(Text1100005, BankAcc."No."); - - Clear(OutText); - OutText := - '02' + RegisterString + ' ' + Format(WorkDate(), 6, 5) + PadStr(ConvertStr(DiskNo, ' ', '0'), 4, '0') + - PadStr('', 35, ' ') + PadStr(ConvertStr(CCCBankNo, ' ', '0'), 4, '0') + - PadStr(ConvertStr(CCCBankBranchNo, ' ', '0'), 4, '0'); - OutFile.Write(OutText); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(WithExpenses; WithExpenses) - { - ApplicationArea = Basic, Suite; - Caption = 'With Expenses'; - ToolTip = 'Specifies if you want the bills included in the bill group to show expenses. Deselect the check box (default option) when the bills included will be without expenses.'; - } - field(PrintedDocs; PrintedDocs) - { - ApplicationArea = Basic, Suite; - Caption = 'Printed Bills Attached'; - ToolTip = 'Specifies if the printed bill will be attached to the export.'; - } - field(BankSuffix; BankSuffix) - { - ApplicationArea = Basic, Suite; - Caption = 'Bank Suffix'; - TableRelation = Suffix.Suffix; - ToolTip = 'Specifies the suffix assigned by the bank to manage bill groups. Usually, each bank assigns the company a different suffix for managing bill groups, depending on whether they are receivable or discount management operations.'; - - trigger OnLookup(var Text: Text): Boolean - var - Suffix: Record Suffix; - Suffixes: Page Suffixes; - begin - Suffixes.SetTableView(Suffix); - Suffixes.SetRecord(Suffix); - Suffixes.LookupMode(true); - Suffixes.Editable(false); - if Suffixes.RunModal() = ACTION::LookupOK then begin - Suffixes.GetRecord(Suffix); - BankSuffixBankAcc := Suffix."Bank Acc. Code"; - BankSuffix := Suffix.Suffix; - end; - end; - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - if ExternalFile = '' then - ExternalFile := 'C:\' + Text10702; - end; - } - - labels - { - } - - trigger OnInitReport() - begin - CompanyInfo.Get(); - VATRegNo := CopyStr(DelChr(CompanyInfo."VAT Registration No.", '=', ' .-/'), 1, 9); - end; - - trigger OnPreReport() - var - FileMgt: Codeunit "File Management"; - begin - if WithExpenses then - Expenses := '1' - else - Expenses := '0'; - - if PrintedDocs then - PrintedDocs2 := '0' - else - PrintedDocs2 := '1'; - - OutFile.TextMode := true; - OutFile.WriteMode := true; - ExternalFile := FileMgt.ServerTempFileName(''); - ToFile := Text10702; - OutFile.Create(ExternalFile); - - TotalAmount := 0; - DiskTotalPosted := 0; - DiskTotalDocs := 0; - end; - - var - Text1100000: Label 'Bank Suffix cannot be blank.'; - Text1100002: Label 'The Bank Suffix selected belongs to a %1 different than the %2. \'; - Text1100003: Label 'Do you want to continue?.'; - Text1100004: Label 'Process cancelled by request of user.'; - Text1100005: Label 'Some data for Bank Account %1 are missing.'; - Text1100006: Label '', Locked = true; - Text1100007: Label 'There is no bank account information for Customer %1.'; - Text1100008: Label 'Some data from the Bank Account of Customer %1 are missing.'; - Text1100009: Label 'Bill'; - Text1100010: Label '', Locked = true; - CompanyInfo: Record "Company Information"; - Customer: Record Customer; - CustLedgEntry: Record "Cust. Ledger Entry"; - BankAcc: Record "Bank Account"; - CustBankAcc: Record "Customer Bank Account"; - DocMisc: Codeunit "Document-Misc"; - OutFile: File; - ExternalFile: Text[1024]; - WithExpenses: Boolean; - PrintedDocs: Boolean; - VATRegNo: Text[9]; - CCCBankNo: Text[4]; - Customer2: Text[4]; - CCCBankBranchNo: Text[4]; - CustCCCBankBranchNo: Text[4]; - CCCControlDigits: Text[2]; - CustCCCControlDigits: Text[2]; - CCCAccNo: Text[10]; - CustCCCAccNo: Text[10]; - DiskNo: Code[4]; - BillGrNo: Code[4]; - DocNo: Code[15]; - DocType: Code[1]; - AdditionalInfo: Text[30]; - CustAddress: array[4] of Text[100]; - TotalBillGr: Integer; - TotalPosted: Integer; - TotalDocs: Integer; - DiskTotalPosted: Integer; - DiskTotalDocs: Integer; - TotalAmount: Decimal; - DocAmount: Text[10]; - BillGrAmount: Text[10]; - Expenses: Code[1]; - IsAccepted: Code[1]; - PrintedDocs2: Code[1]; - OutText: Text[150]; - RegisterString: Text[2]; - IsEuro: Boolean; - LCY: Option Euro,Other; - BankSuffix: Code[3]; - BankSuffixBankAcc: Code[20]; - Suffix: Record Suffix; - ToFile: Text[1024]; - Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; - Text10702: Label 'EFECTOS.ASC'; - SilentMode: Boolean; - SilentModeFileName: Text; - - [Scope('OnPrem')] - procedure EuroAmount(Amount: Decimal): Text[10] - var - TextAmount: Text[15]; - begin - TextAmount := ConvertStr(Format(Amount), ' ', '0'); - if StrPos(TextAmount, ',') = 0 then - TextAmount := TextAmount + '00' - else begin - if StrLen(CopyStr(TextAmount, StrPos(TextAmount, ','), StrLen(TextAmount))) = 2 then - TextAmount := TextAmount + '0'; - TextAmount := DelChr(TextAmount, '=', ','); - end; - - if StrPos(TextAmount, '.') = 0 then - TextAmount := TextAmount - else - TextAmount := DelChr(TextAmount, '=', '.'); - - while StrLen(TextAmount) < 10 do - TextAmount := '0' + TextAmount; - - exit(TextAmount); - end; - - [Scope('OnPrem')] - procedure EnableSilentMode(FileName: Text) - begin - SilentMode := true; - SilentModeFileName := FileName; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN58.Codeunit.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN58.Codeunit.al deleted file mode 100644 index 8f2c69f87c4..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN58.Codeunit.al +++ /dev/null @@ -1,31 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.DirectDebit; - -codeunit 7000091 "Bill group - Export N58" -{ - TableNo = "Direct Debit Collection Entry"; - - trigger OnRun() - var - BillGroup: Record "Bill Group"; - DirectDebitCollection: Record "Direct Debit Collection"; - BillGroupNo: Code[20]; - begin - DirectDebitCollection.Get(Rec.GetRangeMin("Direct Debit Collection No.")); - BillGroupNo := DirectDebitCollection.Identifier; - DirectDebitCollection.Delete(); - if not BillGroup.Get(BillGroupNo) then - Error(ExportDirectDebitErr); - Commit(); - REPORT.Run(REPORT::"Bill group - Export N58", true, false, BillGroup); - end; - - var - ExportDirectDebitErr: Label 'You cannot export the direct debit with the selected SEPA Direct Debit Exp. Format in To Bank Account No.'; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN58.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN58.Report.al deleted file mode 100644 index a97cdca99a0..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportN58.Report.al +++ /dev/null @@ -1,470 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Foundation.Company; -using Microsoft.Sales.Customer; -using System.IO; - -report 7000091 "Bill group - Export N58" -{ - Caption = 'Bill group - Export N58'; - Permissions = TableData "Bill Group" = m; - ProcessingOnly = true; - - dataset - { - dataitem("Bill Group"; "Bill Group") - { - DataItemTableView = sorting("No.") where(Factoring = const(" ")); - RequestFilterFields = "No."; - dataitem(Doc; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where(Type = const(Receivable)); - - trigger OnAfterGetRecord() - begin - DocType := DocMisc.DocType("Payment Method Code"); - - CustLedgEntry.Get("Entry No."); - - Customer.Get(CustLedgEntry."Customer No."); - if not CustBankAcc.Get(CustLedgEntry."Customer No.", "Cust./Vendor Bank Acc. Code") then begin - CustCCCBankCode := '0000'; - CustCCCBankBranchNo := '0000'; - CustCCCControlDigits := '00'; - CustCCCAccNo := '0000000000'; - NotDom := true; - end else begin - CustCCCBankCode := CustBankAcc."CCC Bank No."; - CustCCCBankBranchNo := CustBankAcc."CCC Bank Branch No."; - CustCCCControlDigits := CustBankAcc."CCC Control Digits"; - CustCCCAccNo := CustBankAcc."CCC Bank Account No."; - NotDom := false; - if Checkerrors then begin - DocMisc.CheckControlDigit(CustCCCControlDigits, CustCCCBankCode, CustCCCAccNo, CustCCCBankBranchNo); - if (CustBankAcc."CCC Control Digits" <> CustCCCControlDigits) and (CustCCCControlDigits <> '**') then begin - CustBankAcc."CCC Control Digits" := CustCCCControlDigits; - CustBankAcc.Modify(); - end; - end; - end; - - if (CustCCCBankCode = '') or (CustCCCBankBranchNo = '') or - (CustCCCControlDigits = '') or (CustCCCAccNo = '') - then begin - CustCCCBankCode := '0000'; - CustCCCBankBranchNo := '0000'; - CustCCCControlDigits := '00'; - CustCCCAccNo := '0000000000'; - NotDom := true; - end; - - CustAddress[1] := Customer.Name; - CustAddress[2] := Customer.Address; - CustAddress[3] := Customer.City; - CustAddress[4] := Customer."Post Code"; - CustNoNIF := Customer."VAT Registration No."; - AdditionalInfo := Text1100008 + "Document No." + '/' + "No."; - AdditionalInfo2 := "Document No." + '/' + "No."; - - if Accepted = Accepted::Yes then - IsAccepted := '1' - else - IsAccepted := '0'; - - TotalDoc := TotalDoc + 1; - TotalDocsCust := TotalDocsCust + 1; - TotalPrintedCust := TotalPrintedCust + 1; - TotalPosted := TotalPosted + 3; - - case true of - LCY = LCY::Euro: - if IsEuro then - DocAmount := EuroAmount("Remaining Amt. (LCY)") - else - DocAmount := ConvertStr(Format("Remaining Amount", 10, Text1100006), ' ', '0'); - LCY = LCY::Other: - if IsEuro then - DocAmount := EuroAmount("Remaining Amount") - else - DocAmount := ConvertStr(Format("Remaining Amount", 10, Text1100006), ' ', '0'); - end; - - RegisterCode2 := RegisterCode + 6; - DLDACurrency(); - - Clear(OutText); - OutText := - RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - PadStr(Format(CustNoNIF), 12, ' ') + - PadStr(Format(Customer.Name), 40, ' ') + ConvertStr(PadStr(CustCCCBankCode, 4, ' '), ' ', '0') + - ConvertStr(PadStr(CustCCCBankBranchNo, 4, ' '), ' ', '0') + PadStr(CustCCCControlDigits, 2, ' ') + - ConvertStr(PadStr(CustCCCAccNo, 10, ' '), ' ', '0') + DocAmount + - Text1100009 + PadStr(AdditionalInfo2, 10, ' ') + PadStr(AdditionalInfo, 40, ' ') + - Format("Due Date", 6, 5) + PadStr('', 2, ' '); - - OutFile.Write(OutText); - PostalCode.Get(CompanyInfo."Post Code", CompanyInfo.City); - - if NotDom then begin - Clear(OutText); - OutText := - RegisterString + '76' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - PadStr(Format(CustNoNIF), 12, ' ') + PadStr(CustAddress[2], 40, ' ') + - PadStr(CustAddress[3], 35, ' ') + PadStr(CustAddress[4], 8, '0') + - PadStr(CompanyInfo.City, 35, ' ') + CopyStr(PostalCode."County Code", 1, 2) + - Format("Bill Group"."Posting Date", 6, 5) + PadStr('', 8, ' '); - - OutFile.Write(OutText); - TotalPrintedCust := TotalPrintedCust + 1; - end; - end; - - trigger OnPostDataItem() - begin - Clear(OutText); - TotalPrintedCust := TotalPrintedCust + 1; - - case true of - LCY = LCY::Euro: - if IsEuro then begin - "Bill Group".CalcFields("Amount (LCY)"); - TotalAmount := "Bill Group"."Amount (LCY)" + TotalAmount; - BillGrAmount := EuroAmount("Bill Group"."Amount (LCY)") - end else begin - "Bill Group".CalcFields(Amount); - TotalAmount := "Bill Group".Amount + TotalAmount; - BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100007), ' ', '0') - end; - LCY = LCY::Other: - if IsEuro then begin - "Bill Group".CalcFields(Amount); - TotalAmount := "Bill Group".Amount + TotalAmount; - BillGrAmount := EuroAmount("Bill Group".Amount) - end else begin - "Bill Group".CalcFields(Amount); - TotalAmount := "Bill Group".Amount + TotalAmount; - BillGrAmount := ConvertStr(Format("Bill Group".Amount, 10, Text1100007), ' ', '0') - end; - end; - - RegisterCode2 := RegisterCode + 8; - DLDACurrency(); - - OutText := - RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - PadStr('', 12, ' ') + PadStr('', 40, ' ') + - PadStr('', 20, ' ') + BillGrAmount + PadStr('', 6, ' ') + ConvertStr(Format(TotalDocsCust, 10, Text1100007), ' ', '0') + - ConvertStr(Format(TotalPrintedCust, 10, Text1100007), ' ', '0') + PadStr('', 20, ' ') + PadStr('', 18, ' '); - OutFile.Write(OutText); - - TotalDocsCust := 0; - TotalPrinted := TotalPrinted + TotalPrintedCust; - TotalPrintedCust := 0; - end; - } - - trigger OnAfterGetRecord() - begin - BillGrNo := CopyStr("No.", 7, 3); - - RegisterCode2 := RegisterCode + 3; - DLDACurrency(); - - Clear(OutText); - OutText := - RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - Format(WorkDate(), 6, 5) + PadStr('', 6, ' ') + - PadStr(CompanyInfo.Name, 40, ' ') + ConvertStr(CCCBankNo, ' ', '0') + - ConvertStr(CCCBankBranchNo, ' ', '0') + ConvertStr(CCCControlDigits, ' ', '0') + - ConvertStr(CCCAccNo, ' ', '0') + PadStr('', 8, ' ') + '06' + PadStr('', 10, ' ') + - PadStr('', 40, ' ') + PadStr('', 2, ' ') + '000000000' + PadStr('', 3, ' '); - OutFile.Write(OutText); - - TotalPrintedCust := TotalPrintedCust + 1; - end; - - trigger OnPostDataItem() - var - FileMgt: Codeunit "File Management"; - begin - "No. Printed" := "No. Printed" + 1; - TotalPrinted := TotalPrinted + 2; - - RegisterCode2 := RegisterCode + 9; - DLDACurrency(); - - if IsEuro then - OutText := - RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - PadStr('', 12, ' ') + PadStr('', 40, ' ') + - '0001' + PadStr('', 16, ' ') + EuroAmount(TotalAmount) + PadStr('', 6, ' ') + - ConvertStr(Format(TotalDoc, 10, Text1100006), ' ', '0') + ConvertStr(Format(TotalPrinted, 10, Text1100006), ' ', '0') + - PadStr('', 20, ' ') + PadStr('', 18, ' ') - else - OutText := - RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - PadStr('', 12, ' ') + PadStr('', 40, ' ') + - '0001' + PadStr('', 16, ' ') + ConvertStr(Format(TotalAmount, 10, Text1100007), ' ', '0') + PadStr('', 6, ' ') + - ConvertStr(Format(TotalDoc, 10, Text1100007), ' ', '0') + ConvertStr(Format(TotalPrinted, 10, Text1100007), ' ', '0') + - PadStr('', 20, ' ') + PadStr('', 18, ' '); - - OutFile.Write(OutText); - OutFile.Close(); - - if SilentMode then - FileMgt.CopyServerFile(ExternalFile, SilentModeFileName, true) - else - Download(ExternalFile, '', 'C:', Text10701, ToFile); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - - Find('-'); - - if BankSuffix = '' then - Error(Text1100000); - - if BankSuffixBankAcc = '' then begin - Suffix.SetRange(Suffix, BankSuffix); - if Suffix.FindFirst() then - BankSuffixBankAcc := Suffix."Bank Acc. Code"; - end; - - if not DocMisc.CheckBankSuffix(BankSuffixBankAcc, "Bank Account No.") then - if not Confirm(Text1100001 + - Text1100002, - false, - FieldCaption("Bank Account No."), - TableCaption) - then - Error(Text1100003); - - BankAcc.Get("Bank Account No."); - CCCBankNo := BankAcc."CCC Bank No."; - CCCBankBranchNo := BankAcc."CCC Bank Branch No."; - CCCControlDigits := BankAcc."CCC Control Digits"; - CCCAccNo := BankAcc."CCC Bank Account No."; - - if (CCCBankNo = '') or (CCCBankBranchNo = '') or - (CCCControlDigits = '') or (CCCAccNo = '') - then - Error(Text1100004, BankAcc."No."); - - IsEuro := DocMisc.GetRegisterCode("Currency Code", RegisterCode, RegisterString); - - RegisterCode2 := RegisterCode + 1; - DLDACurrency(); - - Clear(OutText); - OutText := - RegisterString + '70' + Format(CompanyInfo."VAT Registration No.", 9) + PadStr(BankSuffix, 3, ' ') + - Format(WorkDate(), 6, 5) + PadStr('', 6, ' ') + - PadStr(CompanyInfo.Name, 40, ' ') + PadStr('', 20, ' ') + ConvertStr(BankAcc."CCC Bank No.", ' ', '0') + - ConvertStr(BankAcc."CCC Bank Branch No.", ' ', '0') + PadStr('', 12, ' ') + PadStr('', 40, ' ') + PadStr('', 14, ' '); - OutFile.Write(OutText); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CheckErrors; Checkerrors) - { - ApplicationArea = Basic, Suite; - Caption = 'Check Errors'; - ToolTip = 'Specifies if you want error messages when sending the norms to magnetic media.'; - } - field(BankSuffix; BankSuffix) - { - ApplicationArea = Basic, Suite; - Caption = 'Bank Suffix'; - TableRelation = Suffix.Suffix; - ToolTip = 'Specifies the suffix assigned by the bank to manage bill groups. Usually, each bank assigns the company a different suffix for managing bill groups, depending on whether they are receivable or discount management operations.'; - - trigger OnLookup(var Text: Text): Boolean - var - Suffix: Record Suffix; - Suffixes: Page Suffixes; - begin - Suffixes.SetTableView(Suffix); - Suffixes.SetRecord(Suffix); - Suffixes.LookupMode(true); - Suffixes.Editable(false); - if Suffixes.RunModal() = ACTION::LookupOK then begin - Suffixes.GetRecord(Suffix); - BankSuffixBankAcc := Suffix."Bank Acc. Code"; - BankSuffix := Suffix.Suffix; - end; - end; - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - if ExternalFile = '' then - ExternalFile := 'C:\' + Text10702; - end; - } - - labels - { - } - - trigger OnInitReport() - begin - CompanyInfo.Get(); - VATRegNo := CopyStr(DelChr(CompanyInfo."VAT Registration No.", '=', ' .-/'), 1, 9); - SilentMode := false; - end; - - trigger OnPreReport() - var - FileMgt: Codeunit "File Management"; - begin - if WithExpenses then - Expenses := '1' - else - Expenses := '0'; - - if PrintedDocs then - PrintedDocs2 := '0' - else - PrintedDocs2 := '1'; - - OutFile.TextMode := true; - OutFile.WriteMode := true; - ExternalFile := FileMgt.ServerTempFileName(''); - ToFile := Text10702; - OutFile.Create(ExternalFile); - end; - - var - Text1100000: Label 'Bank Suffix cannot be blank.'; - Text1100001: Label 'The Bank Suffix selected belongs to a %1 different than the %2. \'; - Text1100002: Label 'Do you want to continue?.'; - Text1100003: Label 'Process cancelled by request of user.'; - Text1100004: Label 'Some data for Bank Account %1 are missing.'; - Text1100006: Label '', Locked = true; - Text1100007: Label '', Locked = true; - Text1100008: Label 'Bill'; - Text1100009: Label 'DEVOL.'; - CompanyInfo: Record "Company Information"; - Customer: Record Customer; - CustLedgEntry: Record "Cust. Ledger Entry"; - BankAcc: Record "Bank Account"; - CustBankAcc: Record "Customer Bank Account"; - PostalCode: Record "Post Code"; - DocMisc: Codeunit "Document-Misc"; - OutFile: File; - ExternalFile: Text[1024]; - WithExpenses: Boolean; - PrintedDocs: Boolean; - Checkerrors: Boolean; - NotDom: Boolean; - VATRegNo: Text[9]; - CCCBankNo: Text[4]; - CustCCCBankCode: Text[4]; - CCCBankBranchNo: Text[4]; - CustCCCBankBranchNo: Text[4]; - CCCControlDigits: Text[2]; - CustCCCControlDigits: Text[2]; - CCCAccNo: Text[10]; - CustCCCAccNo: Text[10]; - BillGrNo: Code[4]; - DocType: Code[1]; - AdditionalInfo: Text[30]; - AdditionalInfo2: Text[30]; - CustAddress: array[4] of Text[100]; - TotalPosted: Decimal; - TotalDoc: Decimal; - TotalDocsCust: Decimal; - TotalPrintedCust: Decimal; - TotalPrinted: Decimal; - TotalAmount: Decimal; - Expenses: Code[1]; - IsAccepted: Code[1]; - PrintedDocs2: Code[1]; - OutText: Text[162]; - RegisterCode: Integer; - RegisterCode2: Integer; - RegisterString: Text[2]; - DocAmount: Text[10]; - BillGrAmount: Text[10]; - CustNoNIF: Text[20]; - IsEuro: Boolean; - LCY: Option Euro,Other; - BankSuffix: Code[3]; - BankSuffixBankAcc: Code[20]; - Suffix: Record Suffix; - ToFile: Text[1024]; - Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; - Text10702: Label 'EFECTOS.ASC'; - SilentMode: Boolean; - SilentModeFileName: Text; - - [Scope('OnPrem')] - procedure DLDACurrency() - begin - if StrLen(Format(RegisterCode)) = 1 then - RegisterString := '0' + Format(RegisterCode2) - else - RegisterString := Format(RegisterCode2); - end; - - [Scope('OnPrem')] - procedure EuroAmount(Amount: Decimal): Text[10] - var - TextAmount: Text[15]; - begin - TextAmount := ConvertStr(Format(Amount), ' ', '0'); - if StrPos(TextAmount, ',') = 0 then - TextAmount := TextAmount + '00' - else begin - if StrLen(CopyStr(TextAmount, StrPos(TextAmount, ','), StrLen(TextAmount))) = 2 then - TextAmount := TextAmount + '0'; - TextAmount := DelChr(TextAmount, '=', ','); - end; - if StrPos(TextAmount, '.') = 0 then - TextAmount := TextAmount - else - TextAmount := DelChr(TextAmount, '=', '.'); - - while StrLen(TextAmount) < 10 do - TextAmount := '0' + TextAmount; - - exit(TextAmount); - end; - - [Scope('OnPrem')] - procedure EnableSilentMode(FileName: Text) - begin - SilentMode := true; - SilentModeFileName := FileName; - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportfactoring.Codeunit.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportfactoring.Codeunit.al deleted file mode 100644 index d82f9bed4ff..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportfactoring.Codeunit.al +++ /dev/null @@ -1,31 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.DirectDebit; - -codeunit 7000089 "Bill group - Export factoring" -{ - TableNo = "Direct Debit Collection Entry"; - - trigger OnRun() - var - BillGroup: Record "Bill Group"; - DirectDebitCollection: Record "Direct Debit Collection"; - BillGroupNo: Code[20]; - begin - DirectDebitCollection.Get(Rec.GetRangeMin("Direct Debit Collection No.")); - BillGroupNo := DirectDebitCollection.Identifier; - DirectDebitCollection.Delete(); - if not BillGroup.Get(BillGroupNo) then - Error(ExportDirectDebitErr); - Commit(); - REPORT.Run(REPORT::"Bill group - Export factoring", true, false, BillGroup); - end; - - var - ExportDirectDebitErr: Label 'You cannot export the direct debit with the selected SEPA Direct Debit Exp. Format in To Bank Account No.'; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportfactoring.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportfactoring.Report.al deleted file mode 100644 index 209b61768cd..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/BillgroupExportfactoring.Report.al +++ /dev/null @@ -1,303 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.GeneralLedger.Setup; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Company; -using Microsoft.Sales.Customer; -using System.IO; - -report 7000089 "Bill group - Export factoring" -{ - ApplicationArea = Basic, Suite; - Caption = 'Bill group - Export factoring'; - Permissions = TableData "Bill Group" = m; - ProcessingOnly = true; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem("Bill Group"; "Bill Group") - { - RequestFilterFields = "No."; - dataitem("Cartera Doc."; "Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemTableView = sorting(Type, "Bill Gr./Pmt. Order No.", "Collection Agent", "Due Date", "Global Dimension 1 Code", "Global Dimension 2 Code", "Category Code", "Posting Date", "Document No.", Accepted, "Currency Code", "Document Type"); - - trigger OnAfterGetRecord() - begin - TestField("Account No."); - Customer.Get("Account No."); - if "Document Type" = "Document Type"::Invoice then begin - TotalDocCust := TotalDocCust + 1; - if PaymentMethod.Get("Payment Method Code") then - DocType := ' ' - else - case PaymentMethod."Bill Type" of - "ES Bill Type"::"Bill of Exchange": - DocType := Text1100009; - "ES Bill Type"::Receipt: - DocType := Text1100010; - "ES Bill Type"::IOU: - DocType := Text1100011; - "ES Bill Type"::Check: - DocType := Text1100012; - "ES Bill Type"::Transfer: - DocType := Text1100013; - else - DocType := ' '; - end; - - RmgAmount := FormatNumber(Round("Remaining Amount" * 100, 1), 15); - - TotalAmount := TotalAmount + "Remaining Amount"; - CustPostCode := DelStr(Customer."Post Code", 1, StrPos(Customer."Post Code", '-')); - - GetCurrencyCode("Cartera Doc.", CurrCode); - - OutText := '09' + PadStr('', 5, '0') + PadStr(Customer.Name, 30, ' ') + PadStr(Customer."VAT Registration No.", 14, ' ') - + PadStr(Customer.Address, 30, ' ') + PadStr(Customer.City, 30, ' ') + - (PadStr('', 5 - StrLen(CustPostCode), '0') + CustPostCode) + Text1100014 + PadStr("Document No.", 10, ' ') + PadStr('', 10, ' ') + - Format("Posting Date", 0, Text1100007) - + Format("Due Date", 0, Text1100007) + RmgAmount + PadStr('', 2, '0') + PadStr('', 2, '0') + PadStr('', 2, '0') - + CCCBankNo + CCCBankBranchNo + CCCAccNo + DocType + PadStr("Account No.", 15, ' ') + CCCControlDigits - + Text1100015 + CurrCode + PadStr('', 21, ' '); - OutFile.Write(OutText); - end; - end; - } - - trigger OnAfterGetRecord() - begin - if Factoring = Factoring::" " then - Error(Text1100005, "No."); - - TestField("Bank Account No."); - BankAcc.Get("Bank Account No."); - - CCCBankNo := BankAcc."CCC Bank No."; - CCCBankBranchNo := BankAcc."CCC Bank Branch No."; - CCCAccNo := BankAcc."CCC Bank Account No."; - CCCControlDigits := BankAcc."CCC Control Digits"; - - if (CCCBankNo = '') or (CCCBankBranchNo = '') or - (CCCControlDigits = '') or (CCCAccNo = '') - then - Error(Text1100006, BankAcc."No."); - - CCCBankNo := PadStr('', MaxStrLen(CCCBankNo) - StrLen(CCCBankNo), '0') + CCCBankNo; - CCCBankBranchNo := PadStr('', MaxStrLen(CCCBankBranchNo) - StrLen(CCCBankBranchNo), '0') + CCCBankBranchNo; - CCCAccNo := PadStr('', MaxStrLen(CCCAccNo) - StrLen(CCCAccNo), '0') + CCCAccNo; - if CCCControlDigits = '' then - CCCControlDigits := PadStr('', MaxStrLen(CCCControlDigits), ' ') - else - CCCControlDigits := PadStr('', MaxStrLen(CCCControlDigits) - StrLen(CCCControlDigits), '0') + CCCControlDigits; - - NoBillGroup := NoBillGroup + 1; - - OutText := '06' + (PadStr('', 5 - StrLen(Format(NoBillGroup)), '0') + Format(NoBillGroup)) - + Format("Posting Date", 0, Text1100007) + PadStr('', 219, ' '); - OutFile.Write(OutText); - end; - - trigger OnPostDataItem() - var - FileManagement: Codeunit "File Management"; - begin - TotalRmgAmount := FormatNumber(Round(TotalAmount * 100, 1), 15); - - OutText := '66' + (PadStr('', 4 - StrLen(Format(TotalDocCust)), '0') + Format(TotalDocCust)) - + PadStr('', 4, '0') + TotalRmgAmount + PadStr('', 15, '0') + PadStr('', 192, ' '); - OutFile.Write(OutText); - - OutText := '99' + (PadStr('', 4 - StrLen(Format(NoBillGroup)), '0') + Format(NoBillGroup)) + - PadStr('', 226, ' '); - OutFile.Write(OutText); - - OutFile.Close(); - - if SilentMode then - FileManagement.CopyServerFile(ExternalFile, SilentModeFile, true) - else - Download(ExternalFile, '', 'C:', Text10701, ToFile); - end; - - trigger OnPreDataItem() - begin - if BankSuffix = '' then - Error(Text1100000); - - if not DocMisc.CheckBankSuffix(BankSuffixBankAcc, "Bank Account No.") then - if not Confirm(Text1100001 + - Text1100002, - false, - FieldCaption("Bank Account No."), - TableCaption) - then - Error(Text1100003); - - OutText := '03' + PadStr(BankSuffix, 5, '0') + NameCompany + Format(DeliveryDate, 0, Text1100004) + PadStr('', 189, ' '); - OutFile.Write(OutText); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(DeliveryDate; DeliveryDate) - { - ApplicationArea = Basic, Suite; - Caption = 'Delivery date'; - ToolTip = 'Specifies a number to identify the operations declaration.'; - } - field(BankSuffix; BankSuffix) - { - ApplicationArea = Basic, Suite; - Caption = 'Bank Suffix'; - TableRelation = Suffix.Suffix; - ToolTip = 'Specifies the suffix assigned by the bank to manage bill groups. Usually, each bank assigns the company a different suffix for managing bill groups, depending on whether they are receivable or discount management operations.'; - - trigger OnLookup(var Text: Text): Boolean - var - Suffix: Record Suffix; - Suffixes: Page Suffixes; - begin - Suffixes.SetTableView(Suffix); - Suffixes.SetRecord(Suffix); - Suffixes.LookupMode(true); - Suffixes.Editable(false); - if Suffixes.RunModal() = ACTION::LookupOK then begin - Suffixes.GetRecord(Suffix); - BankSuffixBankAcc := Suffix."Bank Acc. Code"; - BankSuffix := Suffix.Suffix; - end; - end; - } - } - } - } - - actions - { - } - - trigger OnOpenPage() - begin - if ExternalFile = '' then - ExternalFile := 'C:\' + Text10702; - if DeliveryDate = 0D then - DeliveryDate := Today; - "Bill Group".SetFilter(Factoring, '<>%1', "Bill Group".Factoring::" "); - end; - } - - labels - { - } - - trigger OnInitReport() - begin - CompanyInfo.Get(); - CompanyInfo.TestField("VAT Registration No."); - NameCompany := CompanyInfo.Name; - NameCompany := PadStr(NameCompany, 30, ' '); - end; - - trigger OnPreReport() - var - FileMgt: Codeunit "File Management"; - begin - OutFile.TextMode := true; - OutFile.WriteMode := true; - ExternalFile := FileMgt.ServerTempFileName(''); - ToFile := Text10702; - OutFile.Create(ExternalFile); - end; - - var - Text1100000: Label 'Bank Suffix cannot be blank.'; - Text1100001: Label 'The Bank Suffix selected belongs to a %1 different than the %2. \'; - Text1100002: Label 'Do you want to continue?.'; - Text1100003: Label 'Process cancelled by request of user.'; - Text1100004: Label '', Locked = true; - Text1100005: Label 'Bill Group %1 cannot be sent to factoring'; - Text1100006: Label 'Some data for Bank Account %1 are missing.'; - Text1100007: Label '', Locked = true; - Text1100009: Label 'B'; - Text1100010: Label 'R'; - Text1100011: Label 'I'; - Text1100012: Label 'C'; - Text1100013: Label 'T'; - Text1100014: Label 'F'; - Text1100015: Label 'ES'; - CompanyInfo: Record "Company Information"; - Customer: Record Customer; - BankAcc: Record "Bank Account"; - PaymentMethod: Record "Payment Method"; - GLSetup: Record "General Ledger Setup"; - DocMisc: Codeunit "Document-Misc"; - OutFile: File; - ExternalFile: Text[1024]; - CCCBankNo: Text[4]; - CCCBankBranchNo: Text[4]; - CCCControlDigits: Text[2]; - CCCAccNo: Text[10]; - TotalDocCust: Integer; - TotalAmount: Decimal; - OutText: Text[250]; - DeliveryDate: Date; - DocType: Text[2]; - RmgAmount: Text[15]; - NameCompany: Text[100]; - NoBillGroup: Integer; - TotalRmgAmount: Text[15]; - CustPostCode: Text[5]; - CurrCode: Text[3]; - BankSuffixBankAcc: Code[10]; - BankSuffix: Code[3]; - ToFile: Text[1024]; - Text10701: Label 'ASC Files (*.asc)|*.asc|All Files (*.*)|*.*'; - Text10702: Label 'FACTORING.ASC'; - SilentMode: Boolean; - SilentModeFile: Text; - - [Scope('OnPrem')] - procedure GetCurrencyCode(Doc: Record "Cartera Doc."; var "Code": Text[3]) - begin - GLSetup.Get(); - if Doc."Currency Code" = '' then - Code := CopyStr(GLSetup."LCY Code", 1, 3) - else - if StrLen(Doc."Currency Code") > 3 then - Code := CopyStr(Doc."Currency Code", 1, 3) - else - Code := PadStr(Doc."Currency Code", 3, ' '); - end; - - [Scope('OnPrem')] - procedure SetSilentMode(ServerFileName: Text) - begin - SilentMode := true; - SilentModeFile := ServerFileName; - end; - - local procedure FormatNumber(Number: Decimal; Length: Integer): Text[15] - begin - exit(ConvertStr(Format(Number, Length, ''), ' ', '0')); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/CarteraReceivStatisticsFB.Page.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/CarteraReceivStatisticsFB.Page.al deleted file mode 100644 index fafeb1594bc..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/CarteraReceivStatisticsFB.Page.al +++ /dev/null @@ -1,435 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Sales.Customer; - -page 35304 "Cartera Receiv. Statistics FB" -{ - Caption = 'Cartera Receiv. Statistics FB'; - Editable = false; - PageType = CardPart; - SourceTable = Customer; - - layout - { - area(content) - { - group("No. of Bills") - { - Caption = 'No. of Bills'; - field("NoOpen[1]"; NoOpen[1]) - { - ApplicationArea = Basic, Suite; - Caption = 'Open Bills'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - } - field("NoOpen[2]"; NoOpen[2]) - { - ApplicationArea = Basic, Suite; - Caption = 'Open Bills in Bill Gr.'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - } - field("NoOpen[3]"; NoOpen[3]) - { - ApplicationArea = Basic, Suite; - Caption = 'Open Bills in Post. Bill Gr.'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - } - field("NoHonored[3]"; NoHonored[3]) - { - ApplicationArea = Basic, Suite; - Caption = 'Hon. Bills in Post. Bill Gr.'; - Editable = false; - ToolTip = 'Specifies settled payments.'; - } - field("NoRejected[3]"; NoRejected[3]) - { - ApplicationArea = Basic, Suite; - Caption = 'Rej. Bills in Post. Bill Gr.'; - Editable = false; - ToolTip = 'Specifies rejected payments.'; - } - field("NoRedrawn[3]"; NoRedrawn[3]) - { - ApplicationArea = Basic, Suite; - Caption = 'Redr. Bills in Post. Bill Gr.'; - Editable = false; - ToolTip = 'Specifies recirculated payments.'; - } - field("NoHonored[4]"; NoHonored[4]) - { - ApplicationArea = Basic, Suite; - Caption = 'Hon. Closed Bills'; - Editable = false; - ToolTip = 'Specifies settled payments.'; - } - field("NoRejected[4]"; NoRejected[4]) - { - ApplicationArea = Basic, Suite; - Caption = 'Rej. Closed Bills'; - Editable = false; - ToolTip = 'Specifies rejected payments.'; - } - } - group("Remaining Amt. (LCY)") - { - Caption = 'Remaining Amt. (LCY)'; - field("OpenRemainingAmtLCY[1]"; OpenRemainingAmtLCY[1]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open Bills'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - - trigger OnDrillDown() - begin - DrillDownOpen(4, 1); // Cartera - end; - } - field("OpenRemainingAmtLCY[2]"; OpenRemainingAmtLCY[2]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open Bills in Bill Gr.'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - - trigger OnDrillDown() - begin - DrillDownOpen(3, 1); // Bill Group; - end; - } - field("OpenRemainingAmtLCY[3]"; OpenRemainingAmtLCY[3]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Open Bills in Post. Bill Gr.'; - Editable = false; - ToolTip = 'Specifies non-processed payments.'; - - trigger OnDrillDown() - begin - DrillDownOpen(1, 1); // Posted Bill Group - end; - } - field("HonoredRemainingAmtLCY[3]"; HonoredRemainingAmtLCY[3]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Hon. Bills in Post. Bill Gr.'; - Editable = false; - ToolTip = 'Specifies settled payments.'; - - trigger OnDrillDown() - begin - DrillDownHonored(1, 1); // Posted Bill Group - end; - } - field("RejectedRemainingAmtLCY[3]"; RejectedRemainingAmtLCY[3]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rej. Bills in Post. Bill Gr.'; - Editable = false; - ToolTip = 'Specifies rejected payments.'; - - trigger OnDrillDown() - begin - DrillDownRejected(1, 1); // Posted Bill Group - end; - } - field("RedrawnRemainingAmtLCY[3]"; RedrawnRemainingAmtLCY[3]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Redr. Bills in Post. Bill Gr.'; - Editable = false; - ToolTip = 'Specifies recirculated payments.'; - - trigger OnDrillDown() - begin - DrillDownRedrawn(1, 1); // Posted Bill Group - end; - } - field("HonoredRemainingAmtLCY[4]"; HonoredRemainingAmtLCY[4]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Hon. Closed Bills'; - Editable = false; - ToolTip = 'Specifies settled payments.'; - - trigger OnDrillDown() - begin - DrillDownHonored(5, 1); // Closed Bills - end; - } - field("RejectedRemainingAmtLCY[4]"; RejectedRemainingAmtLCY[4]) - { - ApplicationArea = Basic, Suite; - AutoFormatType = 1; - AutoFormatExpression = ''; - Caption = 'Rej. Closed Bills'; - Editable = false; - ToolTip = 'Specifies rejected payments.'; - - trigger OnDrillDown() - begin - DrillDownRejected(5, 1); // Closed Bills - end; - } - } - } - } - - actions - { - } - - trigger OnAfterGetRecord() - begin - UpdateDocStatistics(); - end; - - var - DocumentSituationFilter: array[3] of Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; - NoOpen: array[5] of Integer; - NoHonored: array[5] of Integer; - NoRejected: array[5] of Integer; - NoRedrawn: array[5] of Integer; - OpenAmtLCY: array[5] of Decimal; - HonoredAmtLCY: array[5] of Decimal; - RejectedAmtLCY: array[5] of Decimal; - RedrawnAmtLCY: array[5] of Decimal; - OpenRemainingAmtLCY: array[5] of Decimal; - RejectedRemainingAmtLCY: array[5] of Decimal; - HonoredRemainingAmtLCY: array[5] of Decimal; - RedrawnRemainingAmtLCY: array[5] of Decimal; - j: Integer; - - [Scope('OnPrem')] - procedure UpdateDocStatistics() - var - CustLedgEntry: Record "Cust. Ledger Entry"; - begin - DocumentSituationFilter[1] := DocumentSituationFilter::Cartera; - DocumentSituationFilter[2] := DocumentSituationFilter::"BG/PO"; - DocumentSituationFilter[3] := DocumentSituationFilter::"Posted BG/PO"; - - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - for j := 1 to 5 do begin - case j of - 4: - // Closed Bill Group and Closed Documents - begin - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - end; - 5: - // Invoices - begin - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - else begin - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - CustLedgEntry.SetRange("Document Situation", DocumentSituationFilter[j]); - end; - end; - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); - CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - OpenAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; - OpenRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; - NoOpen[j] := CustLedgEntry.Count; - CustLedgEntry.SetRange("Document Status"); - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); - CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - HonoredAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; - HonoredRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; - NoHonored[j] := CustLedgEntry.Count; - CustLedgEntry.SetRange("Document Status"); - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); - CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - RejectedAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; - RejectedRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; - NoRejected[j] := CustLedgEntry.Count; - CustLedgEntry.SetRange("Document Status"); - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Redrawn); - CustLedgEntry.CalcSums("Amount (LCY) stats.", "Remaining Amount (LCY) stats."); - RedrawnAmtLCY[j] := CustLedgEntry."Amount (LCY) stats."; - RedrawnRemainingAmtLCY[j] := CustLedgEntry."Remaining Amount (LCY) stats."; - NoRedrawn[j] := CustLedgEntry.Count; - CustLedgEntry.SetRange("Document Status"); - - CustLedgEntry.SetRange("Document Situation"); - end; - end; - - [Scope('OnPrem')] - procedure DrillDownOpen(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) - var - CustLedgEntry: Record "Cust. Ledger Entry"; - CustLedgEntriesForm: Page "Customer Ledger Entries"; - begin - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - case Situation of - Situation::Cartera: - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); - Situation::"Closed BG/PO": - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - else - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - case DocType of - DocType::Invoice: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - DocType::Bill: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - end; - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Open); - CustLedgEntriesForm.SetTableView(CustLedgEntry); - CustLedgEntriesForm.SetRecord(CustLedgEntry); - CustLedgEntriesForm.RunModal(); - CustLedgEntry.SetRange("Document Status"); - CustLedgEntry.SetRange("Document Situation"); - end; - - [Scope('OnPrem')] - procedure DrillDownHonored(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) - var - CustLedgEntry: Record "Cust. Ledger Entry"; - CustLedgEntriesForm: Page "Customer Ledger Entries"; - begin - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - case Situation of - Situation::Cartera: - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); - Situation::"Closed BG/PO": - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - else - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - case DocType of - DocType::Invoice: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - DocType::Bill: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - end; - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Honored); - CustLedgEntriesForm.SetTableView(CustLedgEntry); - CustLedgEntriesForm.SetRecord(CustLedgEntry); - CustLedgEntriesForm.RunModal(); - CustLedgEntry.SetRange("Document Status"); - CustLedgEntry.SetRange("Document Situation"); - end; - - [Scope('OnPrem')] - procedure DrillDownRejected(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) - var - CustLedgEntry: Record "Cust. Ledger Entry"; - CustLedgEntriesForm: Page "Customer Ledger Entries"; - begin - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - case Situation of - Situation::Cartera: - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); - Situation::"Closed BG/PO": - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - else - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - case DocType of - DocType::Invoice: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - DocType::Bill: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - end; - - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Rejected); - CustLedgEntriesForm.SetTableView(CustLedgEntry); - CustLedgEntriesForm.SetRecord(CustLedgEntry); - CustLedgEntriesForm.RunModal(); - CustLedgEntry.SetRange("Document Status"); - CustLedgEntry.SetRange("Document Situation"); - end; - - [Scope('OnPrem')] - procedure DrillDownRedrawn(Situation: Option " ","Posted BG/PO","Closed BG/PO","BG/PO",Cartera,"Closed Documents"; DocType: Option Invoice,Bill) - var - CustLedgEntry: Record "Cust. Ledger Entry"; - CustLedgEntriesForm: Page "Customer Ledger Entries"; - begin - CustLedgEntry.SetCurrentKey("Customer No.", "Document Type", "Document Situation", "Document Status"); - CustLedgEntry.SetRange("Customer No.", Rec."No."); - case Situation of - Situation::Cartera: - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::Cartera); - Situation::"BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"BG/PO"); - Situation::"Posted BG/PO": - CustLedgEntry.SetRange("Document Situation", CustLedgEntry."Document Situation"::"Posted BG/PO"); - Situation::"Closed BG/PO", Situation::"Closed Documents": - CustLedgEntry.SetFilter("Document Situation", '%1|%2', - CustLedgEntry."Document Situation"::"Closed BG/PO", - CustLedgEntry."Document Situation"::"Closed Documents"); - else - CustLedgEntry.SetFilter("Document Situation", '<>0'); - end; - case DocType of - DocType::Invoice: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Invoice); - DocType::Bill: - CustLedgEntry.SetRange("Document Type", CustLedgEntry."Document Type"::Bill); - end; - CustLedgEntry.SetRange("Document Status", CustLedgEntry."Document Status"::Redrawn); - CustLedgEntriesForm.SetTableView(CustLedgEntry); - CustLedgEntriesForm.SetRecord(CustLedgEntry); - CustLedgEntriesForm.RunModal(); - CustLedgEntry.SetRange("Document Status"); - CustLedgEntry.SetRange("Document Situation"); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/CategorizeDocuments.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/CategorizeDocuments.Report.al deleted file mode 100644 index 04d864e87e5..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/CategorizeDocuments.Report.al +++ /dev/null @@ -1,63 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -report 7000095 "Categorize Documents" -{ - Caption = 'Categorize Documents'; - Permissions = TableData "Cartera Doc." = m; - ProcessingOnly = true; - - dataset - { - dataitem("Cartera Doc."; "Cartera Doc.") - { - DataItemTableView = sorting(Type, "Entry No."); - - trigger OnPreDataItem() - begin - ModifyAll("Category Code", CategoryCode); - CurrReport.Break(); - end; - } - } - - requestpage - { - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryCode; CategoryCode) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Code'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the category.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - var - CategoryCode: Code[10]; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/CategorizePostedDocuments.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/CategorizePostedDocuments.Report.al deleted file mode 100644 index 1e51ebcc036..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/CategorizePostedDocuments.Report.al +++ /dev/null @@ -1,63 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -report 7000094 "Categorize Posted Documents" -{ - Caption = 'Categorize Posted Documents'; - Permissions = TableData "Posted Cartera Doc." = m; - ProcessingOnly = true; - - dataset - { - dataitem("Posted Cartera Doc."; "Posted Cartera Doc.") - { - DataItemTableView = sorting(Type, "Entry No."); - - trigger OnPreDataItem() - begin - ModifyAll("Category Code", CategoryCode); - CurrReport.Break(); - end; - } - } - - requestpage - { - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(CategoryCode; CategoryCode) - { - ApplicationArea = Basic, Suite; - Caption = 'Category Code'; - TableRelation = "Category Code"; - ToolTip = 'Specifies the category.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - var - CategoryCode: Code[10]; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroup.Table.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroup.Table.al deleted file mode 100644 index 18809c31bdb..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroup.Table.al +++ /dev/null @@ -1,217 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.Currency; -using Microsoft.Finance.Dimension; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.AuditCodes; - -table 7000007 "Closed Bill Group" -{ - Caption = 'Closed Bill Group'; - DrillDownPageID = "Closed Bill Groups List"; - LookupPageID = "Closed Bill Groups List"; - DataClassification = CustomerContent; - - fields - { - field(2; "No."; Code[20]) - { - Caption = 'No.'; - } - field(3; "Bank Account No."; Code[20]) - { - Caption = 'Bank Account No.'; - TableRelation = "Bank Account"; - } - field(4; "Bank Account Name"; Text[100]) - { - CalcFormula = lookup("Bank Account".Name where("No." = field("Bank Account No."))); - Caption = 'Bank Account Name'; - Editable = false; - FieldClass = FlowField; - } - field(5; "Posting Description"; Text[100]) - { - Caption = 'Posting Description'; - } - field(6; "Dealing Type"; Enum "Cartera Dealing Type") - { - Caption = 'Dealing Type'; - Editable = false; - } - field(8; "Reason Code"; Code[10]) - { - Caption = 'Reason Code'; - TableRelation = "Reason Code"; - } - field(9; "No. Printed"; Integer) - { - Caption = 'No. Printed'; - } - field(10; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(11; Comment; Boolean) - { - CalcFormula = exist("BG/PO Comment Line" where("BG/PO No." = field("No."), - Type = filter(Receivable))); - Caption = 'Comment'; - Editable = false; - FieldClass = FlowField; - } - field(14; "Global Dimension 1 Filter"; Code[20]) - { - CaptionClass = '1,3,1'; - Caption = 'Global Dimension 1 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1)); - } - field(15; "Global Dimension 2 Filter"; Code[20]) - { - CaptionClass = '1,3,2'; - Caption = 'Global Dimension 2 Filter'; - FieldClass = FlowFilter; - TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2)); - } - field(16; "Amount Grouped"; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - CalcFormula = sum("Closed Cartera Doc."."Amount for Collection" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - Type = const(Receivable))); - Caption = 'Amount Grouped'; - Editable = false; - FieldClass = FlowField; - } - field(18; "Status Filter"; Enum "Cartera Document Status") - { - Caption = 'Status Filter'; - Editable = false; - FieldClass = FlowFilter; - } - field(20; "Closing Date"; Date) - { - Caption = 'Closing Date'; - } - field(29; "Collection Expenses Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Collection Expenses Amt.'; - } - field(30; "Discount Expenses Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Discount Expenses Amt.'; - } - field(31; "Discount Interests Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Discount Interests Amt.'; - } - field(32; "Rejection Expenses Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Rejection Expenses Amt.'; - } - field(33; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - Editable = false; - TableRelation = Currency; - } - field(35; "Amount Grouped (LCY)"; Decimal) - { - AutoFormatType = 1; - AutoFormatExpression = ''; - CalcFormula = sum("Closed Cartera Doc."."Amt. for Collection (LCY)" where("Bill Gr./Pmt. Order No." = field("No."), - "Global Dimension 1 Code" = field("Global Dimension 1 Filter"), - "Global Dimension 2 Code" = field("Global Dimension 2 Filter"), - Status = field("Status Filter"), - Type = const(Receivable))); - Caption = 'Amount Grouped (LCY)'; - Editable = false; - FieldClass = FlowField; - } - field(37; "Risked Factoring Exp. Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Risked Factoring Exp. Amt.'; - } - field(38; "Unrisked Factoring Exp. Amt."; Decimal) - { - AutoFormatExpression = Rec."Currency Code"; - AutoFormatType = 1; - Caption = 'Unrisked Factoring Exp. Amt.'; - } - field(39; Factoring; Option) - { - Caption = 'Factoring'; - Editable = false; - OptionCaption = ' ,Unrisked,Risked'; - OptionMembers = " ",Unrisked,Risked; - } - field(1200; "Partner Type"; Option) - { - Caption = 'Partner Type'; - OptionCaption = ' ,Company,Person'; - OptionMembers = " ",Company,Person; - } - } - - keys - { - key(Key1; "No.") - { - Clustered = true; - } - key(Key2; "Bank Account No.", "Posting Date") - { - SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; - } - key(Key3; "Bank Account No.", "Posting Date", Factoring) - { - SumIndexFields = "Collection Expenses Amt.", "Discount Expenses Amt.", "Discount Interests Amt.", "Rejection Expenses Amt.", "Risked Factoring Exp. Amt.", "Unrisked Factoring Exp. Amt."; - } - } - - fieldgroups - { - } - - trigger OnDelete() - begin - ClosedDoc.SetRange("Bill Gr./Pmt. Order No.", "No."); - ClosedDoc.DeleteAll(); - - BGPOCommentLine.SetRange("BG/PO No.", "No."); - BGPOCommentLine.DeleteAll(); - end; - - var - Text1100000: Label 'untitled'; - ClosedDoc: Record "Closed Cartera Doc."; - BGPOCommentLine: Record "BG/PO Comment Line"; - - procedure Caption(): Text - begin - if "No." = '' then - exit(Text1100000); - CalcFields("Bank Account Name"); - exit(StrSubstNo('%1 %2', "No.", "Bank Account Name")); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroupListing.Report.al b/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroupListing.Report.al deleted file mode 100644 index e3e84cf6956..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroupListing.Report.al +++ /dev/null @@ -1,388 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -namespace Microsoft.Sales.Receivables; - -using Microsoft.Bank.BankAccount; -using Microsoft.Finance.ReceivablesPayables; -using Microsoft.Foundation.Address; -using Microsoft.Foundation.Company; -using Microsoft.Sales.Customer; -using System.Utilities; - -report 7000002 "Closed Bill Group Listing" -{ - DefaultLayout = RDLC; - RDLCLayout = './Local/Sales/Receivables/ClosedBillGroupListing.rdlc'; - ApplicationArea = Basic, Suite; - Caption = 'Closed Bill Group Listing'; - UsageCategory = ReportsAndAnalysis; - - dataset - { - dataitem(ClosedBillGr; "Closed Bill Group") - { - DataItemTableView = sorting("No."); - PrintOnlyIfDetail = true; - RequestFilterFields = "No."; - column(No_ClosedBillGr; "No.") - { - } - dataitem(CopyLoop; "Integer") - { - DataItemTableView = sorting(Number); - dataitem(PageLoop; "Integer") - { - DataItemTableView = sorting(Number) where(Number = const(1)); - column(Operation; Operation) - { - } - column(CopyText; StrSubstNo(Text1100003, CopyText)) - { - } - column(CompanyAddr1; CompanyAddr[1]) - { - } - column(CompanyAddr2; CompanyAddr[2]) - { - } - column(CompanyAddr3; CompanyAddr[3]) - { - } - column(CompanyAddr4; CompanyAddr[4]) - { - } - column(CompanyAddr5; CompanyAddr[5]) - { - } - column(CompanyAddr6; CompanyAddr[6]) - { - } - column(CompanyInfoPhoneNo; CompanyInfo."Phone No.") - { - } - column(CompanyInfoFaxNo; CompanyInfo."Fax No.") - { - } - column(CompanyInfoVATRegNo; CompanyInfo."VAT Registration No.") - { - } - column(ClosedBillGrPostingDate; Format(ClosedBillGr."Posting Date")) - { - } - column(BankAccAddr4; BankAccAddr[4]) - { - } - column(BankAccAddr5; BankAccAddr[5]) - { - } - column(BankAccAddr6; BankAccAddr[6]) - { - } - column(BankAccAddr7; BankAccAddr[7]) - { - } - column(BankAccAddr3; BankAccAddr[3]) - { - } - column(BankAccAddr2; BankAccAddr[2]) - { - } - column(BankAccAddr1; BankAccAddr[1]) - { - } - column(ClosedBillGrCurrencyCode; ClosedBillGr."Currency Code") - { - } - column(FactoringType; FactoringType) - { - } - column(OutputNo; OutputNo) - { - } - column(PrintAmountsInLCY; PrintAmountsInLCY) - { - } - column(BillGroupNoCaption; BillGroupNoCaptionLbl) - { - } - column(PhoneNoCaption; PhoneNoCaptionLbl) - { - } - column(FaxNoCaption; FaxNoCaptionLbl) - { - } - column(VATRegistrationNoCaption; VATRegistrationNoCaptionLbl) - { - } - column(DateCaption; DateCaptionLbl) - { - } - column(CurrencyCodeCaption; CurrencyCodeCaptionLbl) - { - } - column(PageCaption; PageCaptionLbl) - { - } - dataitem(ClosedDoc; "Closed Cartera Doc.") - { - DataItemLink = "Bill Gr./Pmt. Order No." = field("No."); - DataItemLinkReference = ClosedBillGr; - DataItemTableView = sorting(Type, "Collection Agent", "Bill Gr./Pmt. Order No.") where("Collection Agent" = const(Bank), Type = const(Receivable)); - column(AmtForCollection; AmtForCollection) - { - AutoFormatExpression = GetCurrencyCode(); - AutoFormatType = 1; - } - column(CustomerCity; Customer.City) - { - } - column(CustomerCounty; Customer.County) - { - } - column(CustomerPostCode; Customer."Post Code") - { - } - column(CustomerName; Customer.Name) - { - } - column(AccountNo_ClosedDoc; "Account No.") - { - } - column(HonoredRejtdatDate_ClosedDoc; Format("Honored/Rejtd. at Date")) - { - } - column(Status_ClosedDoc; Status) - { - } - column(DocumentNo_ClosedDoc; "Document No.") - { - } - column(DocumentType_ClosedDoc; "Document Type") - { - } - column(DueDate_ClosedDoc; Format("Due Date")) - { - } - column(ClosedDocDocTypeNotBill; ClosedDoc."Document Type" <> ClosedDoc."Document Type"::Bill) - { - } - column(No_ClosedDoc; "No.") - { - } - column(ClosedDocDocTypeBill; ClosedDoc."Document Type" = ClosedDoc."Document Type"::Bill) - { - } - column(Type_ClosedDoc; Type) - { - } - column(EntryNo_ClosedDoc; "Entry No.") - { - } - column(BillGrPmtOrderNo_ClosedDoc; "Bill Gr./Pmt. Order No.") - { - } - column(AllAmtareinLCYCaption; AllAmtareinLCYCaptionLbl) - { - } - column(DocumentNoCaption; DocumentNoCaptionLbl) - { - } - column(BillNoCaption; BillNoCaptionLbl) - { - } - column(NameCaption; NameCaptionLbl) - { - } - column(PostCodeCaption; PostCodeCaptionLbl) - { - } - column(CityCaption; CityCaptionLbl) - { - } - column(AmtForCollectioCaption; AmtForCollectioCaptionLbl) - { - } - column(CountyCaption; CountyCaptionLbl) - { - } - column(StatusCaption_ClosedDoc; FieldCaption(Status)) - { - } - column(HonoredRejtdatDateCaption; HonoredRejtdatDateCaptionLbl) - { - } - column(DueDateCaption; DueDateCaptionLbl) - { - } - column(CustomerNoCaption; CustomerNoCaptionLbl) - { - } - column(DocTypeCaption_ClosedDoc; FieldCaption("Document Type")) - { - } - column(EmptyStringCaption; EmptyStringCaptionLbl) - { - } - column(TotalCaption; TotalCaptionLbl) - { - } - - trigger OnAfterGetRecord() - begin - Customer.Get("Account No."); - if PrintAmountsInLCY then - AmtForCollection := "Amt. for Collection (LCY)" - else - AmtForCollection := "Amount for Collection"; - end; - - trigger OnPreDataItem() - begin - Clear(AmtForCollection); - end; - } - } - - trigger OnAfterGetRecord() - begin - if Number > 1 then begin - CopyText := Text1100002; - OutputNo := OutputNo + 1; - end; - end; - - trigger OnPreDataItem() - begin - NoOfLoops := Abs(NoOfCopies) + 1; - CopyText := ''; - SetRange(Number, 1, NoOfLoops); - OutputNo := 1; - end; - } - - trigger OnAfterGetRecord() - begin - if "Dealing Type" = "Dealing Type"::Discount then - Operation := Text1100000 - else - Operation := Text1100001; - FactoringType := GetFactoringType(); - - BankAcc.Get(ClosedBillGr."Bank Account No."); - FormatAddress.FormatAddr( - BankAccAddr, BankAcc.Name, BankAcc."Name 2", '', BankAcc.Address, BankAcc."Address 2", - BankAcc.City, BankAcc."Post Code", BankAcc.County, BankAcc."Country/Region Code"); - - if not CurrReport.Preview then - PrintCounter.PrintCounter(DATABASE::"Closed Bill Group", "No."); - end; - - trigger OnPreDataItem() - begin - CompanyInfo.Get(); - FormatAddress.Company(CompanyAddr, CompanyInfo); - end; - } - } - - requestpage - { - SaveValues = true; - - layout - { - area(content) - { - group(Options) - { - Caption = 'Options'; - field(NoOfCopies; NoOfCopies) - { - ApplicationArea = Basic, Suite; - Caption = 'No. of Copies'; - ToolTip = 'Specifies how many copies of the document to print.'; - } - field(PrintAmountsInLCY; PrintAmountsInLCY) - { - ApplicationArea = Basic, Suite; - Caption = 'Show amounts in LCY'; - ToolTip = 'Specifies if the reported amounts are shown in the local currency.'; - } - } - } - } - - actions - { - } - } - - labels - { - } - - var - Text1100000: Label 'For Discount'; - Text1100001: Label 'For Collection'; - Text1100002: Label 'COPY'; - Text1100003: Label 'Bill Group %1'; - Text1100005: Label 'Risked Factoring'; - Text1100006: Label 'Unrisked Factoring'; - CompanyInfo: Record "Company Information"; - BankAcc: Record "Bank Account"; - Customer: Record Customer; - FormatAddress: Codeunit "Format Address"; - PrintCounter: Codeunit "BG/PO-Post and Print"; - BankAccAddr: array[8] of Text[100]; - CompanyAddr: array[8] of Text[100]; - Operation: Text[80]; - NoOfLoops: Integer; - NoOfCopies: Integer; - CopyText: Text[30]; - PrintAmountsInLCY: Boolean; - AmtForCollection: Decimal; - FactoringType: Text[30]; - OutputNo: Integer; - BillGroupNoCaptionLbl: Label 'Bill Group No.'; - PhoneNoCaptionLbl: Label 'Phone No.'; - FaxNoCaptionLbl: Label 'Fax No.'; - VATRegistrationNoCaptionLbl: Label 'VAT Reg. No.'; - DateCaptionLbl: Label 'Date'; - CurrencyCodeCaptionLbl: Label 'Currency Code'; - PageCaptionLbl: Label 'Page'; - AllAmtareinLCYCaptionLbl: Label 'All amounts are in LCY'; - DocumentNoCaptionLbl: Label 'Document No.'; - BillNoCaptionLbl: Label 'Bill No.'; - NameCaptionLbl: Label 'Name'; - PostCodeCaptionLbl: Label 'Post Code'; - CityCaptionLbl: Label 'City /'; - AmtForCollectioCaptionLbl: Label 'Amount for Collection'; - CountyCaptionLbl: Label 'County'; - HonoredRejtdatDateCaptionLbl: Label 'Honored/Rejtd. at Date'; - DueDateCaptionLbl: Label 'Due Date'; - CustomerNoCaptionLbl: Label 'Customer No.'; - EmptyStringCaptionLbl: Label '/', Locked = true; - TotalCaptionLbl: Label 'Total'; - - [Scope('OnPrem')] - procedure GetCurrencyCode(): Code[10] - begin - if PrintAmountsInLCY then - exit('') - else - exit(ClosedDoc."Currency Code"); - end; - - [Scope('OnPrem')] - procedure GetFactoringType(): Text[30] - begin - if ClosedBillGr.Factoring <> ClosedBillGr.Factoring::" " then - if ClosedBillGr.Factoring = ClosedBillGr.Factoring::Risked then - exit(Text1100005) - else - exit(Text1100006); - end; -} - diff --git a/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroupListing.rdlc b/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroupListing.rdlc deleted file mode 100644 index 850a714ff91..00000000000 --- a/src/Layers/ES/BaseApp/Local/Sales/Receivables/ClosedBillGroupListing.rdlc +++ /dev/null @@ -1,2943 +0,0 @@ - - - 0 - - - - SQL - - - None - 3adfdb31-f2ef-4b66-9ee5-737e1091e6c6 - - - - - - - - - - - 7.47047in - - - - - 4.53464in - - - - - - - true - - - - - =Fields!CurrencyCodeCaption.Value - - - - - - - true - - - - - =Fields!DateCaption.Value - - - - - - - true - - - - - =Fields!BillGroupNoCaption.Value - - - - - - - true - - - - - =Fields!FactoringType.Value - - - - - - - true - - - - - =Fields!Operation.Value - - - - - - - true - - - - - =Fields!ClosedBillGrCurrencyCode.Value - - - - - - - true - - - - - =Fields!ClosedBillGrPostingDate.Value - - - - - - - true - - - - - =Fields!No_ClosedBillGr.Value - - - - - - - true - - - - - =Fields!BankAccAddr2.Value - - - - - - - true - - - - - =Fields!BankAccAddr3.Value - - - - - - - true - - - - - =Fields!BankAccAddr7.Value - - - - - - - true - - - - - =Fields!BankAccAddr6.Value - - - - - - - true - - - - - =Fields!BankAccAddr5.Value - - - - - - - true - - - - - =Fields!BankAccAddr4.Value - - - - - - - true - - - - - =Fields!CompanyAddr1.Value - - - - - - - true - - - - - =Fields!VATRegistrationNoCaption.Value - - - - - - - true - - - - - =Fields!FaxNoCaption.Value - - - - - - - true - - - - - =Fields!PhoneNoCaption.Value - - - - - - - true - - - - - =Fields!CompanyInfoVATRegNo.Value - - - - - - - true - - - - - =Fields!CompanyInfoFaxNo.Value - - - - - - - true - - - - - =Fields!CompanyInfoPhoneNo.Value - - - - - - - true - - - - - =Fields!CompanyAddr6.Value - - - - - - - true - - - - - =Fields!CompanyAddr5.Value - - - - - - - true - - - - - =Fields!CompanyAddr4.Value - - - - - - - true - - - - - =Fields!CompanyAddr3.Value - - - - - - - true - - - - - =Fields!CompanyAddr2.Value - - - - - - - true - - - - - =Fields!BankAccAddr1.Value - - - - - - - - - - 0.56102in - - - 0.55118in - - - 0.5315in - - - 0.35433in - - - 0.17717in - - - 0.70866in - - - 0.64961in - - - 1.35827in - - - 0.64961in - - - 1.12205in - - - 0.7874in - - - - - 0.16654in - - - - - true - - - - - =First(Fields!AllAmtareinLCYCaption.Value) - - - - - - 7 - - - - - - - - - - - - true - - - - - - - - 2 - - - - - - - true - true - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - 0.33307in - - - - - true - - - - - =First(Fields!DueDateCaption.Value) - - - - - - - 42 - - - - - - - - true - - - - - =First(Fields!DocTypeCaption_ClosedDoc.Value) - - - - - - - - - - - true - - - - - =First(Fields!DocumentNoCaption.Value) - - - - - - - 40 - - - - - - - - true - - - - - =First(Fields!BillNoCaption.Value) - - - - - - - 39 - - - - - - - - true - - - - - =First(Fields!StatusCaption_ClosedDoc.Value) - - - - - - - - - - - true - - - - - =first(Fields!HonoredRejtdatDateCaption.Value) - - - - - - - 37 - - - - - - - - true - - - - - =First(Fields!CustomerNoCaption.Value) - - - - - - - 36 - - - - - - - - true - - - - - =First(Fields!NameCaption.Value) - - - - - - - - - - - true - - - - - =First(Fields!PostCodeCaption.Value) - - - - - - - - - - - true - - - - - =First(Fields!CityCaption.Value)+ Chr(10) + First(Fields!CountyCaption.Value) - - - - - - - - - - - true - - - - - =First(Fields!AmtForCollectioCaption.Value) - - - - - - - 32 - - - - - - - - 0.16654in - - - - - true - - - - - - - - 11 - - - - - - - - - - - - - - - - 0.16732in - - - - - true - - - - - =Fields!DueDate_ClosedDoc.Value - - - - - - - - - - 29 - - - - - - - - true - - - - - =Fields!DocumentNo_ClosedDoc.Value - - - - - - - 28 - - - - - - - - true - - - - - - - - - - - - - true - - - - - =Fields!Status_ClosedDoc.Value - - - - - - - - - - - - - - true - - - - - =Fields!AccountNo_ClosedDoc.Value - - - - - - - 24 - - - - - - - - true - - - - - =Fields!CustomerName.Value - - - - - - - - - - - true - - - - - =Fields!CustomerPostCode.Value - - - - - - - 22 - - - - - - - - true - - - - - =Fields!CustomerCity.Value - - - - - - - - - - - true - - - - - =Fields!AmtForCollection.Value - - - - - - - - - - - 0.16732in - - - - - true - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - 0.16732in - - - - - true - - - - - =Fields!DueDate_ClosedDoc.Value - - - - - - - - - - 15 - - - - - - - - true - - - - - =Fields!DocumentNo_ClosedDoc.Value - - - - - - - 14 - - - - - - - - true - - - - - =Fields!EmptyStringCaption.Value + Fields!No_ClosedDoc.Value - - - - - - - 13 - - - - - - - - true - - - - - =Fields!Status_ClosedDoc.Value - - - - - - - - - - - - - - true - - - - - =Fields!AccountNo_ClosedDoc.Value - - - - - - - 10 - - - - - - - - true - - - - - =Fields!CustomerName.Value - - - - - - - - - - - true - - - - - =Fields!CustomerPostCode.Value - - - - - - - 8 - - - - - - - - true - - - - - =Fields!CustomerCity.Value - - - - - - - - - - - true - - - - - =Fields!AmtForCollection.Value - - - - - - - - - - - 0.16732in - - - - - true - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - 0.16654in - - - - - true - true - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - true - true - - - - - - - - - - - - - true - true - - - - - - - - - - - - - - - - 0.16654in - - - - - true - - - - - =First(Fields!TotalCaption.Value) - - - - - - 2 - - - - - - - true - - - - - =Sum(Fields!AmtForCollection.Value) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =IIF(Fields!PrintAmountsInLCY.Value,False,True) - - After - true - true - - - After - true - true - - - After - true - true - - - - - No_ClosedBillGr - =Fields!OutputNo.Value - - - - - - - No_ClosedBillGr - =Fields!OutputNo.Value - - - End - - - - - - Detail - - - - - =IIF(Fields!ClosedDocDocTypeNotBill.Value,FALSE,TRUE) - - - - - =IIF(Fields!ClosedDocDocTypeNotBill.Value,FALSE,TRUE) - - - - - =IIF(Fields!ClosedDocDocTypeBill.Value,FALSE,TRUE) - - - - - =IIF(Fields!ClosedDocDocTypeBill.Value,FALSE,TRUE) - - - - Detail_Collection - Output - true - - - Before - true - - - Before - true - - - - - - - - DataSet_Result - 7.27996cm - 1.66851in - 7.4508in - 27 - - - - - - - - - - - true - true - - - - - =Code.IsNewPage(Fields!BillGrPmtOrderNo_ClosedDoc.Value) - - - - - - true - - - - - - - - - - - - - - - - - - - - 0cm - 0cm - 0.6cm - 0.76667cm - 28 - - true - - - - - - - true - - - - - - - true - - - - - =Fields!PageCaption.Value+" "+format(Code.GetGroupPageNumber(ReportItems!Newpage.Value,Globals!PageNumber)) - - - - - - - true - true - - - - - =Code.SetReportName(ReportItems!ReportName.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 11in - 8.5in - 1.5cm - 0cm - 2cm - 2cm - - - - - - - CustLedgEntry__Document_No__ - 0.423cm - 2.1cm - - - - true - - - - - =First(Fields!BillNo_CustLedgEntry.Value) - - - - - - - 2.22222cm - 0.423cm - 0.84cm - 1 - - - - true - - - - - =First(Fields!DrawCity.Value) - - - - - - - true - true - - - - - =Fields!PrintAmt.Value - - - - - - - PrintAmt_1 - 11.74603cm - 0.423cm - 2.7cm - 3 - - - - true - - - - - =First(Fields!CurrencyCode.Value) - - - - - - - true - - - - - =First(Fields!DrawDate.Value) - - - - - - - true - - - - - =First(Fields!StatedAddressCaption.Value) - - - - - - - true - - - - - =First(Fields!WithTheFollowingDetailsCaption.Value) - - - - - - - true - - - - - =First(Fields!CurrencyTxt.Value) - - - - - - - true - - - - - =First(Fields!NumberText1.Value) - - - - - - - true - - - - - =First(Fields!RelatedtoCaption.Value) - - - - - - - true - - - - - =First(Fields!InvoiceNoCaption.Value) - - - - - - - true - - - - - =First(Fields!DocumentNo_CustLedgEntry.Value) - - - - - - - 3.96825cm - 2.53968cm - 0.423cm - 2.1cm - 12 - - - - true - - - - - =First(Fields!IssuedDateCaption.Value) - - - - - - - - - - true - - - - - =First(Fields!PaymentMethod.Value) - - - - - - - true - - - - - =First(Fields!CustBankAccName.Value) - - - - - - - true - - - - - =First(Fields!CustBankAccBankAccNoDetails.Value) - - - - - - - 4.76191cm - 11.13cm - 0.423cm - 4.7cm - 17 - - - - - - - true - - - - - =First(Fields!CustAddr2.Value) - - - - - - - true - - - - - =First(Fields!CustAddr3.Value) - - - - - - - true - - - - - =First(Fields!CustAddr7.Value) - - - - - - - true - - - - - =First(Fields!CustAddr6.Value) - - - - - - - true - - - - - =First(Fields!CustAddr5.Value) - - - - - - - true - - - - - =First(Fields!CustAddr4.Value) - - - - - - - true - - - - - =First(Fields!CustVATRegNo.Value) - - - - - - - true - - - - - =First(Fields!DueDate_CustLedgEntry.Value) - - - - - - - ContentsOnly - 8.88889cm - 6.87414in - - =IIF(Fields!NumberText2.Value="",FALSE,TRUE) - - - - - - - - true - - - - - =Fields!EmptyStringCaption.Value - - - - - - - true - - - - - =First(Fields!BillNo_CustLedgEntry.Value) - - - - - - - true - - - - - =First(Fields!DrawCity.Value) - - - - - - - true - true - - - - - =Fields!PrintAmt.Value - - - - - - - 11.74603cm - 0.423cm - 2.7cm - 4 - - - - true - - - - - =First(Fields!CurrencyCode.Value) - - - - - - - true - - - - - =First(Fields!DrawDate.Value) - - - - - - - true - - - - - =First(Fields!StatedAddressCaption.Value) - - - - - - - true - - - - - =First(Fields!WithTheFollowingDetailsCaption.Value) - - - - - - - true - - - - - =First(Fields!CurrencyTxt.Value) - - - - - - - true - - - - - =First(Fields!NumberText1.Value) - - - - - - - true - - - - - =First(Fields!RelatedtoCaption.Value) - - - - - - - true - - - - - =First(Fields!InvoiceNoCaption.Value) - - - - - - - true - - - - - =First(Fields!DocumentNo_CustLedgEntry.Value) - - - - - - - 4.44444cm - 2.53968cm - 0.423cm - 2.1cm - 13 - - - - true - - - - - =First(Fields!IssuedDateCaption.Value) - - - - - - - - - - true - - - - - =First(Fields!PaymentMethod.Value) - - - - - - - true - - - - - =First(Fields!CustBankAccName.Value) - - - - - - - true - - - - - =First(Fields!CustBankAccBankAccNoDetails.Value) - - - - - - - 5.23809cm - 11.13cm - 0.423cm - 4.7cm - 18 - - - - - - - true - - - - - =First(Fields!CustAddr2.Value) - - - - - - - true - - - - - =First(Fields!CustAddr3.Value) - - - - - - - true - - - - - =First(Fields!CustAddr7.Value) - - - - - - - true - - - - - =First(Fields!CustAddr6.Value) - - - - - - - true - - - - - =First(Fields!CustAddr5.Value) - - - - - - - true - - - - - =First(Fields!CustAddr4.Value) - - - - - - - true - - - - - =First(Fields!CustVATRegNo.Value) - - - - - - - true - - - - - =First(Fields!NumberText2.Value) - - - - - - - true - - - - - =First(Fields!DueDate_CustLedgEntry.Value) - - - - - - - ContentsOnly - 9.10053cm - 3.79119in - 6.87414in - 1 - - =IIF(Fields!NumberText2.Value="",TRUE,FALSE) - -