We had the same problem with one of our client. The reason behind was, there were some orphans purchParmSubLine records lying in the table, which led to add up the remain del note qty and attempting to post Delivery note again. We suspected, the reasons these records were left in the table, when posting failed for any reason or client session crashed when posting was being done. Anyways, simple way to resolve it by creating a simple job to clean up those records and Hallelujah! the problem is gone!