Added support to post sales orders with a negative total amount
With this change you can enable to support sales order and invoice postings with a negative total amount.
To enable this feature you have to check the checkbox "Allow Negative Posting" in Wood Setup (Sales).
Note: posting specific sales order lines with a negative quantity and line amount works also without setting the checkbox. The new setting is needed in case the total amount of all positions is negative.
Posting negative quantities in a sales order conflicts with warehouse handling. On a location with warehouse receive mandatory posting negative quantities is still not supported as you cannot create warehouse receipts from sales orders.