For this purpose, a bulk task is added to the system Convert VAT Rate in Active Contracts (API Change VAT Group Aft. Act. (78001)). This task ensures the exchange / conversion of VAT product posting groups on contracts in the Active status, both in the contract header and in other tables that are related to the contract and have an impact on the VAT calculation. I.e. the change will also be made for related services, insurance and calendars.

This modification takes place without the use of change copies directly on the originals of these contracts and is based on the logic of the API Contract Services Change (4026638) task.

Button Convert Active Contracts to run the job, it is added to the VAT Rate Change Setup page. It is also possible to search for a task using the system magnifier.

image-20241128-125236.png

Request Form

When the task starts, a dialog box opens Convert VAT Rate in Active Contracts To specify criteria and filters:

image-20241128-125123.png

In the section "Options" are the fields:

In the section "Filter: Financing Contract Header" are the filters:

User filters are all empty by default

The general principles of filtering in BC are described here:

Sorting, Searching, and Filtering Lists - Business Central | Microsoft Learn

It also has a role to play in Fixed filters per contract header – only contracts that meet:

When setting up user filters, the user must also take into account fixed filters that are in the code and cannot be modified by the user – i.e. if the user has set the user filter to e.g. Status=Closed, contracts in this state will not be processed, because the fixed filter Status=Active takes precedence over user filters.

The task can be started by clicking OK or Schedule... (Schedule...). If the task is started by the OK button, it runs interactively (displays possible messages) under the given user. If the task is started by the Schedule... button, the execution itself is executed via the job queue (scheduler) – the messages are suppressed, or it is no longer necessary for the user to be logged in after the start (description below).

Job Process

After starting the task with the "OK" or "Schedule" button, the system executes:

Processing of the original contract

Task:

image-20241031-082514.png

Entry in the history of contract changes

To create an entry in the API Contract Change History (4046858), it uses the following values:

Starting a task via the job queue, the Schedule... button, the Contract Change Queue and the Contract Change Log are described in PD https://iao.atlassian.net/wiki/x/jADVAQhttps://iao.atlassian.net/wiki/x/nADVAQ https://iao.atlassian.net/wiki/x/wADWAQ.

Example of logs for this task:

image-20241128-141403.png