Skip to content

[Event Request] - codeunit 1402 "Cancel Posted Purch. Cr. Memo" - OnBeforeTestCorrectCrMemoIsAllowed #30165

@krasivarna

Description

@krasivarna

Why do you need this change?

Hello This event publisher will use to set in record Purchase Credit Memo Header some fields. I review another codeunit for cancel posted sales credit memo. In this codeunit is exist such publisher

Describe the request

I paste the procedure of codeunit 1402 "Cancel Posted Purch. Cr. Memo". Between code I shall add the new lines which marked with comment "new line". In the end of codeunit must add new publisher OnBeforeTestCorrectCrMemoIsAllowed

procedure TestCorrectCrMemoIsAllowed(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.")
var //new line
IsHandled: Boolean; //new line
begin
IsHandled := false; //new line
OnBeforeTestCorrectCrMemoIsAllowed(PurchCrMemoHdr, IsHandled); //new line
if not IsHandled then begin //new line
TestIfPostingIsAllowed(PurchCrMemoHdr);
TestIfVendorIsBlocked(PurchCrMemoHdr, PurchCrMemoHdr."Buy-from Vendor No.");
TestIfVendorIsBlocked(PurchCrMemoHdr, PurchCrMemoHdr."Pay-to Vendor No.");
TestIfInvoiceIsCorrectedOnce(PurchCrMemoHdr);
TestIfCrMemoIsCorrectiveDoc(PurchCrMemoHdr);
TestVendorDimension(PurchCrMemoHdr, PurchCrMemoHdr."Pay-to Vendor No.");
TestDimensionOnHeader(PurchCrMemoHdr);
TestPurchLines(PurchCrMemoHdr);
TestIfAnyFreeNumberSeries(PurchCrMemoHdr);
TestExternalDocument(PurchCrMemoHdr);
TestInventoryPostingClosed(PurchCrMemoHdr);
end; //new line

OnAfterTestCorrectCrMemoIsAllowed(PurchCrMemoHdr);

end;

[IntegrationEvent(false, false)]
local procedure OnBeforeTestCorrectCrMemoIsAllowed(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.; var IsHandled: Boolean)
begin
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an event

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions