Add support for early payment or cash discounts
"One study found that if the credit term is net 30 days, the money, on average, arrived 45 days after the invoice date. In order to speed up these payments, some companies give credit terms that offer a discount to those customers who pay within a shorter period of time. The discount is referred to as a sales discount or cash discount, and the shorter period of time is known as the discount period. For example, the term 2/10, net 30 allows a customer to deduct 2% of the net amount owed if the customer pays within 10 days of the invoice date. If a customer does not pay within the discount period of 10 days, the net purchase amount (without the discount) is due 30 days after the invoice date."
Corresponding issue, https://issues.openbravo.com/view.php?id=19375.
In the current product it is possible to implement (work-around) this feature using standard Discount functionality: create Discount and name it "Early Payment" and change printing form to reflect such discount not as a product line but as a discount.
Jan Hendrik Mensen commented
This just happens to be a requirement for our only Spanish customer who explained to me that this is common way of doing business and invoicing in Spain. Off course this is also used outside Spain and support for this is recommended on: printing forms Importe Bruto - Discuento = Base Imponible, VAT over Base = Total Factura. It essentially means to not include the discount in the Bruto. Posting is clearly explained in link attacahed in suggestion. A simple solution would be to allow posting to Discount account when creating payment (as you can do now for posting write-offs).