Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018491Openbravo ERPZ. Otherspublic2011-09-09 15:012011-11-04 13:58
mirurita 
mirurita 
normalmajoralways
closedfixed 
5
 
3.0MP5 
Advanced Payables and Receivables Mngmt
No
0018491: A validation in payment process is not allowing to pay a negative invoice (invoicing totally an order) which has a discount
A 'validateAmount' method in payment process is failing when you try to pay an negative invoice with the following details:
 - Invoices totally a negative order
 - The invoice has a discount
1) Create a Sales Order
 1.1) Lines
       - Product: Any
       - Quantity: -10
       - Unit Price: 1€
 1.2) Complete. Total of the order: -10€

2) Invoice totally previous order and add a discount of 10%
 2.1) Complete the invoice. Total of the invoice will be 9€ after applying the discount.

3) Click on Add Payment Details button. When the pop-up is opened click on Process button.

4) Notice that the validation is failing.
Error: Amount out of range: -10.00 cannot be used as outstanding amount is -9.00
No tags attached.
depends on backport 00189422.50MP36 closed mirurita A validation in payment process is not allowing to pay a negative invoice (invoicing totally an order) which has a discount 
png Payment Process validation failure.png (69,016) 2011-09-09 15:01
https://issues.openbravo.com/file_download.php?file_id=4530&type=bug
png
Issue History
2011-09-09 15:01miruritaNew Issue
2011-09-09 15:01miruritaAssigned To => eduardo_Argal
2011-09-09 15:01miruritaFile Added: Payment Process validation failure.png
2011-09-09 15:01miruritaModules => Advanced Payables and Receivables Mngmt
2011-09-15 12:52dalsasuaAssigned Toeduardo_Argal => mirurita
2011-09-27 12:02miruritaTarget Version3.0MP4 => 3.0MP5
2011-10-19 11:15xabiermerinoNote Added: 0041925
2011-10-19 11:20xabiermerinoResolution time => 1321830000
2011-10-31 11:52miruritaStatusnew => scheduled
2011-10-31 11:52miruritafix_in_branch => pi
2011-10-31 12:24hgbotCheckin
2011-10-31 12:24hgbotNote Added: 0042405
2011-10-31 12:24hgbotStatusscheduled => resolved
2011-10-31 12:24hgbotResolutionopen => fixed
2011-10-31 12:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d9618a03e3bb568b56dd938c3694b11a5bd69c77 [^]
2011-11-03 18:57maiteNote Added: 0042513
2011-11-03 18:57maiteStatusresolved => closed
2011-11-04 13:58hudsonbotCheckin
2011-11-04 13:58hudsonbotNote Added: 0042611

Notes
(0041925)
xabiermerino   
2011-10-19 11:15   
Other problem related:

- Create an order with these lines:
    - Quantity: 50: price: 1
    - Quantity: -10; price: 1
- Create an invoice and create the line with quantity positive using 'Copy Lines From'
- Try to add a payment
- An error appears because the amount of the invoice is bigger than the order's amount
(0042405)
hgbot   
2011-10-31 12:24   
Repository: erp/devel/pi
Changeset: d9618a03e3bb568b56dd938c3694b11a5bd69c77
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Mon Oct 31 12:20:52 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d9618a03e3bb568b56dd938c3694b11a5bd69c77 [^]

Fixes issue 18491: validation in payment process is failing.
Validation is failing under some circunstancies (see issue notes).
The validation was preventing to pay more than expected in the payment plan (overpayments).
But due to how payment schedule details are created (in extension point), temporary overpayments
are allowed. In this case the validation was showing an error and it was not possible to
process the payment.
The only case in which the validation is adding value is when the payment plan info does not match
with the payment schedule details. This can happen because of an issue. We already have alerts for
checking this scenarios and the APRM payment monitor is able to fix incorrect payment plans.
The validation has been removed

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0042513)
maite   
2011-11-03 18:57   
verified
(0042611)
hudsonbot   
2011-11-04 13:58   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/d10da320df2a [^]

Maturity status: Test