Exception on receiving purchase order
------------------------------------- Key: OFBIZ-2025 URL: https://issues.apache.org/jira/browse/OFBIZ-2025 Project: OFBiz Issue Type: Bug Components: order Affects Versions: SVN trunk Environment: test on version 703450. Reporter: William Perng Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644400#action_12644400 ] William Perng commented on OFBIZ-2025: -------------------------------------- Any update one this ? We are unable to receive inventory against PO. > Exception on receiving purchase order > ------------------------------------- > > Key: OFBIZ-2025 > URL: https://issues.apache.org/jira/browse/OFBIZ-2025 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Environment: test on version 703450. > Reporter: William Perng > > Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. > The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". > Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644408#action_12644408 ] BJ Freeman commented on OFBIZ-2025: ----------------------------------- there is a mis-conception that if a bug report is put in that it will be addressed in a timely manner. In reality, this being a communitiy of volenteers, it will be done when someone has time to do it. it will go faster if you trouble shoot and provide a patch. I have looked at this and the problem is that captureOrderPayments should not be used for a PO. that is far as I can go at this time. > Exception on receiving purchase order > ------------------------------------- > > Key: OFBIZ-2025 > URL: https://issues.apache.org/jira/browse/OFBIZ-2025 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Environment: test on version 703450. > Reporter: William Perng > > Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. > The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". > Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644432#action_12644432 ] William Perng commented on OFBIZ-2025: -------------------------------------- Your 2nd paragraph is exactly what I am looking for. We have a quick fix to skip the check of shipIfCaptureFail setting. If this is a purchase order, we always set it to true. From your update, I think the fix has passed the point where I should look at. But it can be a work around before this issue is solved. I post here for someone who may need it. In line 1253 of PaymentGatewayServices.java (ver 686591) , we change it to if(!shipIfCaptureFails && orh.getOrderTypeId().equals("SALES_ORDER")){ Let's work on the real problem. Here is the call stack : 1. updatePurchaseShipmentFromReceipt service calls updateShipment service 2. updateShipment service calls createInvoiceFromShipment service by eca rule in secas_shipment.xml 3. createInvoiceFromShipment service calls createInvoiceFromShipments 4. createInvoiceFromShipments service calls createInvoiceForOrder 5. The createInvoiceForOrder will try to call captureOrderPayments. My question is should the purchase order have invoice ? If the purchase order doesn't have invoice, the problem should be in the eca rule (item 2) above. > Exception on receiving purchase order > ------------------------------------- > > Key: OFBIZ-2025 > URL: https://issues.apache.org/jira/browse/OFBIZ-2025 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Environment: test on version 703450. > Reporter: William Perng > > Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. > The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". > Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644446#action_12644446 ] BJ Freeman commented on OFBIZ-2025: ----------------------------------- the line 1253 looks like the fix I had in mind yes the invoice is used in accounting. createInvoiceForOrder should be modified to to call captureOrderPayments only if the order type SALES_ORDER > Exception on receiving purchase order > ------------------------------------- > > Key: OFBIZ-2025 > URL: https://issues.apache.org/jira/browse/OFBIZ-2025 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Environment: test on version 703450. > Reporter: William Perng > > Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. > The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". > Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644761#action_12644761 ] William Perng commented on OFBIZ-2025: -------------------------------------- The createInvoiceForOrder calls capturePaymentsByInvoice by eca rule which is defined in /applications/accounting/servicedef/secas.xml ( 1st entry ). If we can modify the createInvoiceForOrder service to return invoice type and check this invoice type in the secas.xml (only trigger the capturePaymentsByInvoice when the invoice type is SALES_INVOICE) , this should solve the problem. If this is correct, I can create a patch for this. > Exception on receiving purchase order > ------------------------------------- > > Key: OFBIZ-2025 > URL: https://issues.apache.org/jira/browse/OFBIZ-2025 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Environment: test on version 703450. > Reporter: William Perng > > Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. > The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". > Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644770#action_12644770 ] Adrian Crum commented on OFBIZ-2025: ------------------------------------ William, That sounds like a good strategy to me. > Exception on receiving purchase order > ------------------------------------- > > Key: OFBIZ-2025 > URL: https://issues.apache.org/jira/browse/OFBIZ-2025 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Environment: test on version 703450. > Reporter: William Perng > > Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. > The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". > Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] William Perng updated OFBIZ-2025: --------------------------------- Attachment: patch.txt I attached a possible patch to this issue. A new "out" parameter (invoiceTypeId) is added for service "createInvoiceForOrder" in services_invoice.xml. The createInvoiceForOrder method in InvoiceServices.java is changed to return "invoiceTypeId". The /accounting/servicedef/secas.xml is modified to check the inoviceTypeId when the capturePaymentByInvoice is triggered by the retun event of createInvoiceForOrder. By this patch, the capturePaymentsByInvoice will be called for sales order only. > Exception on receiving purchase order > ------------------------------------- > > Key: OFBIZ-2025 > URL: https://issues.apache.org/jira/browse/OFBIZ-2025 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Environment: test on version 703450. > Reporter: William Perng > Attachments: patch.txt > > > Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. > The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". > Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum closed OFBIZ-2025. ------------------------------ Resolution: Fixed Fixed, rev 710135. Thanks William! > Exception on receiving purchase order > ------------------------------------- > > Key: OFBIZ-2025 > URL: https://issues.apache.org/jira/browse/OFBIZ-2025 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Environment: test on version 703450. > Reporter: William Perng > Attachments: patch.txt > > > Exception happens when receiving a purchase order. This problem only happens when "ship if capture failed" option is set to N. > The exception is "Error trying to begin transaction, could not process method: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in Service [captureOrderPayments]: Cannot ship order because credit card captures were unsuccessful calling service balanceInventoryItems in receiveInventoryProduct". > Steps to reproduce this issue : 1. Create a purchase order 2. Try to quick receive it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |