Discount is taken at payment time in WebERP, not invoice time. When paying an invoice you can pay less than owed and enter the difference in the discount field.
You can also enter a reduced price at Invoice time but this won't record it as a discount (but you will owe less and pay less)
The problem is that if you receive an invoice with an agreed discount percent and an invoice total, the payment must correspond to the invoice total.
Inserting an amount lower than the purchased items amount generate an error.
The only way is to insert a dumb shipment with a negative amount (horrible).
In every case the cost assigned to the items is wrong.