Hi,
I have to add another two more conditions to my custom view.
*get sales orders when InventoryItem.itemType == charges or soline.openQty > 0
The sql query is something like this to get an idea,
Select * from
soline line
innerJoin soorder order on line.orderNbr/ordertype= order.orderNbr/ordertype
leftJoin solinesplit split on line.orderNbr/orderType/lineNbr = split.orderNbr/orderType/lineNbr
leftJoin inventoryItem item on line.inventoryId= item.inventoryId
where other conditions....
and order.status != "Cancelled"
and (item.itemType == "Charges" or line.openQty > 0)
I tried to apply above condition in the below bql query but it doesn’t look like as what I wanted. so could someone please to help me on this?
public PXSelectJoin<
SOLine, InnerJoin<SOOrder, On<SOLine.orderNbr, Equal<SOOrder.orderNbr>,
And<SOLine.orderType, Equal<SOOrder.orderType>>
>, LeftJoin<SOLineSplit, On<SOLine.orderNbr, Equal<SOLineSplit.orderNbr>,
And<SOLine.orderType, Equal<SOLineSplit.orderType>,
And<SOLine.lineNbr, Equal<SOLineSplit.lineNbr>>>
>, LeftJoin<InventoryItem, On<SOLine.inventoryID, Equal<InventoryItem.inventoryID>>>>>,
Where<SOLine.customerID, Equal<Current<APProforma.customerID>>,
And<
SOOrder.customerLocationID, Equal<Current<APProforma.locationCD>>,
And<SOOrder.status, NotEqual<SOOrderStatus.cancelled>,
And<InventoryItem.itemType, Equal<INItemTypes.chargeItem>,
Or<SOLine.openQty, Greater<decimal0>>>>
>>> POrdersView;