Sales invoice generated with sales order still on 'Booked' status
Good day!
We have an issue where in a sales invoice was generated even if the sales order is still on 'Booked' status.
Example:
- Sales order has three items.
- After booking and releasing the sales order, the first two items were picked while the third item was backordered.
- A sales invoice was generated containing only the two picked items.
- The third item is still on backordered and the sales order status is on 'Booked'.
The problem is that we should not be generating a sales invoice until the sales order status is 'Closed'. This means that either we cancel the third item or generate an inventory for that item in order for the sales order to push through.