Skip to main content

Hello.

On my customer invoice report, I would need to split an invoice line according to deliveries say, for a invoiced quantity of 10, I would have a shipped quantity of 7 on my delivery DEL1 and a shipped quantity of 3 on my delivery DEL2

What’s the way for that?

Also, among the deliveries that I can find, I would make sure that these deliveries are not yet invoiced.

Thanks

IFSAPP10 UPDATE 5

Hello ​@romsar 

Did you try creating invoice with Create Shipment Invoices functionality. There you create invoice per each shipment/delivery. If you have 3 different shipments for single order then you will have 3 different invoices. You can deliver multiple orders in single shipment and those order lines will be added to the same invoice. 
let me know if this is what you are looking for.

Thanks

Furkam

 


Hello ​@Furkan Zengin 

No, I have no action to do in IFS, but on the customer invoice report.

To find the different deliveries on a customer invoice line, we run the following sql query :

 

SELECT DELIVERY FROM customer_order_ivc_rep

WHERE RESULT_KEY = xxxxxx

    AND DELIVERY IS NOT NULL

    AND ORDER_LINE_POS = xxxxx

    AND ROWNUM = 1

 

Where we get the ORDER_LINE_POS value from this sql query :

SELECT CUSTOMER_ORDER_INV_ITEM.POS

FROM CUSTOMER_ORDER_INV_ITEM

LEFT JOIN INVENTORY_PART ON (INVENTORY_PART.PART_NO = CUSTOMER_ORDER_INV_ITEM.CATALOG_NO AND INVENTORY_PART.CONTRACT=CUSTOMER_ORDER_INV_ITEM.CONTRACT )

LEFT JOIN CUSTOMER_ORDER_LINE_CFV ON (CUSTOMER_ORDER_LINE_CFV.LINE_NO = CUSTOMER_ORDER_INV_ITEM.LINE_NO AND CUSTOMER_ORDER_LINE_CFV.REL_NO = CUSTOMER_ORDER_INV_ITEM.RELEASE_NO AND CUSTOMER_ORDER_LINE_CFV.ORDER_NO = CUSTOMER_ORDER_INV_ITEM.ORDER_NO )

WHERE CUSTOMER_ORDER_INV_ITEM.INVOICE_ID = xxxx

 

The CUSTOMER_ORDER_COLL_IVC_REP.DELIVERY field displays delivery notes with a comma as separated value, but I need to know the shipped quantity on each customer invoice line and for each delivery note


Hello ​@romsar 

Please review following views. Here you will have connection between invoice, delivery note, shipment and quantities. It may help you to split invoice lines per delivery.

 

select * from cust_delivery_inv_ref

select * from customer_order_delivery


Hello ​@Furkan Zengin 

So I would need to run this following sql query to get the different delnote N° :
select cust_delivery_inv_ref.ITEM_ID, customer_order_delivery.QTY_SHIPPED, customer_order_delivery.DELNOTE_NO,

        CUST_ORDER_INV_ITEM_UIV_ALL.catalog_no, CUST_ORDER_INV_ITEM_UIV_ALL.description,

        CUST_ORDER_INV_ITEM_UIV_ALL.LINE_NO, CUST_ORDER_INV_ITEM_UIV_ALL.CUSTOMER_PO_NO,

        customer_order_line.customer_po_line_no,

        CUST_ORDER_INV_ITEM_UIV_ALL.VAT_CODE,

        CUST_ORDER_INV_ITEM_UIV_ALL.SALE_UNIT_PRICE,

        customer_order.currency_code

from customer_order_delivery

inner join cust_delivery_inv_ref on cust_delivery_inv_ref.DELIV_NO=customer_order_delivery.DELIV_NO

inner join CUST_ORDER_INV_ITEM_UIV_ALL on CUST_ORDER_INV_ITEM_UIV_ALL.COMPANY=cust_delivery_inv_ref.COMPANY

            AND CUST_ORDER_INV_ITEM_UIV_ALL.INVOICE_ID=cust_delivery_inv_ref.INVOICE_ID

            AND CUST_ORDER_INV_ITEM_UIV_ALL.ITEM_ID=cust_delivery_inv_ref.ITEM_ID        

inner join customer_order_line on customer_order_line.order_no=CUST_ORDER_INV_ITEM_UIV_ALL.order_no

                and customer_order_line.line_no=CUST_ORDER_INV_ITEM_UIV_ALL.line_no

                and customer_order_line.rel_no=CUST_ORDER_INV_ITEM_UIV_ALL.release_no

                and customer_order_line.line_item_no=CUST_ORDER_INV_ITEM_UIV_ALL.line_item_no

                and customer_order_line.contract=CUST_ORDER_INV_ITEM_UIV_ALL.contract

inner join customer_order on customer_order.contract=customer_order_line.contract

                and customer_order.order_no=customer_order_line.order_no

where cust_delivery_inv_ref.COMPANY=xxxxx

and cust_delivery_inv_ref.INVOICE_ID=xxxxx

order by CUST_ORDER_INV_ITEM_UIV_ALL.pos

 

My query is returning appropriated informations. I reached an invoice with 1 line but 2 deliveries, the query returns 2 lines with a different QTY_SHIPPED and DELNOTE_NO values.

Do you think I can go this way? and how to make sure that it’s returning non invoiced deliveries?


Reply