Improved processing of closing invoices

For installment invoices, a distinction is now automatically made between installment lines and sales order lines based on the linked sales order line. This ensures that quantities and amounts are processed consistently when creating a closing invoice, and the invoice structure better aligns with the underlying sales order.