Skip to content

[Event Request] Codeunit 90 "Purch.-Post"- OnBeforePostWHT #29587

@matilda-teitzel

Description

@matilda-teitzel

Why do you need this change?

Hi Microsoft AL Development Team,

Could you please add an OnBeforePostWHT IsHandled integration event to the PostWHT procedure in codeunit 90 "Purch.-Post"?

We have a use case where a particular region requires a custom WHT Gross Up Calculation Method, which isn't supported by standard. This integration event would allow us to achieve this custom Withholding Tax calculation, while ensuring the related ledger entries are aligned. This is currently preventing them from posting and finalising Purchase Invoices.

We believe the WHT features are region specific to the AU-version of Business Central, so these objects and procedures are lacking integration events for us to modify this process. The current alternative would be to utilise the OnBeforePostInvoice integration event, which we would like to avoid handling so we don't override or impact other Purchase Posting Events.

Please let me know if you have any questions.

Thank you.

Kind regards,
Matilda Teitzel

Describe the request

Hi Microsoft AL Development Team,

Could you please the following integration event to the PostWHT procedure in codeunit 90 "Purch.-Post"?

[IntegrationEvent(false, false)]
    local procedure OnBeforePostWHT(var PurchHeader: Record "Purchase Header"; var TotalInvAmount: Decimal; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var TempPurchLineGlobal: Record "Purchase Line" temporary; var WHTEntry: Record "WHT Entry"; var IsHandled: Boolean)
    begin
    end;
Image

Currently, the closest integration event is OnBeforePostInvoice, which we would like to avoid handling so we don't override or impact other Purchase Posting Events.

We did investigate Codeunit 28040 WHTManagement, however this doesn't have any integration events to leverage. I believe this feature is specific to the AU-region version of Business Central.

Please let me know if you have any questions.

Thank you.

Kind regards,
Matilda Teitzel
Internal work item: AB#618278

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions