Codeunit 1402 Cancel Posted Purch. Cr. Memo

Base Application, Microsoft.Purchases.History

Source AL, 629 lines

src/Layers/W1/BaseApp/Purchases/History/CancelPostedPurchCrMemo.Codeunit.allines 23 to 38 of 629, Copyright (c) Microsoft Corporation. MIT

codeunit 1402 "Cancel Posted Purch. Cr. Memo"{    Permissions = TableData "Purch. Inv. Header" = rm,                  TableData "Purch. Cr. Memo Hdr." = rm;    TableNo = "Purch. Cr. Memo Hdr.";    trigger OnRun()    var        PurchHeader: Record "Purchase Header";    begin        UnapplyEntries(Rec);        CreateCopyDocument(Rec, PurchHeader);        OnRunOnBeforeRunPurchPost(PurchHeader, Rec);        CODEUNIT.Run(CODEUNIT::"Purch.-Post", PurchHeader);        SetTrackInfoForCancellation(Rec);

All 629 lines

Events 13 in 29

[IntegrationEvent] OnAfterTestCorrectCrMemoIsAllowed(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.")17-29
[IntegrationEvent] OnBeforeTestInventoryPostingSetup(PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var IsHandled: Boolean)17-29
[IntegrationEvent] OnBeforeTestIfCrMemoIsCorrectiveDoc(PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var IsHandled: Boolean)new in 18
[IntegrationEvent] OnBeforeTestGenPostingSetup(PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var IsHandled: Boolean)new in 19
[IntegrationEvent] OnBeforeTestIfUnapplied(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var IsHandled: Boolean)new in 19
[IntegrationEvent] OnCreateCopyDocumentOnBeforePurchHeaderInsert(var PurchHeader: Record "Purchase Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.")new in 20
[IntegrationEvent] OnBeforeShowPostedPurchaseInvoice(var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean)new in 21

All 13 events

Public procedures 3 in 29

CancelPostedCrMemo(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."): Boolean17-29
TestCorrectCrMemoIsAllowed(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.")17-29
CheckGLAccount(AccountNo: Code[20]; PurchCrMemoLine: Record "Purch. Cr. Memo Line")new in 20

Changes 2 in 28

List17181920212223242526272829
Procedures1
Events121412
[IntegrationEvent] OnCancelPostedCrMemoOnBeforeTestCorrectCrMemoIsAllowed(var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.")new in 28
added
[IntegrationEvent] OnBeforeTestIfAnyFreeNumberSeries(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var IsHandled: Boolean)new in 28
added

All 12 changes in 17-29