This procedure can only be performed on server-based / local installations where you have access to the database. Immediately after completing this procedure, the triggers must be reactivated.
The cancellation of documents does not stall, however it takes a very long time — this is due to database triggers.
When an invoice is cancelled, the associated stock documents are also cancelled, stock items are removed, and after each cancellation the stock is recalculated.
The solution is to disable these triggers and proceed as follows:
Disable triggers — alter table dpolsklad disable trigger user;
Import the XML file for invoice cancellation
Enable triggers — alter table dpolsklad enable trigger user;
Run stock recalculation
Run account balance recalculation
The last two steps may take several hours!
During these operations, no one should be accessing Flexi — it is advisable to restrict access, including API access. We therefore recommend carrying out this process overnight.
