Hi Shadab,
In addition, check the last used record ID in the InventTrans table. Compare this with the NextRec value in the table SysSequences for the table InventTrans (table ID 177).
Probably this is changed by someone.
Have you also tried to restart the AOS machine(s)?