By using this website, you agree to our Terms of Use (click here)
Hello,ย
I'm trying to create a GI that shows all orders that only have a inventory ID that starts with "6". These items are our Holiday gift boxes.ย
I don't want any orders to show up where someone orders a gift box plus additional items.ย
If the order includes multiple gift boxes (60001 and 60002 for example) then it should appear on the list.ย
If the order includes 60001 and another item 10003, then it should not be included.ย
Does anyone have any thoughts on how I could get this started?
Thanks!
This is not what you asked for specifically, but in SQL you could do this:
SELECT * FROM SOOrder o LEFT JOIN SOLine l ON (o.id = l.OrderNbr) WHERE o.id NOT IN ( SELECT sub_o.id FROM SOOrder sub_o LEFT JOIN SOLine sub_l ON (sub_o.id = sub_l.OrderNbr) WHERE sub_l.InventoryID NOT LIKE '6%' )
I'm still very new to Acumatica, so I'm not sure if Gi supports sub-queries. I will look into that for my own curiosity unless someone else can chime in.
Also, this could be manually turned into a View in the database so it would possibly become compatible with GI, but I think you'd need a DAC for that... might be a good candidate for a Customization Project. However, I'd love know if there's an easier way too!
Join SOOrder to SOLine and SOLine to InventoryItem
You can then set a condition the InventoryCD starts with 6
ย
You could also add an attribute to the item called Holiday Boxes and filter the condition based off the attribute.
ย
Instead of setting the condition so that it starts with 6, what about setting a condition so that it excludes items that start with 1-5 (assuming that 6 is the highest start), or excludes 1-5 and 7-9 ... would that do the trick without overthinking?ย
ย
I sometimes take a two step approach if the outcome is that specific.
Create a column in the results list that checks for the 6 and with the group by at the order level if a non 6 occurs on any line then max returns.ย ย =Max(IIf( Left( [InventoryItem.InventoryCD], 1) = '6', 0, 999))
ย
Then just use a filter on the GI output to only show the 0
ย
ย
Working with the tools they give us.ย 😀ย
Perhaps take a different approach and just select orders with the item 6 on it, sum the soline.qty on the lines and compare to the total soorder qty.ย ย If different then clearly other things on it.....
ย