So by default on a Sales Order you have the field "Quantity to Ship" and "Quantity Shipped". Now when you would use the action "Create Warehouse Shipment" it would take the amount that's in the "Quantity to Ship" field of all the lines.
Now what i'm trying to achieve is following:
On the Sales Order line, I've added 2 more fields "Quantity to Get" and Quantity Gotten", these basically just stand for items that customers will come and pick up so they don't need to be send out.
Now the idea is when,
"Quantity to Ship" = 10 and "Quantity to Get" = 4 on line 1
and "Quantity to Ship" = 5 and "Quantity to Get" = 2 on line 2
2 warehouse shipments will be created when using the "Create Warehouse Shipment action", one shipment will contain 6 items of item 1 (= 10 - 4) and 3 items of item 2 (= 5 - 2)
the second shipment will contain 4 items of item 1 and 2 items of item 2 (these are basically the quantity to get field values).
As far as i know i should be working in codeunit 80 but i can't seem to find out on how to implement it.
Is there a way to achieve this?