Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented: Added new inventory cycle count feature for warehouse.(OFBIZ-10577) #14

Open
wants to merge 23 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
14bd073
Implemented: Added new inventory cycle count feature for warehouse.
Feb 11, 2020
942c020
Merge pull request #2 from apache/trunk
yashwantdhakad Feb 22, 2020
0e3b430
Fixed: Resolved the conflicts due to code merge.
Mar 13, 2020
4d60af8
Merge pull request #4 from apache/trunk
yashwantdhakad Apr 16, 2020
7622026
Merge branch 'trunk' into OFBIZ-10577
Jun 27, 2020
3ed9eec
Merge pull request #5 from apache/trunk
yashwantdhakad Jun 27, 2020
0a64b91
Fixed: The conflicts during merge from trunk to feature branch.
Jun 27, 2020
2c5e3ea
Fixed: Fixed the following issues: 1. Added missing UI labels. 2. Fix…
Jun 27, 2020
69b9ede
Update OrderList.ftl
yashwantdhakad Jun 27, 2020
8643a8d
Merge pull request #6 from apache/trunk
yashwantdhakad Jun 27, 2020
54e5a6d
Merge branch 'trunk' into OFBIZ-10577
Jun 27, 2020
3a1144f
Merge branch 'OFBIZ-10577' of https://github.com/yashwantdhakad/ofbiz…
Jun 27, 2020
5a48e1b
Merge pull request #7 from apache/trunk
yashwantdhakad Aug 4, 2020
1aedc53
Fixed: Resolved the conflicts
Aug 4, 2020
4cc97db
Merge pull request #8 from apache/trunk
yashwantdhakad Sep 26, 2020
da1fa69
Merge pull request #9 from yashwantdhakad/trunk
yashwantdhakad Sep 26, 2020
8808fae
Merge pull request #10 from apache/trunk
yashwantdhakad Dec 26, 2020
baf98fb
Merge branch 'trunk' into OFBIZ-10577
Dec 26, 2020
762f410
Merge branch 'OFBIZ-10577' of https://github.com/yashwantdhakad/ofbiz…
Dec 26, 2020
11153e0
Merge pull request #11 from yashwantdhakad/trunk
yashwantdhakad Dec 26, 2020
6d2c38c
Merge branch 'OFBIZ-10577' of https://github.com/yashwantdhakad/ofbiz…
Dec 26, 2020
01ace7f
Fixed: Formatting changes
Dec 26, 2020
8e53664
Merge branch 'apache:trunk' into OFBIZ-10577
yashwantdhakad Sep 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions applications/datamodel/data/seed/ProductSeedData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,21 @@ under the License.
<StatusValidChange statusId="IXF_SCHEDULED" statusIdTo="IXF_CANCELLED" transitionName="Scheduled Inventory Cancelled"/>
<StatusValidChange statusId="IXF_EN_ROUTE" statusIdTo="IXF_COMPLETE" transitionName="In Route Transfer Completed"/>

<!-- inventory cycle count status -->
<StatusType statusTypeId="INV_CNT_STTS" description="Inventory Count Status" hasTable="N"/>
<StatusItem description="Created" sequenceId="01" statusCode="CREATED" statusId="INV_COUNT_CREATED" statusTypeId="INV_CNT_STTS"/>
<StatusItem description="Pending For Review" sequenceId="02" statusCode="APPROVED" statusId="INV_COUNT_APPROVED" statusTypeId="INV_CNT_STTS"/>
<StatusItem description="Completed" sequenceId="03" statusCode="COMPLETED" statusId="INV_COUNT_COMPLETED" statusTypeId="INV_CNT_STTS"/>
<StatusItem description="Rejected" sequenceId="04" statusCode="REJECTED" statusId="INV_COUNT_REJECTED" statusTypeId="INV_CNT_STTS"/>
<StatusItem description="Closed" sequenceId="05" statusCode="CLOSED" statusId="INV_COUNT_CLOSED" statusTypeId="INV_CNT_STTS"/>

<StatusValidChange statusId="INV_COUNT_CREATED" statusIdTo="INV_COUNT_COMPLETED" transitionName="Complete Inventory Count"/>
<StatusValidChange statusId="INV_COUNT_CREATED" statusIdTo="INV_COUNT_REJECTED" transitionName="Reject Inventory Count"/>
<StatusValidChange statusId="INV_COUNT_CREATED" statusIdTo="INV_COUNT_APPROVED" transitionName="Approved Inventory Count"/>
<StatusValidChange statusId="INV_COUNT_APPROVED" statusIdTo="INV_COUNT_COMPLETED" transitionName="Complete Inventory Count"/>
<StatusValidChange statusId="INV_COUNT_APPROVED" statusIdTo="INV_COUNT_REJECTED" transitionName="Reject Inventory Count"/>
<StatusValidChange statusId="INV_COUNT_REJECTED" statusIdTo="INV_COUNT_CLOSED" transitionName="Closed Inventory Count"/>

<!-- product review status -->
<StatusType description="Product Review" hasTable="N" statusTypeId="PRODUCT_REVIEW_STTS"/>
<StatusItem description="Pending" sequenceId="01" statusCode="PENDING" statusId="PRR_PENDING" statusTypeId="PRODUCT_REVIEW_STTS"/>
Expand Down
112 changes: 110 additions & 2 deletions applications/datamodel/entitydef/product-entitymodel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,10 @@ under the License.
<field name="sectionId" type="id"></field>
<field name="levelId" type="id"></field>
<field name="positionId" type="id"></field>
<field name="geoPointId" type="id"></field>
<field name="geoPointId" type="id"></field>
<field name="locked" type="indicator"/>
<field name="lastCountDate" type="date"/>
<field name="nextCountDate" type="date"/>
<prim-key field="facilityId"/>
<prim-key field="locationSeqId"/>
<relation type="one" fk-name="FACILITY_LOC_FAC" rel-entity-name="Facility">
Expand All @@ -1299,7 +1302,10 @@ under the License.
</relation>
<relation type="one" fk-name="FACILITY_LOC_GEOPT" rel-entity-name="GeoPoint">
<key-map field-name="geoPointId"/>
</relation>
</relation>
<index name="FAC_LOC_SEQ_IDX">
<index-field name="locationSeqId"/>
</index>
</entity>
<entity entity-name="FacilityLocationGeoPoint" package-name="org.apache.ofbiz.product.facility" title="Facility Location Geo Location with history">
<field name="facilityId" type="id"></field>
Expand Down Expand Up @@ -5009,4 +5015,106 @@ under the License.
<key-map field-name="telecomCustomMethodId" rel-field-name="customMethodId"/>
</relation>
</entity>
<entity entity-name="InventoryCount"
package-name="org.apache.ofbiz.scm.product.inventory"
title="Inventory Count" >
<field name="inventoryCountId" type="id"/>
<field name="createdByUserLogin" type="id-vlong"/>
<field name="facilityId" type="id"/>
<field name="linkedSessionId" type="id"/>
<field name="statusId" type="id"/>
<field name="createdDate" type="date-time"/>
<prim-key field="inventoryCountId"/>
<relation type="one" fk-name="INV_CNT_STTS" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
<relation type="one" fk-name="INV_CNT_FAC" rel-entity-name="Facility">
<key-map field-name="facilityId"/>
</relation>
</entity>
<entity entity-name="InventoryCountItem"
package-name="org.apache.ofbiz.product.inventory"
title="Inventory Count Item" >
<field name="inventoryCountId" type="id"/>
<field name="inventoryCountItemSeqId" type="id"/>
<field name="inventoryItemId" type="id"/>
<field name="itemStatusId" type="id"/>
<field name="locationSeqId" type="id-long"/>
<field name="productId" type="id"/>
<field name="productIdentifier" type="id-long"/>
<field name="quantity" type="fixed-point"/>
<prim-key field="inventoryCountId"/>
<prim-key field="inventoryCountItemSeqId"/>
<relation type="one" fk-name="INV_ITM_CNT_IMP" rel-entity-name="InventoryCount">
<key-map field-name="inventoryCountId"/>
</relation>
<relation type="many" fk-name="INV_CNT_INV_ITM" rel-entity-name="InventoryItem">
<key-map field-name="inventoryItemId"/>
</relation>
<relation type="one" fk-name="INV_CNT_STTS_ITM" rel-entity-name="StatusItem">
<key-map field-name="itemStatusId" rel-field-name="statusId"/>
</relation>
<relation type="many" fk-name="INV_CNT_FAC_LOC" rel-entity-name="FacilityLocation">
<key-map field-name="locationSeqId"/>
</relation>
</entity>
<entity entity-name="InventoryCountVariance"
package-name="org.apache.ofbiz.product.inventory"
title="Inventory Count Variance" >
<field name="inventoryCountId" type="id"/>
<field name="inventoryCountItemSeqId" type="id"/>
<field name="inventoryItemId" type="id"/>
<field name="productId" type="id"/>
<field name="productIdentifier" type="id-long"/>
<field name="locationSeqId" type="id"/>
<field name="systemQuantityOnHand" type="fixed-point"/>
<field name="actualQuantityOnHand" type="fixed-point"/>
<field name="varianceQuantityOnHand" type="fixed-point"/>
<field name="unitCost" type="fixed-point"/>
<field name="totalCost" type="fixed-point"/>
<field name="actualCost" type="fixed-point"/>
<field name="costVariance" type="fixed-point"/>
<field name="actualValue" type="fixed-point"/>
<field name="totalValue" type="fixed-point"/>
<field name="valueVariance" type="fixed-point"/>
<prim-key field="inventoryCountId"/>
<prim-key field="inventoryCountItemSeqId"/>
<relation type="one" fk-name="INV_COUNT_IMP" rel-entity-name="InventoryCount">
<key-map field-name="inventoryCountId"/>
</relation>
<relation type="one" fk-name="INV_COUNT_IMP_ITM" rel-entity-name="InventoryCountItem">
<key-map field-name="inventoryCountId"/>
<key-map field-name="inventoryCountItemSeqId"/>
</relation>
<relation type="many" fk-name="INV_COUNT_INV_ITM" rel-entity-name="InventoryItem">
<key-map field-name="inventoryItemId"/>
</relation>
<relation type="many" fk-name="INV_COUNT_FAC_LOC" rel-entity-name="FacilityLocation">
<key-map field-name="locationSeqId"/>
</relation>
</entity>
<view-entity entity-name="InventoryCountAndItems" package-name="org.apache.ofbiz.product.inventory">
<member-entity entity-alias="IC" entity-name="InventoryCount"/>
<member-entity entity-alias="ICI" entity-name="InventoryCountItem"/>
<alias-all entity-alias="IC"/>
<alias-all entity-alias="ICI"/>
<view-link rel-entity-alias="ICI" entity-alias="IC" rel-optional="true">
<key-map field-name="inventoryCountId"/>
</view-link>
</view-entity>
<view-entity entity-name="InventoryCountItemsAndVariance" package-name="org.apache.ofbiz.product.inventory">
<member-entity entity-alias="IC" entity-name="InventoryCount"/>
<member-entity entity-alias="ICI" entity-name="InventoryCountItem"/>
<member-entity entity-alias="ICV" entity-name="InventoryCountVariance"/>
<alias-all entity-alias="IC"/>
<alias-all entity-alias="ICI"/>
<alias-all entity-alias="ICV"/>
<view-link rel-entity-alias="IC" entity-alias="ICI" rel-optional="true">
<key-map field-name="inventoryCountId"/>
</view-link>
<view-link rel-entity-alias="ICV" entity-alias="ICI" rel-optional="true">
<key-map field-name="inventoryCountId"/>
<key-map field-name="inventoryCountItemSeqId"/>
</view-link>
</view-entity>
</entitymodel>
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ def issueProductionRunTaskComponentInline(Map parameters,
GenericValue inventoryItem,
GenericValue lastNonSerInventoryItem) {

facilityLocations = from("FacilityLocation").where("facilityId", inventoryItem?.facilityId, "locationSeqId", inventoryItem?.locationSeqId, "locked", "Y").queryList()
if (facilityLocations) {
return error("The affected LTN# " + inventoryItem.inventoryItemId + " belong to the locked locations under active counting session to prevent any inbound and outbound inventory movement. Please choose different LTN from any free location or wait till lock is released.")
}

if (parameters.quantityNotIssued > 0) {
if ("SERIALIZED_INV_ITEM" == inventoryItem.inventoryItemTypeId &&
"INV_AVAILABLE" == inventoryItem.statusId) {
Expand Down
2 changes: 1 addition & 1 deletion applications/order/template/order/OrderList.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ under the License.
if (jQuery('#allcheck').is(':checked')) {
jQuery('.statuscheck').attr ('checked', true);
} else {
jQuery('.statuscheck').attr ('checked', false );
jQuery('.statuscheck').attr ('checked', false);
}
}
function setAllCheckbox() {
Expand Down
Loading