Hello Gurus,
I'm trying to show the value of isfulfillable field on all transaction lines (including Kit members/components) using SuiteQL.
Here is how the transaction looks:
Transaction Lines:
Item ID Type isFulfillable:
Item A 11580 Standalone F
Item A 11580 Standalone F
Item B 20034 Kit/Package F
Item B (Kit/Package) Components:
Item ID Type isFulfillable:
Item B : Component A 19927 Standalone F
Item B : Component B 19224 Standalone T
So far I was able to list the value of isfulfillable on all kit members using this SuiteQL query:
SELECT
MemberItem.ID AS ID,
MemberItem.isFulfillable AS isFulfillable
FROM
Item AS ParentItem
INNER JOIN KitItemMember ON (
KitItemMember.ParentItem = ParentItem.ID
)
INNER JOIN Item AS MemberItem ON (
MemberItem.ID = KitItemMember.Item
)
WHERE
ParentItem.ID IN (
SELECT
Item.ID,
FROM
Transaction
INNER JOIN TransactionLine ON (
TransactionLine.Transaction = Transaction.ID
)
INNER JOIN Item ON (Item.ID = TransactionLine.Item)
WHERE
(Transaction.ID = 19615846)
)
ORDER BY
KitItemMember.LineNumber
The input is the transaction id, in this case 19615846.
The output of the query is:
[
{
"id": 19927,
"isfulfillable": "F"
},
{
"id": 19224,
"isfulfillable": "T"
}
]
The questions is, how can I include the value of isfulfillable field of the standalone items too in the output?
Your help is highly appreciated. Thanks!