Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0032611 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] 09. Financial management | major | always | 2016-04-01 14:06 | 2016-04-11 12:44 | |||
Reporter | psanjuan | View Status | public | |||||
Assigned To | AtulOpenbravo | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 3.0PR16Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 2fc2c7aa76a7 | ||||
Projection | none | ETA | none | Target Version | 3.0PR16Q2 | |||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_18 | |||
OS Version | Professional Appliance | Database version | 8.3.9 | Ant version | 1.7.1 | |||
Product Version | SCM revision | |||||||
Review Assigned To | aferraz | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | Production - Confirmed Stable | |||||||
Regression date | 2014-10-23 | |||||||
Regression introduced in release | 3.0PR14Q4 | |||||||
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/179d97ee602d [^] | |||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0032611: It is not possible to execute a payment created in the financial account if it is set up as "Automatic Deposit". | |||||||
Description | It is not possible to execute a payment created in the financial account if it is set up as "Automatic Deposit". | |||||||
Steps To Reproduce | 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 (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 Solution | either: 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). | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0085466) AtulOpenbravo (developer) 2016-04-06 13:31 |
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". |
(0085568) hgbot (developer) 2016-04-11 12:44 |
Repository: erp/backports/3.0PR16Q2 Changeset: 2fc2c7aa76a77de3d4db7b79226feb4ce7e9e120 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.0PR16Q2/rev/2fc2c7aa76a77de3d4db7b79226feb4ce7e9e120 [^] Fixes bug 32611: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 --- |
(0085569) hgbot (developer) 2016-04-11 12:44 |
Repository: erp/backports/3.0PR16Q2 Changeset: 58c8c8e119f11895289156531f4087de991fdb36 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.0PR16Q2/rev/58c8c8e119f11895289156531f4087de991fdb36 [^] Related to issue 32611: Update copyright --- M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java --- |
(0085570) aferraz (manager) 2016-04-11 12:44 |
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.0PR16Q2 |
2016-04-06 13:31 | AtulOpenbravo | Note Added: 0085466 | |
2016-04-11 12:44 | hgbot | Checkin | |
2016-04-11 12:44 | hgbot | Note Added: 0085568 | |
2016-04-11 12:44 | hgbot | Status | scheduled => resolved |
2016-04-11 12:44 | hgbot | Resolution | open => fixed |
2016-04-11 12:44 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR16Q2/rev/2fc2c7aa76a77de3d4db7b79226feb4ce7e9e120 [^] |
2016-04-11 12:44 | hgbot | Checkin | |
2016-04-11 12:44 | hgbot | Note Added: 0085569 | |
2016-04-11 12:44 | aferraz | Review Assigned To | => aferraz |
2016-04-11 12:44 | aferraz | Note Added: 0085570 | |
2016-04-11 12:44 | aferraz | Status | resolved => closed |
2016-04-11 12:44 | aferraz | Fixed in Version | => 3.0PR16Q2 |
Copyright © 2000 - 2009 MantisBT Group |