Codeunit 70491729 EOS066.01 VMI Event Dispatcher

Codeunit 70491729 EOS066.01 VMI Event Dispatcher

A facade that allows to interact with VMI, should it be installed.

Methods

GetVatExemptionNo

procedure GetVatExemptionNo(SourceLine: Variant): Code[20]

Retrieves the VAT exemption no., if any, that is applied to the given source document line.

Parameters / Return Value

  • SourceLine Variant

    The source document line.

  • Returns Code[20]

    The VAT exemption no. that is applied to this line.


IsVatExemptionAllowed

procedure IsVatExemptionAllowed(SourceLine: Variant; var CanApply: Enum "EOS066 TriState Boolean")

Checks if a given source document line is enabled to have VAT exemptions applied.

Parameters / Return Value

  • SourceLine Variant

    The source document line.

  • CanApply Enum "EOS066 TriState Boolean"

    The result.


RaiseOnBeforeFindVatExemption

procedure RaiseOnBeforeFindVatExemption(Header: Variant; Line: Variant; var VatExemptionNo: Code[20]; var Handled: Boolean)

Raises an event to find the VAT exemption to be applied to the given source document line. If this is not handled, the default handler of VMI will trigger, if it is available.

Parameters / Return Value

  • Header Variant

    The header of the source document.

  • Line Variant

    The source document line.

  • VatExemptionNo Code[20]

    Will contain the VAT exemption to be applied.

  • Handled Boolean

    Gets or sets if this event has been completely handled.


Events

OnIsVatExemptionAllowed

local procedure OnIsVatExemptionAllowed(SourceLine: Variant; var CanApply: Enum "EOS066 TriState Boolean")

Raised whenever VMI asks if VAT exemptions are allowed for a given source document line.

Parameters / Return Value

  • SourceLine Variant

    The source document line.

  • CanApply Enum "EOS066 TriState Boolean"

    The result.


OnBeforeFindVatExemption

local procedure OnBeforeFindVatExemption(Header: Variant; Line: Variant; var VatExemptionNo: Code[20]; var Handled: Boolean)

Raised whenever VMI is looking for a VAT exemption to be applied to a given source document line.

Parameters / Return Value

  • Header Variant

    The source document header.

  • Line Variant

    The source document line.

  • VatExemptionNo Code[20]

    Gets or sets the VAT exemption no. to be applied.

  • Handled Boolean

    Gets or sets if this event has been completely handled.


OnGetVatExemptionNo

local procedure OnGetVatExemptionNo(SourceLine: Variant; var VatExemptionNo: Code[20]; var Handled: Boolean)

Raised whenever someone asks if there is a VAT exemption applied to a given source document line. This should not be subscribed to, it is only used internally by VMI.

Parameters / Return Value

  • SourceLine Variant

    The source document line.

  • VatExemptionNo Code[20]

    Gets or sets the VAT exemption no. that is applied to a given source document line.

  • Handled Boolean

    Gets or sets if this event has been completely handled.



EOS Labs -