Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032572
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Remittancemajoralways2016-04-01 13:512016-05-06 10:51
ReporterpsanjuanView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision22313b1c7960
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseOracleJava version1.6
OS VersionUbuntu 8.04.1Database version11.1.0.6.0Ant version1.7.0
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned Toaferraz
Regression introduced in release
Summary

0032572: Settle remittance process needs to check if the payment being settle is already created in the financial account.

DescriptionSettle remittance process needs to check if the payment being settle is already created in the financial account.
Steps To ReproduceCreate 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.

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

Navigate to the remittance just created, the one including the payment created and process it.

Go back to the payment in and check its status has changed to "Remitted".

Go back to the Financial Account and check that the transaction can now be processed, therefore its status changes to "Deposited not cleared".

Go to settle and protest remittance and settle the remittance dated on 31/12/2016. An error is shown: see image below:

See log:

c59635e2 836771 [http-8080-6] DEBUG reloadXml - XmlEngine 29-11-2001 Initialized
c59635e2 836821 [http-8080-6] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 update FIN_Payment set Updated='2016-03-23 15:08:31.252000 +01:00:00', Status='RPR' where Fin_Payment_ID='4847E25D0E404D67A17AE750919EF342' was aborted. Call getNextException to see the cause.
c59635e2 836822 [http-8080-6] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: current transaction is aborted, commands ignored until end of transaction block
Mar 23, 2016 3:08:31 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet XDB8EC5133C324B87992A8F88CED04961 threw exception
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:205)
    at org.openbravo.dal.core.SessionHandler.flushRemainingChanges(SessionHandler.java:323)
    at org.openbravo.dal.core.SessionHandler.commitAndClose(SessionHandler.java:266)
    at org.openbravo.dal.core.DalThreadHandler.doFinal(DalThreadHandler.java:51)
    at org.openbravo.dal.core.DalRequestFilter$1.doFinal(DalRequestFilter.java:99)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:65)
    at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:701)
Caused by: java.sql.BatchUpdateException: Batch entry 0 update FIN_Payment set Updated='2016-03-23 15:08:31.252000 +01:00:00', Status='RPR' where Fin_Payment_ID='4847E25D0E404D67A17AE750919EF342' was aborted. Call getNextException to see the cause.
    at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2762)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1999)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:421)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2929)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
    ... 24 more

As a consequence of that, it should be possible to CREATE a transaction in the financial account related to an "In Remittance" execution process, deferred or not; but settle process needs to check whether there is a payment already created in the financial account or not.

If it is already created an error needs to be shown so the end-user manually deletes that payment in the financial account.
Proposed SolutionAn 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0032573 closedAtulOpenbravo Openbravo ERP It is not possible to execute a payment created in the financial account if it is set up as "Automatic Deposit". 
caused by feature request 0029387 closedSandrahuguet Openbravo ERP Transaction refactor project 
related to defect 0032383 closedAtulOpenbravo Openbravo ERP Payments can be deposited without being executed when adding a payment to an invoice through the financial account transaction 

-  Notes
(0085504)
AtulOpenbravo (developer)
2016-04-07 18:23

Test Plan
- 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.
- That payment can be included in a remittance by using the option "Select Payments", or it can be executed from the Payment IN window.
- Navigate to the remittance just created, the one including the payment created and process it.
- Go back to the payment in and check its status has changed to "Remitted".
- Go back to the Financial Account and check that the transaction can now be processed, therefore its status changes to "Deposited not cleared".
- Go to settle and protest remittance and settle the remittance line for above payment.
- Error will be displayed "Remittance line selected could not be settled as transaction for related payment already created in financial account. Remove it to proceed".
- Go to Financial Account, remove the transaction for related payment of above remittance line.
- Go to to Settle/ Protest Remittance process, settle the remittance line choosen earlier.
- Check the process is completed successfully and now transaction for related payment is created in financial account.
(0085530)
psanjuan (manager)
2016-04-08 13:00
edited on: 2016-04-12 15:10

Test Plan

(*) Scenario 1 - Remittance type "Remit for Discount" = No

Go to Remittance type window and check that "Printable Remittance" remittance type is configured as shown below:
Payment Method = Remittance
Remit for discount = No

Create a Sales Invoice with "Remittance" payment method configured as shown below and complete it.

Execution Process = In remittance
Deferred = yes
Automatic Deposit = No

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.

Create another sales invoice for the same BP and Remittance payment method. 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 and execute it by selecting the option "Include in existing remittance or create a new one".

Go to remittance window and check that a new remittance has been created including these two payments just created.

Process the remittance by selecting the option "Not grouping". Press Ok.

Go to the payments and verify that their status has changed to "Remitted", therefore can be processed in the financial account.

Go to the financial account and process those two transactions / payments.

Go to settle/protest window and search by the remittance just created.

Select first payment, enter an accounting date and press settle.
Check that an error is show saying: Remittance line cannot be settled because transaction for related payment is already created in the financial account. Please remove it to proceed." which is correct.

Press Search and select second payment, enter and accounting date and check that same error is shown.

Go to the financial account transaction and remove those transactions /payments by reactive them and delete them.

Go to settle/protest window and search by the remittance just created.

Select first payment, enter an accounting date and press settle. Process completed successfully is shown.
Repeat same steps with second payment. Same result is shown.

Go to financial account transaction and check that payments are now shown in there as processed.

(*) Scenario 2 - Remittance type "Remit for Discount" = No & remittance grouping & single payment option.

Repeat scenario 1 above, that means creation of two sales invoice for same BP, payment method remittance.
Creation of payments in the financial account transaction tab.

Go to payment in window and execute both payments by using the option "include in an existing or new remittance".

Check that a new remittance has been created including these two payment.

Single payment option can not be used while processing "Payments" remittance, therefore that action is not going to conflict with the fact that these two payments are already created in the financial account (data duplication).

Grouped options such as "Group by business partner" is not going to conflict either as it does not apply while including payments in a remittance.

(*) Scenario 3 - Remittance type "Remit for Discount" = Yes

Go to Remittance type window and select Printable Remittance type. Configure it as "Remit for discount " = Yes.
Select "Transferencia" as "Payment Method for discount" as well as a G/L Item (ie. Deuda efectos descontados).

Go to sales invoice and create a new one for BP Alimentos y supermercados and payment method "Remittance". Complete the invoice.

Go to financial account window, transaction tab and create a new record, add a payment by using option (+), dated on 08-04-2016.

Search by the BP Alimentos and payment method Remittance. Select the invoice just created and enter the actual payment amount. Process Received Payment(s). Press Done. (Payment created ie. 354)
Save the transaction and check it can not be processed, that is OK.

Navigate to payment in created and execute it by selecting the option "Include in existing remittance or create a new one". Press Execute.

Go to remittance window and check that a new remittance has been created in there. Enter a discount date (ie. 30-04-2016) and process it.

Verify that a new payment has been created (ie. 355) Navigate to the payment and check its status is "Deposited not cleared".
Go to financial account and check that payments 354 and 355 are in there.

Check that discount payment 355 is already processed and set as deposited not cleared dated on discount date for an amount = 79.86

Check that manually created payment 354, dated on 08-04-2016 can be processed now.

Finally go to settle/process window.

Search by the remittance created. Select payment 354. Enter an accounting date (ie 30-04-2016) and press settle.

Check that an error is shown.

Go to the financial account transaction tab and remove that transactions /payments (354) by reactive it and delete it.

Go to settle/protest window and make sure that payment 354 can now be settle.

(*) Scenario 4 - Protest remittance. (Remittance Not for discount).

Go to sales invoice window and create a new one for Alimentos y Supermercados BP. 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 (ie. 374). Check that it has "Awaiting Execution" status. Execute it.

Check that a new remittance has been created including payment 374. Process it.

Go to the payment in and check its status has changed to "remitted", therefore it can be processed in the financial account. Process it. Verify its status has changed to Deposited Not cleared.

Go to settle/protest window, search by the remittance just created. Enter an accounting date and press Protest.

Check that payment status has changed to Awaiting Execution.
Create another remittance and include once more the payment by using the option (Select Payments). Process remittance.

Go to settle/Protest window, search by last remittance created. Enter an accounting date and press Settle.

Check that the error is shown, which is correct.

Go to the financial account transaction tab and remove that transactions /payments (374) by reactive it and delete it.

Go to settle/protest window and make sure that payment 374 can now be settle.

(*) Scenario 5 - Protest remittance. (Remittance for discount).

Repeat same test case 4 but for remittance for discount.

(*) Repeat same test as above but scenario 3 and 5 for purchase invoice / payment out being remitted.

(0085533)
psanjuan (manager)
2016-04-08 14:26

Review scenario 3 above. Settle process needs to behave properly also in case of remit for discount.
(0085575)
psanjuan (manager)
2016-04-12 15:02

Test Plan above verified.

Issue can be code reviewed and closed.
(0085587)
hgbot (developer)
2016-04-13 10:31

Repository: erp/mods/org.openbravo.module.remittance
Changeset: 22313b1c7960a9d98fe29a68585e82a8f0fb7b81
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Apr 11 23:54:14 2016 +0530
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/22313b1c7960a9d98fe29a68585e82a8f0fb7b81 [^]

Fixes issue 32572:Settle remittance should fail if payment is in FA Transaction

Check is provided before creating financial account transaction whether
record exists or not before settling the remittance line in both cases
Remit for Discount or without it

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/module/remittance/utility/REM_SettleProtest.java
---
(0085588)
hgbot (developer)
2016-04-13 10:31

Repository: erp/mods/org.openbravo.module.remittance
Changeset: 00cc1aa4d2f0b150008235a799352ae17dac9e09
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Apr 12 20:07:38 2016 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/00cc1aa4d2f0b150008235a799352ae17dac9e09 [^]

Related to issue 32572: Code review improvements

---
M src/org/openbravo/module/remittance/utility/REM_SettleProtest.java
---
(0085589)
hgbot (developer)
2016-04-13 10:31

Repository: erp/mods/org.openbravo.module.remittance
Changeset: 0eea892589d24e46dcd44929dd6303ec3ca2825d
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Apr 13 10:26:38 2016 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/0eea892589d24e46dcd44929dd6303ec3ca2825d [^]

Related to issue 32572: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0086247)
hgbot (developer)
2016-05-06 10:43

Repository: erp/mods/org.openbravo.module.remittance
Changeset: 80f3b069ce321bd040671fbdc84bb1e6444701f6
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri May 06 10:15:07 2016 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/80f3b069ce321bd040671fbdc84bb1e6444701f6 [^]

Related to issue 32572: Code review improvements

---
M src/org/openbravo/module/remittance/utility/REM_SettleProtest.java
---
(0086248)
hgbot (developer)
2016-05-06 10:43

Repository: erp/mods/org.openbravo.module.remittance
Changeset: dc8741b9bf45fafd9c674b973315d941a529adfc
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri May 06 10:20:34 2016 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/dc8741b9bf45fafd9c674b973315d941a529adfc [^]

Related to issue 32572: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
M src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
---
(0086250)
aferraz (developer)
2016-05-06 10:51

Code review OK.

Issue fixed in version 3.2.600 of Remittances infrastructure module.

- Issue History
Date Modified Username Field Change
2016-04-01 13:51 psanjuan New Issue
2016-04-01 13:51 psanjuan Assigned To => Triage Finance
2016-04-01 13:51 psanjuan Relationship added related to 0032383
2016-04-01 13:56 psanjuan Steps to Reproduce Updated View Revisions
2016-04-01 13:56 psanjuan Proposed Solution updated
2016-04-01 14:24 ngarcia Issue Monitored: ngarcia
2016-04-07 18:23 AtulOpenbravo Note Added: 0085504
2016-04-07 18:26 AtulOpenbravo Status new => scheduled
2016-04-08 13:00 psanjuan Note Added: 0085530
2016-04-08 13:07 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 13:31 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 13:31 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 13:47 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 13:56 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 13:58 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 14:00 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 14:04 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 14:06 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 14:06 psanjuan Note Added: 0085531
2016-04-08 14:17 psanjuan Note Deleted: 0085531
2016-04-08 14:19 psanjuan Note Edited: 0085530 View Revisions
2016-04-08 14:26 psanjuan Note Added: 0085533
2016-04-12 12:24 aferraz Assigned To Triage Finance => AtulOpenbravo
2016-04-12 14:51 psanjuan Note Edited: 0085530 View Revisions
2016-04-12 14:53 psanjuan Note Edited: 0085530 View Revisions
2016-04-12 15:02 psanjuan Note Added: 0085575
2016-04-12 15:10 psanjuan Note Edited: 0085530 View Revisions
2016-04-13 10:31 hgbot Checkin
2016-04-13 10:31 hgbot Note Added: 0085587
2016-04-13 10:31 hgbot Status scheduled => resolved
2016-04-13 10:31 hgbot Resolution open => fixed
2016-04-13 10:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/22313b1c7960a9d98fe29a68585e82a8f0fb7b81 [^]
2016-04-13 10:31 hgbot Checkin
2016-04-13 10:31 hgbot Note Added: 0085588
2016-04-13 10:31 hgbot Checkin
2016-04-13 10:31 hgbot Note Added: 0085589
2016-04-13 10:55 aferraz Review Assigned To => aferraz
2016-04-13 10:55 aferraz Note Added: 0085591
2016-04-13 10:55 aferraz Status resolved => closed
2016-04-13 10:59 aferraz Relationship added related to 0032573
2016-04-13 11:04 aferraz Relationship added caused by 0029387
2016-05-06 10:43 hgbot Checkin
2016-05-06 10:43 hgbot Note Added: 0086247
2016-05-06 10:43 hgbot Checkin
2016-05-06 10:43 hgbot Note Added: 0086248
2016-05-06 10:51 aferraz Note Deleted: 0085591
2016-05-06 10:51 aferraz Note Added: 0086250


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker