If I have more than 1 item in a line we have a process allowing you to duplicate that item into individual lines based upon the quantity purchased. An issue has arisen where you have 5 items in quantity and when you hit duplicate and run the process with that single line selected you get 5 individual lines with the info in each single line. So 5 works great.
However, If you have 10 items you only get 8 lines of items.
100 item quantity gets you 88 lines
20 item quantity we get 19 lines.
It is very inconsistent? I don't know why. Here is the code we are using.
FIND Item WHERE EXISTS Item WHERE (Item.OrderNumber=Order.OrderNumber AND Item.Quantity>=2) IN BATCHES OF 1
DUPLICATE Item EXCEPT Quantity,TotalQuantity
IF Item WAS ADDED TO ThisOrder
Then ThisItem.Quantity=1
IF Item.Quantity>=2
Then REDUCE Item.Quantity BY 1
UPDATE Item
In doing this process you do have to select the item you want to have duplicated.
Hopefully I gave enough information for someone to see where the issue is.
Thank you as always.