When order items are issued to a shipment, the accounting_quantity_total for the corresponding inventory records are updated but afterwards when the shipment is cancelled, the accounting_quantity_total is not reverted back to the original values. Is this a bug or is there a reason the quantity is not reverted? The problem is that when I try to create another shipment and issue the same quantity, I receive the following error: The following error occurs when I try to issue the same previously cancelled quantity to a newly created shipment: Error:<br/> ERROR: Could not complete the Issue OrderItemShipGrpInvRes to Shipment [file:/dev/apache-ofbiz-11.04.02/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml#issueOrderItemShipGrpInvResToShipment] process [problem removing the orderItemShipGrpInvRes value: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Error in simple-method [Create an accounting transactions for a sales shipment issuance (D: INVENTORY_ACCOUNT, C: COGS_ACCOUNT) [file:/home/stan/dev/apache-ofbiz-11.04.02/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml#createAcctgTransForSalesShipmentIssuance]]: ; {Could not find enough accounting inventory for product DOUGH; remaining quantity: 1}] <br/> <br/> The service is looking for inventory_item records with an accounting_quantity_total > 0 but finds none because the quantity was decremented to 0 from the cancelled shipment issuance. |
In the "cancelOrderItemIssuanceFromSalesShipment" simple method service
there exists: <!-- increment InventoryItem quantityOnHand AND availableToPromise --> <!-- instead of updating InventoryItem, add an InventoryItemDetail --> <set from-field="itemIssuance.inventoryItemId" field="createDetailMap.inventoryItemId"/> <set from-field="itemIssuance.itemIssuanceId" field="createDetailMap.itemIssuanceId"/> <set from-field="toCancelQuantity" field="createDetailMap.availableToPromiseDiff"/> <set from-field="toCancelQuantity" field="createDetailMap.quantityOnHandDiff"/> <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/> Can anyone think of a reason why the following should not be added: <set from-field="toCancelQuantity" field="createDetailMap.accountingQuantityDiff"/> On 09/12/2013 08:24 AM, Christian Carlow wrote: > > When order items are issued to a shipment, the accounting_quantity_total > for the corresponding inventory records are updated but afterwards when > the shipment is cancelled, the accounting_quantity_total is not reverted > back to the original values. Is this a bug or is there a reason the > quantity is not reverted? > > The problem is that when I try to create another shipment and issue the > same quantity, I receive the following error: > > The following error occurs when I try to issue the same previously > cancelled quantity to a newly created shipment: > > Error:<br/> ERROR: Could not complete the Issue OrderItemShipGrpInvRes > to Shipment > [file:/dev/apache-ofbiz-11.04.02/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml#issueOrderItemShipGrpInvResToShipment] > > process [problem removing the orderItemShipGrpInvRes value: The current > transaction is marked for rollback, not beginning a new transaction and > aborting current operation; the rollbackOnly was caused by: Error in > simple-method [Create an accounting transactions for a sales shipment > issuance (D: INVENTORY_ACCOUNT, C: COGS_ACCOUNT) > [file:/home/stan/dev/apache-ofbiz-11.04.02/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml#createAcctgTransForSalesShipmentIssuance]]: > > ; {Could not find enough accounting inventory for product DOUGH; > remaining quantity: 1}] <br/> <br/> > > The service is looking for inventory_item records with an > accounting_quantity_total > 0 but finds none because the quantity was > decremented to 0 from the cancelled shipment issuance. > > > > |
What version are you running?
Sent from my BlackBerry® PlayBook™ www.blackberry.com ------------------------------ *From:* "Christian Carlow" <[hidden email]> *To:* "[hidden email]" <[hidden email]> *Sent:* September 12, 2013 7:59 AM *Subject:* Re: Shipment cancellation doesn't revert inventory accounting quantity total In the "cancelOrderItemIssuanceFromSalesShipment" simple method service there exists: Can anyone think of a reason why the following should not be added: On 09/12/2013 08:24 AM, Christian Carlow wrote: > > When order items are issued to a shipment, the accounting_quantity_total > for the corresponding inventory records are updated but afterwards when > the shipment is cancelled, the accounting_quantity_total is not reverted > back to the original values. Is this a bug or is there a reason the > quantity is not reverted? > > The problem is that when I try to create another shipment and issue the > same quantity, I receive the following error: > > The following error occurs when I try to issue the same previously > cancelled quantity to a newly created shipment: > > Error: > to Shipment > [file:/dev/apache-ofbiz-11.04.02/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml#issueOrderItemShipGrpInvResToShipment] > > process [problem removing the orderItemShipGrpInvRes value: The current > transaction is marked for rollback, not beginning a new transaction and > aborting current operation; the rollbackOnly was caused by: Error in > simple-method [Create an accounting transactions for a sales shipment > issuance (D: INVENTORY_ACCOUNT, C: COGS_ACCOUNT) > [file:/home/stan/dev/apache-ofbiz-11.04.02/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml#createAcctgTransForSalesShipmentIssuance]]: > > ; {Could not find enough accounting inventory for product DOUGH; > remaining quantity: 1}] > > The service is looking for inventory_item records with an > accounting_quantity_total > 0 but finds none because the quantity was > decremented to 0 from the cancelled shipment issuance. > > > > |
Administrator
|
In reply to this post by Christian Carlow-OFBizzer
I think you are right, I see no reasons why this should not be done
Jacques Christian Carlow wrote: > When order items are issued to a shipment, the accounting_quantity_total > for the corresponding inventory records are updated but afterwards when > the shipment is cancelled, the accounting_quantity_total is not reverted > back to the original values. Is this a bug or is there a reason the > quantity is not reverted? > > The problem is that when I try to create another shipment and issue the > same quantity, I receive the following error: > > The following error occurs when I try to issue the same previously > cancelled quantity to a newly created shipment: > > Error:<br/> ERROR: Could not complete the Issue OrderItemShipGrpInvRes > to Shipment > [file:/dev/apache-ofbiz-11.04.02/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml#issueOrderItemShipGrpInvResToShipment] > process [problem removing the orderItemShipGrpInvRes value: The current > transaction is marked for rollback, not beginning a new transaction and > aborting current operation; the rollbackOnly was caused by: Error in > simple-method [Create an accounting transactions for a sales shipment > issuance (D: INVENTORY_ACCOUNT, C: COGS_ACCOUNT) > [file:/home/stan/dev/apache-ofbiz-11.04.02/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml#createAcctgTransForSalesShipmentIssuance]]: > ; {Could not find enough accounting inventory for product DOUGH; > remaining quantity: 1}] <br/> <br/> > > The service is looking for inventory_item records with an > accounting_quantity_total > 0 but finds none because the quantity was > decremented to 0 from the cancelled shipment issuance. |
Free forum by Nabble | Edit this page |