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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0049991
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajoralways2022-08-12 07:262022-11-08 15:39
Reporterprakashmurugesan88View Statuspublic 
Assigned Toprakashmurugesan88 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0049991: Check Constraint(m_storage_detail_check1) violation when we try to integrate physical inventory by API for some products

DescriptionIn Physical Inventory API when trying to update a product(some products) quantity to '0'.

Inventory is not imported.
Following error appears in console:
ERROR: new row for relation "m_storage_detail" violates check constraint "m_storage_detail_check1"
Steps To ReproduceIn Physical Inventory API try to update a product quantity to '0'.

Prerequisite:
Product must has stock qty in that warehouse and bin.
Product must have entry M_STORAGE_DETAIL with QTYORDERONHAND, PREQTYORDERONHAND is not null.

Check Inventory is not imported.
Following error appears in console:
ERROR: new row for relation "m_storage_detail" violates check constraint "m_storage_detail_check1"

Detail: Failing row contains (ABAA38F137B64F0DA5E9B89BAB2821D9, C8F84269A01041ADB5E61ADCBDA575A8, 0, 100, null, 0, 0, 2022-07-29 00:00:00, 0, 0, FD0BE3FBD9BA4CDFB8523667F50DB389, B2C16DEF83824A98BB08E218E63EB798, Y, 2022-07-29 17:28:18, 100, 2022-07-29 17:28:18, 100, 62802F293E1A4DCE9013F7CB353905A8, 0, 0, null). Where: SQL statement
"INSERT INTO M_STORAGE_DETAIL ( M_Storage_Detail_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, M_PRODUCT_ID, M_LOCATOR_ID, M_ATTRIBUTESETINSTANCE_ID, C_UOM_ID, M_PRODUCT_UOM_ID, QTYONHAND, QTYORDERONHAND, DATELASTINVENTORY, PREQTYONHAND, PREQTYORDERONHAND, M_REFINVENTORY_ID ) VALUES ( get_uuid(), p_client, p_org, 'Y', TO_DATE(NOW()), p_user, TO_DATE(NOW()), p_user, p_product, p_locator, v_attributesetinstance, p_uom, p_product_uom, COALESCE(p_qty, 0), v_qtyorder, p_datelastinventory, COALESCE(p_preqty, 0), v_preqtyorder, v_refinventoryid )"
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0050776 closedTriage Omni WMS Openbravo ERP Error in InventoryCountProcess - constraint "m_storage_detail_check1" violation 
related to defect 0050039 closedAtulOpenbravo Retail Modules Check Constraint(m_storage_detail_check1) violation when we try to integrate physical inventory by API for some products 

-  Notes
(0140079)
prakashmurugesan88 (developer)
2022-08-12 07:36

Merge Request Created,
https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/71 [^]
(0140092)
hgbot (developer)
2022-08-12 11:29

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: 6d80d212e8b8d79f7779cd7fad6ee8ce5bc57874
Author: Prakash M <prakash@qualiantech.com>
Date: 12-08-2022 11:02:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/6d80d212e8b8d79f7779cd7fad6ee8ce5bc57874 [^]

Fixed ISSUE-49991: Fixes m_storage_detail_check1 check constraint violation when the qty is updated to zero
* Issue occurs as book qty is not reflected in Inventory Line Object
* Hence BookQty and InventoryLineQty are 0, therefore M_UPDATE_INVENTORY is invoked
* Therefore trying to update order uom as null and constraint voilated
* Fixed by refreshing the Inventory Line Object

---
M src/org/openbravo/api/hook/inventory/ImportedInventoryBaseOBObjectAfterFlushHook.java
---

- Issue History
Date Modified Username Field Change
2022-08-12 07:26 prakashmurugesan88 New Issue
2022-08-12 07:26 prakashmurugesan88 Assigned To => prakashmurugesan88
2022-08-12 07:26 prakashmurugesan88 Triggers an Emergency Pack => No
2022-08-12 07:26 prakashmurugesan88 Status new => scheduled
2022-08-12 07:36 prakashmurugesan88 Note Added: 0140079
2022-08-12 11:29 hgbot Resolution open => fixed
2022-08-12 11:29 hgbot Status scheduled => resolved
2022-08-12 11:29 hgbot Note Added: 0140092
2022-08-12 11:30 vmromanos Status resolved => closed
2022-08-24 08:22 vmromanos Relationship added related to 0050039
2022-11-08 15:39 rafaroda Relationship added related to 0050776


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker