[ 
https://issues.apache.org/jira/browse/OFBIZ-1734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bruno Busco updated OFBIZ-1734:
-------------------------------

    Attachment: var_integr.patch

Please find attached a patch that solves the issue.

Additionally i would like to ask:
I have seen that the values defined in the entity VarianceReason are exactly 
matching the ones defined in the Entity Enumeration with 
enumTypeId="IID_REASON".
Is this by design or may be should one of the two removed?

> Creating a Physical Inventory Variance with "Integration" reason generates an 
> exception
> ---------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1734
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1734
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>         Environment: Win XP - LocalDerby - SVN Trunk 643479
>            Reporter: Bruno Busco
>         Attachments: var_integr.patch
>
>
> 1) select Facility -> Facilities -> WebStoreWarehouse -> Inventory Items
> 2) click on first Inventory Id in the list (9005)
> 3) in the Physical Inventory Variance panel at the bottom of the page select 
> "Integration" in the Variance Reason Id field
> 4) insert '1' in the Quantity On Hand Var
> 5) click on 'Add' button
> the following error is shown:
> The Following Errors Occurred:
> Error:Error:ERROR: Could not complete the Create an InventoryItemDetail 
> [file:/F:/ofbiz_trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml#createInventoryItemDetail]
>  process [problem creating the newEntity value: Error while inserting: 
> [GenericEntity:InventoryItemDetail][availableToPromiseDiff,0.0(java.lang.Double)][createdStamp,2008-04-01
>  23:35:14.453(java.sql.Timestamp)][createdTxStamp,2008-04-01 
> 23:35:14.343(java.sql.Timestamp)][effectiveDate,2008-04-01 
> 23:35:14.453(java.sql.Timestamp)][inventoryItemDetailSeqId,10016(java.lang.String)][inventoryItemId,9005(java.lang.String)][lastUpdatedStamp,2008-04-01
>  23:35:14.453(java.sql.Timestamp)][lastUpdatedTxStamp,2008-04-01 
> 23:35:14.343(java.sql.Timestamp)][physicalInventoryId,10016(java.lang.String)][quantityOnHandDiff,1.0(java.lang.Double)][reasonEnumId,VAR_INTEGR(java.lang.String)]
>  (SQL Exception while executing the following:INSERT INTO 
> OFBIZ.INVENTORY_ITEM_DETAIL (INVENTORY_ITEM_ID, INVENTORY_ITEM_DETAIL_SEQ_ID, 
> EFFECTIVE_DATE, QUANTITY_ON_HAND_DIFF, AVAILABLE_TO_PROMISE_DIFF, UNIT_COST, 
> ORDER_ID, ORDER_ITEM_SEQ_ID, SHIP_GROUP_SEQ_ID, SHIPMENT_ID, 
> SHIPMENT_ITEM_SEQ_ID, RETURN_ID, RETURN_ITEM_SEQ_ID, WORK_EFFORT_ID, 
> FIXED_ASSET_ID, MAINT_HIST_SEQ_ID, ITEM_ISSUANCE_ID, RECEIPT_ID, 
> PHYSICAL_INVENTORY_ID, REASON_ENUM_ID, DESCRIPTION, LAST_UPDATED_STAMP, 
> LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, 
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on 
> table 'INVENTORY_ITEM_DETAIL' caused a violation of foreign key constraint 
> 'INV_ITDTL_REAS' for key (VAR_INTEGR). The statement has been rolled back.))] 
> calling service createInventoryItemDetail in createInventoryItemVariance 
> calling service createInventoryItemVariance in 
> createPhysicalInventoryAndVariance

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to