Bugs on Stock Entry with serial numbers of item

Bugs on Stock Entry with serial numbers of item after submit then cancel then delete the document

the problem is the all serial numbers as they are still on serial number table .