Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034589Openbravo ERP09. Financial managementpublic2016-11-21 11:332017-04-01 12:06
psanjuan 
rqueralta 
urgentmajoralways
closedfixed 
30Professional Appliance
 
3.0PR17Q1 
markmm82
Core
No
0034589: Error message needed in case of voiding an invoice having an "Awaiting Execution" or "Awaiting Payment" payment related.
Error message needed in case of voiding an invoice having an "Awaiting Execution" or "Awaiting Payment" payment related.
1) "Awaiting Execution" payment status:

Create a Sales Invoice for F&B España, Alimentos business partner.

Change payment method to an automatic payment method such as "Print Check Simple process" or "Remittance", set up as "Deferred" = Yes.

Add any line to the invoice. Complete and Post the invoice.

Partially pay the invoice and do NOT execute that payment, therefore payment created is in status "Awaiting Execution".

Try to void the invoice.

The invoice is voided, and a new payment is created in status "Payment Received" including remaining sales invoice to pay, and reverse sales invoice amount.

This is not correct.

An error message needs to be shown saying that "Invoice can not be voided as there is an awaiting execution or awaiting payment related. Please either execute that payment or cancel it".


2) "Awaiting Payment" payment status:

Create a Sales Invoice for F&B España, Alimentos business partner.

Change payment method to an automatic payment method such as "Print Check Simple process" or "Remittance", set up as "Deferred" = Yes.

Add any line to the invoice. Complete and Post the invoice.

Partially pay the invoice and do NOT execute that payment, therefore payment created is in status "Awaiting Execution".

Go to the payment and press the button Reactivate. Choose "Reactivate" action, therefore payment status is "Awaiting Payment".

Try to void the invoice.

The invoice is voided, and a new payment is created in status "Payment Received" including remaining sales invoice amount to pay, and reverse sales invoice amount.

This is not correct.

An error message needs to be shown saying that "Invoice can not be voided as there is an awaiting execution or awaiting payment related. Please either execute that payment or cancel it".

(*) Proposed scenario 1: partially paid invoice or totally paid invoice, but payment related do not executed. Once error is shown, the payment is Voided.

Create a Sales Invoice for F&B España, Alimentos business partner.
Change payment method to an automatic payment method such as "Print Check Simple process" or "Remittance", set up as "Deferred" = Yes.

Add any line to the invoice. Complete and Post the invoice.
Partially pay the invoice and do NOT execute that payment.

Try to void the invoice.

An error message is shown saying that "Invoice can not be voided as there is an awaiting execution payment related. Please either execute that payment or cancel it".

Navigate to the payment and press Reactivate button, select "Void" action. Press OK.

Go back to the invoice and void it once again.

Check that the invoice has been voided by a reverse document. Go to payment plan tab and verify there are 2 payments. Go to Payment details tab and verify that first payment is in status Void and second one as "Payment Received". Navigate to that payment.

Check it does have include the invoice and its reverse. Amount is 0.00 and status is "Payment Received".

Repeat same test by using below listed actions in the payment window:

- Navigate to the payment and press Reactivate button, select "Reactivate and Delete lines" action. Press OK. Same result is obtained.

(*) Proposed scenario 2: partially paid invoice or totally paid invoice, but payment related do not executed. Once error is shown, the payment is Executed.

Create a Sales Invoice for F&B España, Alimentos business partner.
Change payment method to an automatic payment method such as "Print Check Simple process" or "Remittance", set up as "Deferred" = Yes.

Add any line to the invoice. Complete and Post the invoice.
Partially pay the invoice and do NOT execute that payment.

Try to void the invoice.

An error message is shown saying that "Invoice can not be voided as there is an awaiting execution payment related. Please either execute that payment or cancel it".

Navigate to the payment and press Execute button to execute the payment.

Go back to the invoice and void it once again.

Check that the invoice has been voided by a reverse document and no additional payment in has been created. Go to payment plan tab and verify there is only payment.

Reverse invoice does not have any payment related.

(*) Proposed scenario 3: partially paid invoice or totally paid invoice, but payment related do not execute, but reactivated.

Create a Sales Invoice for F&B España, Alimentos business partner.
Change payment method to an automatic payment method such as "Print Check Simple process" or "Remittance", set up as "Deferred" = Yes.

Add any line to the invoice. Complete and Post the invoice.
Partially pay the invoice and do NOT execute that payment, but just Reactivate it by unsing the option "Reactivate", Action "Reactivate".

Try to void the invoice.

An error message is shown saying that "Invoice can not be voided as there is an awaiting execution payment related. Please either execute that payment or cancel it".

Go back to the payment and press add details, select the invoice to pay and either execute the payment, or void it or reactivate it and delete its lines.
No tags attached.
related to defect 0034322 closed rqueralta Payment of 0 amount created when voiding an unpaid invoice is created in Awaiting Execution status 
related to defect 0037963 closed markmm82 Payment in Awaiting payment status is created when an invoice cannot be voided because document cancelled is a return 
Issue History
2016-11-21 11:33psanjuanNew Issue
2016-11-21 11:33psanjuanAssigned To => Triage Finance
2016-11-21 11:33psanjuanModules => Core
2016-11-21 11:33psanjuanTriggers an Emergency Pack => No
2016-11-21 11:38psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13847#r13847
2016-11-21 11:56psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13848#r13848
2016-11-21 11:56psanjuanRelationship addedrelated to 0034322
2016-11-21 11:58psanjuanProposed Solution updated
2016-11-21 12:06psanjuanProposed Solution updated
2016-11-21 12:11psanjuanProposed Solution updated
2016-11-21 12:18psanjuanNote Added: 0091693
2016-11-22 16:08rqueraltaAssigned ToTriage Finance => rqueralta
2016-11-22 16:09rqueraltaStatusnew => scheduled
2016-12-21 15:10hgbotCheckin
2016-12-21 15:10hgbotNote Added: 0092907
2016-12-21 15:10hgbotStatusscheduled => resolved
2016-12-21 15:10hgbotResolutionopen => fixed
2016-12-21 15:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6b520396354e6df4f96f72121221c1729c0fe0c9 [^]
2016-12-21 15:10hgbotCheckin
2016-12-21 15:10hgbotNote Added: 0092908
2016-12-21 15:19hgbotCheckin
2016-12-21 15:19hgbotNote Added: 0092909
2016-12-21 15:25markmm82Review Assigned To => markmm82
2016-12-21 15:25markmm82Note Added: 0092910
2016-12-21 15:25markmm82Statusresolved => closed
2016-12-21 15:25markmm82Fixed in Version => 3.0PR17Q1
2016-12-21 20:51hudsonbotCheckin
2016-12-21 20:51hudsonbotNote Added: 0092926
2016-12-21 20:51hudsonbotCheckin
2016-12-21 20:51hudsonbotNote Added: 0092927
2016-12-21 20:51hudsonbotCheckin
2016-12-21 20:51hudsonbotNote Added: 0092928
2017-03-31 13:22hgbotCheckin
2017-03-31 13:22hgbotNote Added: 0095767
2017-04-01 12:06hudsonbotCheckin
2017-04-01 12:06hudsonbotNote Added: 0095781
2018-02-16 15:02ngarciaRelationship addedrelated to 0037963

Notes
(0091693)
psanjuan   
2016-11-21 12:18   
Test Case 1- voice partially paid by an automatic payment method (Check) and void. First Payment not executed.

Go to Sales Invoice and create a new invoice for F&B España, Alimentos business partner. Select Check payment method. Complete the invoice.

Partially paid the invoice.
Verify that a payment in is created with status "Awaiting Execution".
Do not execute the payment created.

Void the invoice.

Check that a payment in has been created including Invoice remaining amount to pay and Reverse Amount to pay. This is not correct. Implement proposed scenario 2 above. Same would apply in case of totally paying the invoice, but the payment related in "Awaiting Execution" status is not executed.

Repeat same test case for a purchase invoice.


Test Case 2 - Invoice partially paid by an automatic payment method (Check) and void. First Payment executed.

Go to Sales Invoice and create a new invoice for F&B España, Alimentos business partner. Select Check payment method. Complete the invoice.

Partially paid the invoice.
Verify that a payment in is created with status "Awaiting Execution".
Execute the payment created. Check that payment status has changed to "Payment Received".

Verify that sales invoice shows a received amount of the payment received.

Void the invoice.

Verify that there is no new payment in created and both sales invoice and reversed sales invoice remain as they are.

Repeat same test case for a purchase invoice.
(0092907)
hgbot   
2016-12-21 15:10   
Repository: erp/devel/pi
Changeset: 6b520396354e6df4f96f72121221c1729c0fe0c9
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Mon Nov 21 10:14:44 2016 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/6b520396354e6df4f96f72121221c1729c0fe0c9 [^]

Fixes issue 34589: Error message when voiding an invoice with a related payment

An error message is shown in case of voiding an invoice having an "Awaiting Execution" or "Awaiting Payment" payment related.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
---
(0092908)
hgbot   
2016-12-21 15:10   
Repository: erp/devel/pi
Changeset: c305082199cf920f705e80a85c9b170a85d3bfe4
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Dec 19 13:56:15 2016 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/c305082199cf920f705e80a85c9b170a85d3bfe4 [^]

Related to issue 34589: Code review improvements

Merged two conditions in only one to evaluate if an Invoice has an awaiting execution payment related.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
---
(0092909)
hgbot   
2016-12-21 15:19   
Repository: erp/devel/pi
Changeset: 6d2315567e5fbffabae911a59ec72dc59ff176da
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Dec 21 09:15:42 2016 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/6d2315567e5fbffabae911a59ec72dc59ff176da [^]

Related to issue 34589: Fixed code format

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
---
(0092910)
markmm82   
2016-12-21 15:25   
Code review + Testing OK
(0092926)
hudsonbot   
2016-12-21 20:51   
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/abc21394bfb8 [^]
Maturity status: Test
(0092927)
hudsonbot   
2016-12-21 20:51   
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/abc21394bfb8 [^]
Maturity status: Test
(0092928)
hudsonbot   
2016-12-21 20:51   
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/abc21394bfb8 [^]
Maturity status: Test
(0095767)
hgbot   
2017-03-31 13:22   
Repository: erp/devel/pi
Changeset: 4690240411138ef7779f411988811cc31ecc2d3e
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Mar 31 13:14:06 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4690240411138ef7779f411988811cc31ecc2d3e [^]

Related to issue 34589 & Related to issue 34992: Code review improvements

Use lowercase letter in hql to be more readable.
Use ids in where clauses instead of dal objects.
Change in clause with a join in psdQuery query to improve performance.
Use query.list() directly in for statement.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
---
(0095781)
hudsonbot   
2017-04-01 12:06   
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/44185ff76d75 [^]
Maturity status: Test