Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032383Openbravo ERP09. Financial managementpublic2016-03-01 17:052016-06-17 19:36
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q3 
aferraz
Advanced Payables and Receivables Mngmt
No
0032383: Payments can be deposited without being executed when adding a payment to an invoice through the financial account transaction
Payments can be deposited without being executed when adding a payment to an invoice through the financial account transaction
Having the Remittance module installed
As group admin role:
   Check the Remittance payment method has a deferred execution process configured
   Create a Sales Invoice with Remittance payment method and complete it
   Create a financial account transaction, add a payment (+) to the previously created invoice with the Remittance payment method
   Check a Payment In has been created in Awaiting Execution status
   Process the transaction
   Check the Payment In status has been changed to Deposited Not Cleared and it has not been included in any remittance
   The problem in this case is that if the remittance posting is made through the remittance window, this payment and its associated transaction and reconciliation cannot be posted
Proposed solution is:

(1) It should be allowed to "CREATE" payments in the financial account regardless payment method type, therefore a financial account transaction is created in "Draft" status.

(2) It should NOT be allowed to "PROCESS" payments created in the financial account if those payments do have an "AUTOMATIC" execution type payment method, either set as Deferred = No, or Deferred=Yes.

Once executed in the payment in/out window, it will be possible to process them in the financial account.

(3) Remittance automatic execution process needs to be handle separately. See issue related: 32572

An error needs to be shown if there is a payment already created in the financial account (Not processed), at the time of processing remittance settle of that payment (because remittance settle creates the payment in the financial account); therefore end-user can go to the financial account and delete the payment so that remittance settle can be processed. This scenario is considered as an exception to the "normal" remittance work-flow.
No tags attached.
related to defect 0032572 closed AtulOpenbravo Modules Settle remittance process needs to check if the payment being settle is already created in the financial account. 
related to defect 0032573 closed AtulOpenbravo Openbravo ERP It is not possible to execute a payment created in the financial account if it is set up as "Automatic Deposit". 
png issue_32383_orghibernate.png (39,323) 2016-03-23 15:26
https://issues.openbravo.com/file_download.php?file_id=9205&type=bug
png
Issue History
2016-03-01 17:05ngarciaNew Issue
2016-03-01 17:05ngarciaAssigned To => Triage Finance
2016-03-01 17:05ngarciaModules => Advanced Payables and Receivables Mngmt
2016-03-01 17:05ngarciaResolution time => 1459807200
2016-03-01 17:05ngarciaTriggers an Emergency Pack => No
2016-03-01 18:11aferrazAssigned ToTriage Finance => AtulOpenbravo
2016-03-02 13:30psanjuanNote Added: 0084657
2016-03-02 13:30psanjuanStatusnew => feedback
2016-03-02 15:32ngarciaNote Added: 0084662
2016-03-02 15:32ngarciaStatusfeedback => new
2016-03-02 18:57ngarciaNote Edited: 0084662bug_revision_view_page.php?bugnote_id=0084662#r11317
2016-03-03 10:39psanjuanNote Added: 0084674
2016-03-03 10:41psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11319
2016-03-03 10:44psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11320
2016-03-03 10:44psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11321
2016-03-03 10:45psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11322
2016-03-03 10:47psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11323
2016-03-03 10:52psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11324
2016-03-03 10:57psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11325
2016-03-03 10:57psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11326
2016-03-03 11:02psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11327
2016-03-03 11:03psanjuanCategoryZ. Others => 09. Financial management
2016-03-03 11:06psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11328
2016-03-07 12:20AtulOpenbravoStatusnew => scheduled
2016-03-07 12:20AtulOpenbravoNote Added: 0084770
2016-03-23 14:45psanjuanNote Added: 0085290
2016-03-23 14:48psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11532
2016-03-23 14:50psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11533
2016-03-23 15:02psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11534
2016-03-23 15:11psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11535
2016-03-23 15:17psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11536
2016-03-23 15:20psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11537
2016-03-23 15:26psanjuanFile Added: issue_32383_orghibernate.png
2016-03-23 15:26psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11538
2016-04-01 09:57psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11603
2016-04-01 10:07psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11604
2016-04-01 12:32psanjuanProposed Solution updated
2016-04-01 12:34psanjuanProposed Solution updated
2016-04-01 12:34psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11609
2016-04-01 12:35psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11610
2016-04-01 12:36psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11611
2016-04-01 12:37psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11612
2016-04-01 12:37psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11613
2016-04-01 12:40psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11614
2016-04-01 12:41psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11615
2016-04-01 12:44psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11616
2016-04-01 12:45psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11617
2016-04-01 12:50psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11618
2016-04-01 13:34psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11619
2016-04-01 13:51psanjuanRelationship addedrelated to 0032572
2016-04-01 13:55psanjuanProposed Solution updated
2016-04-01 13:56psanjuanNote Edited: 0084674bug_revision_view_page.php?bugnote_id=0084674#r11622
2016-04-01 13:56psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11623
2016-04-01 14:07psanjuanRelationship addedrelated to 0032573
2016-04-07 09:23psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11684
2016-04-07 09:42psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11685
2016-04-07 09:47psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11686
2016-04-08 11:21psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11709
2016-04-08 11:41psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11710
2016-04-08 11:41psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11711
2016-04-08 12:19psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11712
2016-04-08 12:25psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11715
2016-04-08 12:38psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11718
2016-04-08 12:38psanjuanNote Added: 0085528
2016-04-08 13:16psanjuanNote Edited: 0085290bug_revision_view_page.php?bugnote_id=0085290#r11721
2016-04-11 10:47hgbotCheckin
2016-04-11 10:47hgbotNote Added: 0085551
2016-04-11 10:47hgbotStatusscheduled => resolved
2016-04-11 10:47hgbotResolutionopen => fixed
2016-04-11 10:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3dc369ce4c58793e1fce4d82b73a35110f48716e [^]
2016-04-11 10:47hgbotCheckin
2016-04-11 10:47hgbotNote Added: 0085552
2016-04-11 10:48aferrazReview Assigned To => aferraz
2016-04-11 10:48aferrazNote Added: 0085553
2016-04-11 10:48aferrazStatusresolved => closed
2016-04-11 10:48aferrazFixed in Version => 3.0PR16Q3
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087437
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087438

Notes
(0084657)
psanjuan   
2016-03-02 13:30   
The steps described in this issue are not functionally correct for "Remittance" payment method because:
(1) "Payment in" with status "Deposited Not Cleared" cannot be included in a remittance, therefore remittance posting will not be possible.
(2) This "Payment in" with status "Deposited Not Cleared" related to a Remittance Payment Method set up as such, that means with no accounting setup related, can not be post to the ledger either in the Financial Account / Transactions tab or at the time of being reconcile.

If a sales invoice is setup to have a remittance payment method, a remittance needs to be created to either include the invoice or the payment in with status "Awaiting Execution"; therefore it is executed through the remittance process, same applies to the posting.

Issue set as feedback because we do not see any issue here but a wrong functional approach.
(0084662)
ngarcia   
2016-03-02 15:32   
(edited on: 2016-03-02 18:57)
The bug reported here is that it should not be allowed to create a Payment In from the Financial Account Transaction with a payment method with a deferred execution process. The Remittance case is an example of a consequence. Although the Sales Invoice could be selected from the financial account transaction, the payment method of the created payment should be different from the sales invoice one (selected by the user)

(0084674)
psanjuan   
2016-03-03 10:39   
(edited on: 2016-04-01 13:56)
Steps to REPRODUCE the issue, see scenario 1 below.

Scenario 1 - It should NOT be possible to PROCESS a payment in the financial account if it is related to an "Automatic" execution type payment method.

Create a Sales Invoice with Remittance payment method and complete it.
Go to the Financial Account related to Remittance Payment method.
Create a financial account transaction, Transaction Type "BP Deposit".
Add a payment by using (+) option.
Filter by "Remittance" payment method in the "Add Payment" window.
Select the invoice created. Enter the Actual Payment amount.
Process Received Payment(s).

Navigate to the Payment In created. Check that it has "Awaiting Execution" status.
Go back to the Financial Account and process the transaction created.
Navigate once more to the Payment In created. Check that its status has changed to "Deposited Not Cleared".

This is NOT correct, it should not be possible to PROCESS a "Payment In" with an "Automatic" execution type payment method from the financial account, because that means that the payment will not be executed while it should have been.

An error needs to be shown at the time of trying to process this payment in, saying that "It is not possible to process a payment which has an "Automatic" execution type payment method".

Same applies to Payment OUT
Same applies to any other automatic execution process such as "Print Check Simple Process", set as either "Deferred= No" or "Deferred= Yes".



Scenario 2 - It should be possible to CREATE a payment in the financial account if it is related to an "Automatic" execution type payment method. This is already working now.

Create a Sales Invoice with Remittance payment method and complete it.
Go to the Financial Account related to Remittance Payment method.
Create a financial account transaction, Transaction Type "BP Deposit".
Add a payment by using (+) option.
Filter by "Remittance" payment method in the "Add Payment" window.
Select the invoice created. Enter the Actual Payment amount.
Process Received Payment(s).

Navigate to the Payment In created. Check that it has "Awaiting Execution".

That payment can be included in a remittance by using the option "Select Payments", or it can be executed from the Payment IN window.

In the case of another automatic payment method such as "Print Check Simple Process", once executed it can be processed in the financial account.


Scenario 3 - Settle remittance process needs to check whether the payment being settled is already created in the financial account or not. In case it is created an error needs to be shown saying "Payment can not be settle as it already exits in the financial account. Please remove the payment from the financial account".

See issue = 32572

(0084770)
AtulOpenbravo   
2016-03-07 12:20   
Test Plan
- Install Remittance module.
- Login as group admin role.
- Check the Remittance payment method has a deferred execution process configured.
- Create a Sales Invoice with Remittance payment method and complete it.
- Create a financial account transaction, add a payment (+) to the previously created invoice with the Remittance payment method.
- Error message is shown that "It is not possible to process payment having payment method with deferred execution process."
- Navigate to Payment In and check that payment for Sales Invoice has been created in Awaiting Execution status.
(0085290)
psanjuan   
2016-03-23 14:45   
(edited on: 2016-04-08 13:16)
Test Plan

Scenario 1 - it should be possible to CREATE a payment in the financial account in case it is related to an automatic execution process, regardless it is deferred or not.

Automatic Payment Method = Remittance
Deferred = Yes

Go to Financial Account and select "Cuenta de Banco", go to Payment Method tab and select "Remittance".
Check it has an Automatic execution process set as Deferred.

Create a Sales Invoice with Remittance payment method and complete it.
Go to the Financial Account related to Remittance Payment method.
Create a financial account transaction, Transaction Type "BP Deposit".
Add a payment by using (+) option.
Filter by the BP and "Remittance" payment method in the "Add Payment" window.
Select the invoice created. Enter the Actual Payment amount.
Process Received Payment(s). Press Done.

Back in the "Transaction" tab of financial account window, check that a payment has been created.

Navigate to the Payment In created. Check that it has "Awaiting Execution" status.

That payment can be included in a remittance by using the option "Select Payments", or it can be executed from the Payment IN window.

Scenario 1B - repeat same scenario as above with Execution Process = "Simple Execution" set as Deferred = No.

Automatic Payment Method = Simple Execution
Deferred = No

In this case, there is no need to execute the payment as once created it is automatically processed in the payment in window and its status is payment received, that is ok.

Back in the financial account, the corresponding transaction can be executed with no problem. Payment changes its status to Deposited Not Cleared.


Scenario 2 - it should NOT be possible to PROCESS a payment in the financial account in case it is related to an automatic execution type payment method, regardless it is deferred or not.

Automatic Payment Method = Print Check Simple Process
Deferred = Yes
Automatic Deposit = No

Create a Sales Invoice with Check payment method configured as shown above and complete it.
Go to the Financial Account related to Check Payment method.
Create a financial account transaction, Transaction Type "BP Deposit".
Add a payment by using (+) option.
Filter by the BP and "Check" payment method in the "Add Payment" window.
Select the invoice created. Enter the Actual Payment amount.
Process Received Payment(s). Press Done.

Back in the "Transaction" tab of financial account window, check that a payment has been created.

Navigate to the Payment In created. Check that it has "Awaiting Execution" status.

Go back to the financial account and try to process the transaction. Below error is shown, which is Ok.

"It is not possible to process a transaction with a payment having an automatic execution process payment method. Please execute the payment in Payment In/Out window first."

Go back to the payment in window and execute the payment by entering a check number. Check payment status has changed to payment received.

Go back to the financial account and verify the transaction can be processed successfully, therefore payment changes it status to deposited not cleared.


Scenario 3 - it should NOT be possible to PROCESS a payment in the financial account in case it is related to an automatic execution type payment method, regardless it is deferred or not.

Automatic Payment Method = Print Check Simple Process
Deferred = Yes
Automatic Deposit = Yes

Create a Sales Invoice with Check payment method configured as shown above and complete it.
Go to the Financial Account related to Check Payment method.
Create a financial account transaction, Transaction Type "BP Deposit".
Add a payment by using (+) option.
Filter by the BP and "Check" payment method in the "Add Payment" window.
Select the invoice created. Enter the Actual Payment amount.
Process Received Payment(s). Press Done.

Back in the "Transaction" tab of financial account window, check that a payment has been created.

Navigate to the Payment In created. Check that it has "Awaiting Execution" status.

Go back to the financial account and try to process the transaction. Below error is shown, which is Ok.

"It is not possible to process a transaction with a payment having an automatic execution process payment method. Please execute the payment in Payment In/Out window first."

Go back to the payment in window and execute the payment by entering a check number. Check that an error is shown, see issue 32573


Scenario 4 - it should NOT be possible to PROCESS a payment in the financial account in case it is related to an automatic execution type payment method, regardless it is deferred or not.

Automatic Payment Method = Remittance
Deferred = Yes
Automatic Deposit = No

Create a Sales Invoice with Remittance payment method configured as shown above and complete it.
Go to the Financial Account related to Remittance Payment method.
Create a financial account transaction, Transaction Type "BP Deposit".
Add a payment by using (+) option.
Filter by the BP and "Remittance" payment method in the "Add Payment" window.
Select the invoice created. Enter the Actual Payment amount.
Process Received Payment(s). Press Done.

Back in the "Transaction" tab of financial account window, check that a payment has been created.

Navigate to the Payment In created. Check that it has "Awaiting Execution" status.

Go back to the financial account and try to process the transaction. Below error is shown, which is Ok.

"It is not possible to process a transaction with a payment having an automatic execution process payment method. Please execute the payment in Payment In/Out window first."

Go back to the payment in window and execute the payment by selecting the option "Include in existing remittance or create a new one".

Check that payment in status remains as "Awaiting Execution".
Go to the financial account and try to process the payment. Same error is shown which is OK.

Repeat all test plan above for purchase invoice / payment out.

(0085528)
psanjuan   
2016-04-08 12:38   
Test Plan above verified.

Issue can be code reviewed and closed.
(0085551)
hgbot   
2016-04-11 10:47   
Repository: erp/devel/pi
Changeset: 3dc369ce4c58793e1fce4d82b73a35110f48716e
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Apr 05 15:26:26 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/3dc369ce4c58793e1fce4d82b73a35110f48716e [^]

Fixes Issue 32383:Payments can be deposited without being executed

In case of payment created using financial account transaction add payment selector (+), a check for payment method with automatic execution process is added before processing transaction and payment has awaiting execution status.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
---
(0085552)
hgbot   
2016-04-11 10:47   
Repository: erp/devel/pi
Changeset: 93df53b537f9dbfedb349ddec7ca3d7f3a94252d
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Apr 11 10:46:58 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/93df53b537f9dbfedb349ddec7ca3d7f3a94252d [^]

Related to issue 32383: Code review improvements

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
---
(0085553)
aferraz   
2016-04-11 10:48   
Code review OK
(0087437)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test
(0087438)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test