Payment term discount on payment doesnt consider the payment amount

Description

  1. Create an invoice with Payment term as 2% 10 Net 30 and grand total is say 237.50

  2. Create Payment and select invoice created in #1, it will populate payment amount as 232.75 and discount amount as 4.75.

  3. Change the payment amount from 232.75 to 10. However discount amount would be not updated and would be still at 4.75

  4. Complete this payment with payment amount as 10 and discount as 4.75

  5. Again create new payment for invoice in #1, payment amount would be 218 and discount amount would be 4.75

Here while calculating discount, system doesn't consider payment amount and based on invoice grand total amount and not even invoice open amount, it calculates discount.

Performed above scenario in https://test.idempiere.org/webui/
I believe discount should be calculated based on the amount of payment and not based on the invoice grand total.

Environment

None

Activity

Show:

Pritesh Shah January 22, 2019 at 2:38 PM

Thanks!
Fix looks good, if anyone is paying required invoice amount then only discount should apply otherwise if user wants to give discount on partial payment they can by updating discount field.

I am still evaluating with different business scenario with this fix.

Thanks,
Pritesh Shah

Carlos Ruiz January 19, 2019 at 11:36 AM

Hi , I committed a fix but with a different approach, if the payment is not full then it doesn't give a discount. Discount can still be fill manually.

Regards,

Carlos Ruiz

Fixed

Details

Assignee

Reporter

Priority

Created January 10, 2019 at 7:41 PM
Updated March 1, 2019 at 11:44 AM
Resolved January 19, 2019 at 11:36 AM