I was thinking I would iterate through the items l...
# suitescript
c
I was thinking I would iterate through the items list and hold all of the duplicate items in an array, fulfil the none duplicate ones then do some logic to fulfil the correct QTY for the duplicate items. This gets extra hard if there's only a partial fulfilment of a line and if the duplicate lines have different lot numbers.
b
will probably be easier to map the line ids from SO-Subsidiary-2 to the line ids from SO-Subsidiary-1
c
@battk I think the intercompany dropship feature may guarantee that the lines on each SO will always match, that makes it easier
I'll have to test that
s
FWIW, NFT already gives you a collection for line items, so I think the first step you mention is basically just
_.groupBy(rec.item, line=> <duplicate criteria here>)