To reduce the number of documents in the StoreHouse 5 database and delete "unnecessary" periods of the sets, you can use the Unnecessary data removal function in the Sdbman.exe application. This function works since StoreHouse version 5.109.401.

The following documents can be removed before the specified date:

When removing the invoices, the system forms incoming balances for the specified date. You can remove invoices:

The following documents are left without changes:

Deleting Data

Checking Database for Errors

First, you need to check the database for errors. For this:

  1. Run the Sdbman.exe application
  2. Go to StoreHouse > Validate Store House
  3. Make sure there are no errors
  4. Go to Maintenance > Database check
  5. Go to Document > Run check

If errors are found, they must be corrected before removng the documents.

Backup

Back up your database. For this:

  1. In Sdbman.exe, go to Maintenance > Backup
  2. In the window that appears, select Yes
  3. A message will appear informing you that the backup was successful. Click Ok.

Done, you can proceed to remove data.

Deleting Data

  1. In Sdbman.exe, go to StoreHouse > Unnecessary data removal. The settings window will open:
  2. Specify the data:
  3. It is recommended to do a test run before removing data. In the data removal settings window, set the Just check the feasibility flag and click the Execute button

    1. If the removal is impossible, the system will display an error message. For more information about errors, see the Possible Errors article.

    2. If the test removal works correctly, the system will display a message:

      Click OK and go to the next step.
  4. In the data removal settings window, remove the Just check the feasibility, leaving the other settings unchanged. Click the Execute button
  5. Before starting to remove data, the system will offer to perform a backup. If you have not done it beforehand, click Yes. If you have a backup, click No

  6. The system started deleting data. As soon as it finishes, a message will appear:
  7. Click Ok. The procedure is complete.

To check if the procedure was successful, open the SH.exe application. Go to Documents > Delivery notes. Specify the parameters and click Apply.
In the list of notes, incoming balances will be formed in accordance with the specified rules for each division of the database.

Reasons for Incoming Balances Forming

If in the cut-off period the balances have zero or negative value, the first delivery note by date in the stored period is searched for for the corresponding FIFO queue.
If this is a receipt document, then there is no need to save the incoming balance — the next write-off will be based on it, and it will determine the cost of the subsequent expense.
If this is an expense document, then the receipt document in the period to be deleted is used to form its cost price, and it is necessary to create receipt notes of incoming balances. But since the balance on the date of period cutting was not positive, a mirrored expense note is created to compensate for the receipt one. Thus, this expense note sets the incoming balance to zero.