I get duplicate serial or lot number error but I deleted the transaction that used it.

As the administrator 

go to  File - Maintain - Advance 

Delete unused serial or lot #s