Hi,
Why SHIPMENT ID doesn’t appear ?
![](https://uploads-eu-west-1.insided.com/ifs-en/attachment/c8024eb9-1a29-49a1-92fb-4bf91df98701.png)
Hi,
Why SHIPMENT ID doesn’t appear ?
Hi
I think shipment ID is appearing only if you create a shipment invoice. Create a shipment invoice and check whether the shipment id is fetching to that field.
Thanks,
Chamath
Yes, it’s true.
Hi,
That’s correct. Shipment id is only retrieved when a shipment invoice is created. In your screenshot we can see CUSTORDDEB invoice types, which are invoices created per order, so then you have the Order No value fetched. In case of collective invoices CUSTCOLDEB that are not shipment invoices, then no shipment id, nor order no values are fetched and you can check the order numbers included in this invoice available in invoice lines.
Regards,
Pilar
Ran into this issue with a customer, but there were actually shipments tied to the invoices still. Not sure why IFS doesn’t show them here, but I made some read only custom fields to pull in the shipment ids.
SQL for Invoice lines:
(select LISTAGG(s.shipment_id, '; ') WITHIN GROUP (ORDER BY s.shipment_id) from ifsapp.shipment_line_ovw s where s.source_ref1 = :order_no and s.source_ref2 = :line_no and s.source_ref3 = :release_no)
SQL for invoice:
(select LISTAGG(distinct shipment_id, '; ') WITHIN GROUP (ORDER BY shipment_id) from ifsapp.CUST_ORDER_INV_ITEM_UIV_ALL il, ifsapp.shipment_line_ovw s where il.invoice_id = :invoice_id and s.source_ref1 = il.order_no and s.source_ref2 = il.line_no and s.source_ref3 = il.release_no)
Hi
Ideally, in case you need to create a customer invoice for customer order lines connected to a shipment, you should create a shipment invoice and then you will have the shipment id information.
Otherwise, you have the option you referred to capture this info in other types of invoices.
You can also create a new Idea in IFS Community, so this can be considered in future releases of IFS.
Regards,
Pilar
Realized my first queries were wrong above and would pull too many shipment IDs. Here are the corrected versions below.
select LISTAGG(distinct s.shipment_id, '; ') WITHIN GROUP (ORDER BY s.shipment_id) from ifsapp.CUST_ORDER_INV_ITEM_UIV_ALL il, (select d.shipment_id, c.item_id, c.invoice_id from ifsapp.cust_delivery_inv_ref_tab c join ifsapp.customer_order_delivery_tab d on c.deliv_no = d.deliv_no where c.invoice_id = :invoice_id) s where il.invoice_id = :invoice_id and il.item_id = s.item_id;
select LISTAGG(d.shipment_id, '; ') WITHIN GROUP (ORDER BY d.shipment_id) from ifsapp.cust_delivery_inv_ref_tab c join ifsapp.customer_order_delivery_tab d on c.deliv_no = d.deliv_no where c.invoice_id = :invoice_id and c.item_id = :item_id;
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.