Acumatica default behaviour will populate the Order Quantity to 1 on a new PO line, so I believe your check for the Qty being 0 will never occur, therefore your first scan is treated as 1+1