Line discount applicable to 'Warehouse and customer' now applied before saving

API: New Sales Order Version 9.40

Earlier, line discounts applicable to ‘Warehouse and customer’ were not applied before an order was saved. This has now been fixed.