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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032613
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 09. Financial managementmajoralways2016-04-01 14:062016-04-11 12:29
ReporterpsanjuanView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q4.6
StatusclosedFix in branchFixed in SCM revision3236f229b7ae
ProjectionnoneETAnoneTarget Version3.0PR15Q4.6
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2014-10-23
Regression introduced in release3.0PR14Q4
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/179d97ee602d [^]
Triggers an Emergency PackNo
Summary

0032613: It is not possible to execute a payment created in the financial account if it is set up as "Automatic Deposit".

DescriptionIt is not possible to execute a payment created in the financial account if it is set up as "Automatic Deposit".
Steps To ReproduceGo to Financial Account window and select "Cuenta de Banco".
Go to payment method tab and select "Cheque". Configure this payment method as described below:
* Payment In allowed =Yes
* Automatic Deposit = Yes
* Execution type = Automatic
* Execution Process = Print Check simple process
* Deferred = Yes
* Upon receipt use = In transit payment account
* Upon deposit use = Deposited payment account.

Go to sales invoice window and create a new one for F&B España, BP = Alimentos y Supermercados, Payment Method = Cheque. Complete the invoice (ie. invoice number 1000179, total gross amount = 925.65

Go to financial account "Cuenta de Banco" transaction tab and create a new one as described below:
* Transaction type = BP Deposit
Press on + icon to create a payment.

Once in the "Add payment" window filter by "Received From" Alimentos y Supermercados BP and Payment Method = Cheque.
Enter 925.65 in actual payment field and select the invoice 10000179

Press Done by selecting the option "Process Received Payment(s)".

Check that a transaction in "Draft" mode has been created related to a new payment created (ie. payment 10001749. Do not process the transaction (It should not be allowed, see issue 32383)

Navigate to the payment and check that its status is "Awaiting Execution".

Execute the payment in the payment in window by using the button "Execute Payment". Enter a check number. Press Execute.

Check that below error is shown. "Could not execute JDBC batch update".

See error log:

c59635e2 11046029 [http-8080-4] DEBUG reloadXml - XmlEngine 29-11-2001 Initialized
c59635e2 11046189 [http-8080-4] DEBUG reloadXml - XmlEngine 29-11-2001 Initialized
c59635e2 11049903 [http-8080-2] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 insert into FIN_Finacc_Transaction (AD_Client_ID, AD_Org_ID, Created, Createdby, Updated, Updatedby, Isactive, C_Currency_ID, Fin_Financial_Account_ID, Line, Fin_Payment_ID, DateAcct, Status, Paymentamt, Depositamt, Processed, Processing, Posted, Trxtype, Statementdate, Description, CreatedByAlgorithm, EM_APRM_Modify, EM_Aprm_Processed, Fin_Finacc_Transaction_ID) values ('23C59575B9CF467C9620760EB255B389', 'B843C30461EA4501935CB1D125C9C25A', '2016-04-01 13:41:45.769000 +02:00:00', '100', '2016-04-01 13:41:45.769000 +02:00:00', '100', 'Y', '102', 'DEDDE613C5314ACD8DCC60C474D1A107', 6900, '4BB428CED8834F06B20B98CDA9C48A33', '2016-04-01 00:00:00.000000 +02:00:00', 'RPR', '0', '308.55', 'N', 'N', 'N', 'BPD', '2016-04-01 00:00:00.000000 +02:00:00', 'Invoice No.: 1000324.', 'N', 'N', 'P', '4BB428CED8834F06B20B98CDA9C48A33') was aborted. Call getNextException to see the cause.
c59635e2 11049905 [http-8080-2] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: duplicate key value violates unique constraint "fin_finacc_transaction_un"
  Detail: Key (fin_payment_id)=(4BB428CED8834F06B20B98CDA9C48A33) already exists.
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
    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:184)
    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.advpaymentmngt.dao.TransactionsDao.createFinAccTransaction(TransactionsDao.java:142)
    at org.openbravo.advpaymentmngt.process.FIN_ExecutePayment.execute(FIN_ExecutePayment.java:198)
    at org.openbravo.advpaymentmngt.ad_actionbutton.ExecutePayments.processAndClose(ExecutePayments.java:177)
    at org.openbravo.advpaymentmngt.ad_actionbutton.ExecutePayments.doPost(ExecutePayments.java:100)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:228)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:428)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:62)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    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 insert into FIN_Finacc_Transaction (AD_Client_ID, AD_Org_ID, Created, Createdby, Updated, Updatedby, Isactive, C_Currency_ID, Fin_Financial_Account_ID, Line, Fin_Payment_ID, DateAcct, Status, Paymentamt, Depositamt, Processed, Processing, Posted, Trxtype, Statementdate, Description, CreatedByAlgorithm, EM_APRM_Modify, EM_Aprm_Processed, Fin_Finacc_Transaction_ID) values ('23C59575B9CF467C9620760EB255B389', 'B843C30461EA4501935CB1D125C9C25A', '2016-04-01 13:41:45.769000 +02:00:00', '100', '2016-04-01 13:41:45.769000 +02:00:00', '100', 'Y', '102', 'DEDDE613C5314ACD8DCC60C474D1A107', 6900, '4BB428CED8834F06B20B98CDA9C48A33', '2016-04-01 00:00:00.000000 +02:00:00', 'RPR', '0', '308.55', 'N', 'N', 'N', 'BPD', '2016-04-01 00:00:00.000000 +02:00:00', 'Invoice No.: 1000324.', 'N', 'N', 'P', '4BB428CED8834F06B20B98CDA9C48A33') 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)
    ... 42 more






Proposed Solutioneither:
a) payment is created in awaiting execution status therefore it can be executed in payment in/out window, but no transaction is created in the financial account. Once payment is executed a transaction is created automatically in the financial account (deposit).

b) same way payment is created in awaiting execution status therefore it can be executed in payment in/out window, and a transaction in draft status is created in the financial account. This draft transaction can not be processed (already implemented). Once payment is executed the transaction already created is processed (deposited).
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0032573 closedAtulOpenbravo It is not possible to execute a payment created in the financial account if it is set up as "Automatic Deposit". 

-  Notes
(0085468)
AtulOpenbravo (developer)
2016-04-06 13:32

Test Plan
-Go to Financial Account window and select "Cuenta de Banco".
- Go to payment method tab and select "Cheque". Configure this payment method as described below:
* Payment In allowed =Yes
* Automatic Deposit = Yes
* Execution type = Automatic
* Execution Process = Print Check simple process
* Deferred = Yes
* Upon receipt use = In transit payment account
* Upon deposit use = Deposited payment account.

- Go to sales invoice window and create a new one for F&B España, BP = Alimentos y Supermercados, Payment Method = Cheque. Complete the invoice (ie. invoice number 1000179, total gross amount = 925.65

- Go to financial account "Cuenta de Banco" transaction tab and create a new one as described below:
* Transaction type = BP Deposit
- Press on + icon to create a payment.

- Once in the "Add payment" window filter by "Received From" Alimentos y Supermercados BP and Payment Method = Cheque.
Enter 925.65 in actual payment field and select the invoice 10000179

- Press Done by selecting the option "Process Received Payment(s)".

- Check that a transaction in "Draft" mode has been created related to a new payment created i.e. payment 10001749. Do not process the transaction. (It should not be allowed, see issue 32383)

- Navigate to the payment and check that its status is "Awaiting Execution".

- Execute the payment in the payment in window by using the button "Execute Payment". Enter a check number. Press Execute.

- Check that Payment is processed successfully and status is changed to "Deposit Not Cleared"

- Go to Financial Account Transaction check record related with the above processed payment has status "Deposit Not Cleared".
(0085561)
hgbot (developer)
2016-04-11 12:28

Repository: erp/backports/3.0PR15Q4.6
Changeset: 3236f229b7aea824b87fa5a17a78a5d5255c028b
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Apr 06 15:23:01 2016 +0530
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4.6/rev/3236f229b7aea824b87fa5a17a78a5d5255c028b [^]

Fixes bug 32613:Not possible to execute Automatic Deposit payment created in FA

Before creating a record in financial account transaction, check is done: if transaction exists, get it so that no transactiom is created and the same is sent for processing

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
---
(0085562)
hgbot (developer)
2016-04-11 12:28

Repository: erp/backports/3.0PR15Q4.6
Changeset: cd0e228f5af48020cdfd1a6b06178f0f75d4c1d7
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Apr 11 11:02:52 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4.6/rev/cd0e228f5af48020cdfd1a6b06178f0f75d4c1d7 [^]

Related to issue 32613: Update copyright

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
---
(0085563)
aferraz (manager)
2016-04-11 12:29

Code review OK

- Issue History
Date Modified Username Field Change
2016-04-06 11:17 AtulOpenbravo Type defect => backport
2016-04-06 11:17 AtulOpenbravo Target Version => 3.0PR15Q4.6
2016-04-06 13:32 AtulOpenbravo Note Added: 0085468
2016-04-11 12:28 hgbot Checkin
2016-04-11 12:28 hgbot Note Added: 0085561
2016-04-11 12:28 hgbot Status scheduled => resolved
2016-04-11 12:28 hgbot Resolution open => fixed
2016-04-11 12:28 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q4.6/rev/3236f229b7aea824b87fa5a17a78a5d5255c028b [^]
2016-04-11 12:28 hgbot Checkin
2016-04-11 12:28 hgbot Note Added: 0085562
2016-04-11 12:29 aferraz Review Assigned To => aferraz
2016-04-11 12:29 aferraz Note Added: 0085563
2016-04-11 12:29 aferraz Status resolved => closed
2016-04-11 12:29 aferraz Fixed in Version => 3.0PR15Q4.6


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker