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

View Revisions: Issue #32572 Back to Issue ]
Summary 0032572: Settle remittance process needs to check if the payment being settle is already created in the financial account.
Revision 2016-04-01 13:56 by psanjuan
Steps To Reproduce 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 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.
Revision 2016-04-01 13:51 by psanjuan
Steps To Reproduce 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.


Scenario 1B - repeat same scenario as above with Execution Process = Print Check simple process" set both as Deferred =Yes or Deferred = No.
Automatic Deposit = Yes/No.


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.

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 try to process it.

Check that below error is shown (which is correct):

"It is not possible to process a transaction with an "Automatic" execution type payment method"

Scenario 2B - repeat same scenario as above with Execution Process = Print Check simple process" set both as Deferred =Yes or Deferred = No
Automatic Deposit = Yes/No.

This case it is now working. Once the payment in with status Awaiting Execution is executed by entering a check number (Print Check simple process set as Deferred); payment in status changes to Payment Received. Once processed in the financial account it changes to Deposited Not cleared.


Scenario 3 - settle remittance process needs to check if the payment is already created in the financial account or not.

Repeat scenario 2 above

Navigate once more to the Payment In created. Execute it by including it in a new remittance or in an existing one.

Check that after that payment status is still "Awaiting Execution".

Try to process the payment in the financial account. Same error is shown.

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.


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker