Symptom: The Stock Quantity displayed in Stock\Spares Screen ("Actual Qty") is not equal to the sum of quantities in Spares Transactions ("Calculated Qty").

 

Status: Data issue, various causes.


Affected products: KapaMPI all versions.

 

Resolution: Download and run the attached script "FixSparesQties.hsql". This script will do the following:
  1. Clears multiple Location entries that have been erroneously created.

  2. Modifies Transaction Qty from negative to positive. All entries should be of positive Qties.

  3. Inserts a new entry marked as "Transaction discrepancies" for cases where Actual Qty is less than Calculated

  4. Inserts a new entry marked as "Initial Value", with date set to 1/1/2009, for cases where Calculated is less than Actual Qty 

Any changes done by this script will also be exported to vessels.


A script that only modifies the Training DB is also available, for testing purposes: "FixSparesQties-Training.hsql"