codeunitFinanceofficial - Microsoftderived - from the source, no model text

Codeunit 550 "VAT Rate Change Conversion"

Base Application · Microsoft.Finance.VAT.RateChange

Across versions

  1. BC23-24present
  2. BC257 procedures removed, 4 procedures added
  3. BC26-27unchanged
  4. BC284 procedures removed, 3 events removed
  5. BC29-30unchanged

Neighbourhood 6 connected objects and pages

Codeunit 6471 "Serv. VAT Rate Change Conv." (event subscribers, 2 links)Serv. VAT Rate Change Conv.Codeunit 99000775 "Mfg. VAT Rate Change Mgt." (event subscribers, 2 links)Mfg. VAT Rate Change Mgt.Codeunit 6471 "Serv. VAT Rate Change Conv." (calls, 13 links)Serv. VAT Rate Change Conv.Codeunit 99000775 "Mfg. VAT Rate Change Mgt." (calls, 3 links)Mfg. VAT Rate Change Mgt.Codeunit 5402 "Unit of Measure Management" (calls, 2 links)Unit of Measure ManagementCodeunit 5777 "Whse. Validate Source Line" (calls, 2 links)Whse. Validate Source Line

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

Base Application · Microsoft.Finance.VAT.RateChange · BC23-30 · source at ea08af5e · facts from BC29

Properties

Property Value
Permissions TableData “VAT Rate Change Log Entry” = i

Events published

  • OnAddNewPurchaseLineOnBeforeOldPurchaseLineModify(var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line"; VATProdPostingGroup: Code[20]; GenProdPostingGroup: Code[20]) (integration): Integration event raised before modifying the original purchase line during VAT rate change conversion. Allows custom modifications to both old and new purchase lines before database update.
  • OnAddNewSalesLineOnBeforeOldSalesLineModify(var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line"; VATProdPostingGroup: Code[20]; GenProdPostingGroup: Code[20]) (integration): Integration event raised before modifying the original sales line during VAT rate change conversion. Allows custom modifications to both old and new sales lines before database update.
  • OnAfterInitNewSalesLineFromSalesLine(var NewSalesLine: Record "Sales Line"; SalesLine: Record "Sales Line") (integration): Integration event raised after initializing a new sales line from an existing sales line during VAT rate change conversion. Allows custom field copying and initialization logic for the new sales line.
  • OnAfterUpdateTables(var VATRateChangeSetup: Record "VAT Rate Change Setup") (integration): Integration event raised after updating all tables during VAT rate change conversion process. Allows custom post-processing logic after all configured tables have been updated.
  • OnAfterConvert(var VATRateChangeSetup: Record "VAT Rate Change Setup") (integration): Integration event raised after completing the entire VAT rate change conversion process. Allows custom finalization logic and cleanup after all conversion operations.
  • OnAfterLineInScope(GenProdPostingGroup: Code[20]; VATProdPostingGroup: Code[20]; ConvertGenProdPostingGroup: Boolean; ConvertVATProdPostingGroup: Boolean; var Result: Boolean) (integration): Integration event raised after determining if a line is in scope for VAT rate change conversion. Allows custom logic to modify the scope determination result based on additional criteria.
  • OnAfterAreTablesSelected(var VATRateChangeSetup: Record "VAT Rate Change Setup"; var Result: Boolean) (integration): Integration event raised after checking if tables are selected for VAT rate change conversion. Allows custom logic to modify table selection validation results.
  • OnBeforeCheckPurchaseLinePartlyShipped(var PurchaseLine: Record "Purchase Line"; var DescriptionTxt: Text[250]; var IsHandled: Boolean) (integration): Integration event raised before checking if a purchase line is partly shipped during VAT rate change validation. Allows custom validation logic for purchase line shipping status.
  • OnBeforeCheckSalesLinePartlyShipped(var SalesLine: Record "Sales Line"; var DescriptionTxt: Text[250]; var IsHandled: Boolean) (integration): Integration event raised before checking if a sales line is partly shipped during VAT rate change validation. Allows custom validation logic for sales line shipping status.
  • OnBeforeConvert(var VATRateChangeSetup: Record "VAT Rate Change Setup") (integration): Integration event raised before starting the VAT rate change conversion process. Allows custom initialization and validation logic before conversion begins.
  • OnBeforeFinishConvert(var VATRateChangeSetup: Record "VAT Rate Change Setup"; var ProgressWindow: Dialog) (integration): Integration event raised before finishing the VAT rate change conversion process. Allows custom cleanup and finalization logic before closing the conversion operation.
  • OnBeforeOnRun(var IsHandled: Boolean) (integration): Integration event raised before running the VAT rate change conversion codeunit. Allows custom logic to override or enhance the main conversion process execution.
  • OnBeforeUpdateGLAccount(var GLAccount: Record "G/L Account"; var VATRateChangeSetup: Record "VAT Rate Change Setup"; var IsHandled: Boolean) (integration): Integration event raised before updating G/L account records during VAT rate change conversion. Allows custom validation and modification logic for G/L account updates.
  • OnBeforeUpdateItem(var Item: Record Item; var VATRateChangeSetup: Record "VAT Rate Change Setup"; var IsHandled: Boolean) (integration): Integration event raised before updating item records during VAT rate change conversion. Allows custom validation and modification logic for item updates.
  • OnBeforeUpdateResource(var Resource: Record Resource; var VATRateChangeSetup: Record "VAT Rate Change Setup"; var IsHandled: Boolean) (integration): Integration event raised before updating resource records during VAT rate change conversion. Allows custom validation and modification logic for resource updates.
  • OnBeforeUpdateSales(var VATRateChangeSetup: Record "VAT Rate Change Setup"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header") (integration): Integration event raised before updating sales documents during VAT rate change conversion. Allows custom validation and preprocessing logic for sales document updates.
  • OnBeforeUpdateTable(TableID: Integer; ConvertVATProdPostingGroup: Boolean; ConvertGenProdPostingGroup: Boolean; var IsHandled: Boolean) (integration): Integration event raised before updating a specific table during VAT rate change conversion. Allows custom logic to override or enhance table-specific update processing.
  • OnBeforeUpdatePurchase(var VATRateChangeSetup: Record "VAT Rate Change Setup"; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header") (integration): Integration event raised before updating purchase documents during VAT rate change conversion. Allows custom validation and preprocessing logic for purchase document updates.
  • OnBeforeUpdateRec(var RecRef: RecordRef; ConvertVATProdPostingGroup: Boolean; ConvertGenProdPostingGroup: Boolean; var IsHandled: Boolean) (integration): Integration event raised before updating a record during VAT rate change conversion. Allows custom validation and preprocessing logic for individual record updates.
  • OnConvertOnBeforeStartConvert(var VATRateChangeSetup: Record "VAT Rate Change Setup") (integration): Integration event raised before starting the conversion process within the main convert operation. Allows custom initialization and validation logic at the beginning of the conversion workflow.
  • OnAfterAddNewSalesLine(var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") (integration): Integration event raised after adding a new sales line during VAT rate change conversion. Allows custom post-processing logic for the newly created sales line.
  • OnAfterAddNewPurchaseLine(var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") (integration): Integration event raised after adding a new purchase line during VAT rate change conversion. Allows custom post-processing logic for the newly created purchase line.
  • OnUpdatePurchaseOnAfterPurchaseHeaderSetFilters(var PurchaseHeader: Record "Purchase Header") (integration): Integration event raised after setting filters on purchase headers during purchase document update. Allows custom filter modifications for purchase header processing.
  • OnUpdatePurchaseOnAfterPurchaseLineSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header") (integration): Integration event raised after setting filters on purchase lines during purchase document update. Allows custom filter modifications for purchase line processing.
  • OnUpdateRecOnBeforeRecRefModify(var RecRef: RecordRef; GenProdPostingGroupConverted: Boolean; VATProdPostingGroupConverted: Boolean) (integration): Integration event raised before modifying a record reference during VAT rate change conversion. Allows custom logic before database modification occurs.
  • OnUpdateRecOnAfterRecRefModify(var RecRef: RecordRef; GenProdPostingGroupConverted: Boolean; VATProdPostingGroupConverted: Boolean) (integration): Integration event raised after modifying a record reference during VAT rate change conversion. Allows custom post-processing logic after database modification.
  • OnUpdateSalesOnAfterSalesHeaderSetFilters(VATRateChangeSetup: Record "VAT Rate Change Setup"; var SalesHeader: Record "Sales Header") (integration): Integration event raised after setting filters on sales headers during sales document update. Allows custom filter modifications for sales header processing.
  • OnUpdateSalesOnAfterSalesLineSetFilters(VATRateChangeSetup: Record "VAT Rate Change Setup"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") (integration)
  • OnUpdateSalesOnAfterModifySalesLine(var SalesLine: Record "Sales Line"; IsModified: Boolean; VATRateChangeSetup: Record "VAT Rate Change Setup"; SalesHeader: Record "Sales Header"; SalesLineOld: Record "Sales Line") (integration)
  • OnUpdateSalesOnAfterUpdateSalesLines(VATRateChangeSetup: Record "VAT Rate Change Setup"; var SalesHeader: Record "Sales Header"; ConvertVATProdPostingGroup: Boolean; ConvertGenProdPostingGroup: Boolean) (integration)
  • OnUpdatePurchaseOnAfterResetPurchaseHeaderStatus(var PurchaseHeader: Record "Purchase Header") (integration)
  • OnUpdatePurchaseOnAfterCalcShouldProcessLine(var PurchaseLine: Record "Purchase Line"; var ShouldProcessLine: Boolean) (integration)
  • OnUpdateSalesOnAfterResetSalesHeaderStatus(var SalesHeader: Record "Sales Header") (integration)
  • OnUpdateSalesOnBeforeModifySalesLine(var SalesLine: Record "Sales Line"; var IsModified: Boolean) (integration)
  • OnUpdatePurchaseOnBeforeModifyPurchaseLine(var PurchaseLine: Record "Purchase Line"; var IsModified: Boolean) (integration)
  • OnAddNewPurchaseLineOnAfterInsertNewLine(var PurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") (integration)
  • OnAddNewPurchaseLineOnBeforeInsertNewLine(var PurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") (integration)
  • OnAddNewSalesLineOnAfterInsertNewLine(var SalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line") (integration)
  • OnUpdateSalesOnBeforeChangeSalesLine(var SalesLine: Record "Sales Line") (integration)
  • OnUpdatePurchaseOnBeforeChangePurchaseLine(var PurchaseLine: Record "Purchase Line") (integration)
  • OnUpdatePurchaseBlanketOrderOnBeforeChangeBlanketOrder(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean) (integration)
  • OnUpdateSalesBlanketOrderOnBeforeChangeBlanketOrder(var SalesLine: Record "Sales Line"; var IsHandled: Boolean) (integration)
  • OnUpdatePurchaseOnAfterOpenPurchaseHeader(var PurchaseHeader: Record "Purchase Header") (integration)
  • OnUpdateSalesOnAfterOpenSalesHeader(var SalesHeader: Record "Sales Header") (integration)
  • OnUpdatePurchaseOnAfterUpdatePurchaseLines(VATRateChangeSetup: Record "VAT Rate Change Setup"; var PurchaseHeader: Record "Purchase Header"; ConvertVATProdPostingGroup: Boolean; ConvertGenProdPostingGroup: Boolean) (integration)
  • OnTestVATPostingSetupOnAfterVATPostingSetupOldSetFilters(var VATPostingSetupOld: Record "VAT Posting Setup"; VATRateChangeSetup: Record "VAT Rate Change Setup") (integration)
  • OnUpdateRecOnBeforeValidateGenProdPostingGroup(var RecRef: RecordRef; FldRef: FieldRef; VatRateChangeConversion: Record "VAT Rate Change Conversion"; var IsHandled: Boolean) (integration)
  • OnAddNewPurchaseLineOnAfterNewPurchaseLineInit(var OldPurchaseLine: Record "Purchase Line"; var NewPurchaseLine: Record "Purchase Line") (integration)
  • OnUpdatePurchaseOnAfterPurchaseLineModify(VATRateChangeSetup: Record "VAT Rate Change Setup"; PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PurchaseLineOld: Record "Purchase Line") (integration)
  • OnIncludePurchLineOnTypeElse(Type: Enum "Purchase Line Type"; var Result: Boolean; var IsHandled: Boolean) (integration)
  • OnIncludeSalesLineOnTypeElse(Type: Enum "Sales Line Type"; var Result: Boolean; var IsHandled: Boolean) (integration)
  • OnCanUpdatePurchaseOnAfterLoopIteration(var DescriptionTxt: Text[250]; PurchaseLine: Record "Purchase Line") (integration)
  • OnCanUpdatePurchaseOnAfterPurchaseLineSetFilters(var PurchaseLine: Record "Purchase Line") (integration)
  • OnCanUpdateSalesOnAfterLoopIteration(var DescriptionTxt: Text[250]; SalesLine: Record "Sales Line") (integration)
  • OnCanUpdateSalesOnAfterSalesLineSetFilters(var SalesLine: Record "Sales Line") (integration)
  • OnBeforeDoUpdatePurchaseLine(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean; var CanUpdate: Boolean) (integration)
  • OnBeforeDoUpdateSalesLine(SalesLine: Record "Sales Line"; var IsHandled: Boolean; var CanUpdate: Boolean) (integration)
  • OnBeforeCanUpdateSales(SalesHeader: Record "Sales Header"; ConvertVATProdPostingGroup: Boolean; ConvertGenProdPostingGroup: Boolean; var IsHandled: Boolean; var CanUpdate: Boolean) (integration)
  • OnBeforeCanUpdatePurchase(PurchaseHeader: Record "Purchase Header"; ConvertGenProdPostingGroup: Boolean; ConvertVATProdPostingGroup: Boolean; var IsHandled: Boolean; var CanUpdate: Boolean) (integration)
  • OnBeforeAddNewSalesLine(SalesLine: Record "Sales Line"; VATProdPostingGroup: Code[20]; GenProdPostingGroup: Code[20]; var IsHandled: Boolean) (integration)
  • OnBeforeAddNewPurchaseLine(PurchaseLine: Record "Purchase Line"; VATProdPostingGroup: Code[20]; GenProdPostingGroup: Code[20]; var IsHandled: Boolean) (integration)

Procedures

  • ConvertVATProdPostGrp(UpdateOption: Option): Boolean: Determines whether VAT product posting groups should be converted based on the update option.
  • ConvertGenProdPostGrp(UpdateOption: Option): Boolean: Determines whether general product posting groups should be converted based on the update option.
  • UpdateTable(TableID: Integer; ConvertVATProdPostingGroup: Boolean; ConvertGenProdPostingGroup: Boolean): Updates all records in a specified table with new VAT or general product posting groups.
  • UpdateRec(var RecRef: RecordRef; ConvertVATProdPostingGroup: Boolean; ConvertGenProdPostingGroup: Boolean): Updates posting group fields in a specific record and creates log entries for the changes.
  • WriteLogEntry(VATRateChangeLogEntry: Record "VAT Rate Change Log Entry"): Inserts a log entry for VAT rate change conversion tracking.
  • AddNewSalesLine(SalesLine: Record "Sales Line"; VATProdPostingGroup: Code[20]; GenProdPostingGroup: Code[20]): Creates a new sales line with updated posting groups when document lines need to be split during conversion. Handles complex scenarios with reservations, item charges, and blanket orders.
  • UpdatePurchase(): Updates purchase documents with new VAT and general product posting groups during conversion. Handles document status changes, line splitting, and complex validation scenarios.
  • GetNextPurchaseLineNo(PurchaseLine: Record "Purchase Line"; var NextLineNo: Integer): Boolean: Calculates the next available line number for a new purchase line.
  • UpdateUnitPriceInclVAT(Type: Enum "Sales Line Type"): Boolean: Determines whether unit price including VAT should be updated for the specified sales line type. Uses setup configuration to control which line types require price updates during VAT rate changes.
  • LineInScope(GenProdPostingGroup: Code[20]; VATProdPostingGroup: Code[20]; ConvertGenProdPostingGroup: Boolean; ConvertVATProdPostingGroup: Boolean): Boolean: Determines whether a record is in scope for conversion based on its posting group values.
  • GetNextSalesLineNo(SalesLine: Record "Sales Line"; var NextLineNo: Integer): Boolean: Calculates the next available line number for inserting a new sales line in the same document. Uses spacing logic to insert between existing lines when possible, or appends with standard increment.
  • GetRoundingPrecision(CurrencyCode: Code[10]): Decimal: Retrieves the unit amount rounding precision for the specified currency. Handles both local currency (empty code) and foreign currency scenarios with proper precision lookup.
  • IncludeSalesLine(Type: Enum "Sales Line Type"; No: Code[20]): Boolean: Determines whether a sales line with the specified type and number should be included in VAT rate change processing. Validates line inclusion based on setup configuration and posting group assignments.
  • IncludePurchLine(Type: Enum "Purchase Line Type"; No: Code[20]): Boolean: Determines whether a purchase line with the specified type and number should be included in VAT rate change processing. Validates line inclusion based on setup configuration and posting group assignments.
  • InitVATRateChangeLogEntry(var VATRateChangeLogEntry: Record "VAT Rate Change Log Entry"; RecRef: RecordRef; OutstandingQuantity: Decimal; LineNo: Integer): Initializes a VAT rate change log entry with standard tracking information for a record conversion. Sets up logging data including record identification, table reference, and status description.

Plus 25 local procedures.

Triggers

OnRun

Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.

Called by

Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "VAT Rate Change Conversion"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources