Split Order lines into mutliple deliveries based on custom logic
Hi Team,
We have an urgent requirement:
Suppose there are 5 order lines having each line as qty1 in Single sales order. This order is being shipped to Tamilnadu state. This order has 3 items old in nature and 2 items NEW. So Business wants, whenever there are NEW items in Sales order and if those are being shipped to particular state say Tamilnadu, then they want separate invoice for those NEW Items and separate invoice for remaining.
In current setup, there is one delivery created for all these 5 lines so one Invoice.
Proposed Solution:
We will define one Lookup having these NEW Items and Ship to State. Will write one custom program that will check this condition and if satisfies from lookup, then it should create separate deliveries for 3 lines and 2 lines respectively. Then it will create separate Invoices after shipping.