You should run report Inventory > LOGI_04 Stock in/Out Report to verify the correctness of all transactions. If some transactions are wrong or missing, then correct it. If all transactions are correct, then discrepancy is caused by some events which are not recorded in the system, such as stolen by theft. Then stock adjustment should be used to correct the inventory. Refer to stock adjustment.