This OrderItemQuantityReportGroupByItem view entity looks like this in the
10.04 code base: <view-entity entity-name="OrderItemQuantityReportGroupByItem" package-name="org.ofbiz.order.order" never-cache="true" title="Reports quantity ordered, issued and open by item for OrderItems."> <member-entity entity-alias="OH" entity-name="OrderHeader"/> <member-entity entity-alias="OI" entity-name="OrderItem"/> <member-entity entity-alias="II" entity-name="ItemIssuance"/> <alias entity-alias="OH" name="orderTypeId" group-by="false"/> <alias entity-alias="OH" name="orderStatusId" field="statusId" group-by="false"/> <alias entity-alias="OH" name="orderDate" group-by="true"/> <alias entity-alias="OI" name="orderItemStatusId" field="statusId" group-by="false"/> <alias entity-alias="OI" name="productId" group-by="true"/> <alias entity-alias="OI" name="issuedDateTime" group-by="false"/> <alias entity-alias="OI" name="quantityOrdered" function="sum"> <complex-alias operator="-"> <complex-alias-field entity-alias="OI" field="quantity" default-value="0"/> <complex-alias-field entity-alias="OI" field="cancelQuantity" default-value="0"/> </complex-alias> </alias> <alias entity-alias="II" name="quantityIssued" field="quantity" function="sum"/> <alias entity-alias="OI" name="quantityOpen" function="sum"> <complex-alias operator="-"> <complex-alias-field entity-alias="OI" field="quantity" default-value="0"/> <complex-alias-field entity-alias="OI" field="cancelQuantity" default-value="0"/> <complex-alias-field entity-alias="II" field="quantity" default-value="0"/> </complex-alias> </alias> <view-link entity-alias="OI" rel-entity-alias="OH"> <key-map field-name="orderId"/> </view-link> <view-link entity-alias="OI" rel-entity-alias="II" rel-optional="true"> <key-map field-name="orderId"/> <key-map field-name="orderItemSeqId"/> </view-link> </view-entity> If you are looking at a purchase order and you have received part or all of that order in two or more partial shipments, you have two or more ItemIssuances which results in the summed fields being wrong (high by quantity * ItemIssuance records). In the case that was reported to me, there were 150 ordered, and 10 ItemIssuance records with 4, 4, 10, 4, 4, 6, 5, 5, 5, 4. That results in it appearing as if 1500 items were ordered and and 1449 outstanding. I need to get this fixed pretty fast. I can fix it by modifying InventoryHelper to use a different view (OrderHeaderAndItems for example) and subtract out the ItemIssuance in the code, but I am hoping that some view entity guru can see a way to fix this in the entity*.xml file. Thanks in Advance Skip |
Created a JIRA issue for this here:
https://issues.apache.org/jira/browse/OFBIZ-4559 -----Original Message----- From: Skip [mailto:[hidden email]] Sent: Thursday, November 10, 2011 5:06 PM To: OfbizUser Subject: Error with OrderItemQuantityReportGroupByItem This OrderItemQuantityReportGroupByItem view entity looks like this in the 10.04 code base: <view-entity entity-name="OrderItemQuantityReportGroupByItem" package-name="org.ofbiz.order.order" never-cache="true" title="Reports quantity ordered, issued and open by item for OrderItems."> <member-entity entity-alias="OH" entity-name="OrderHeader"/> <member-entity entity-alias="OI" entity-name="OrderItem"/> <member-entity entity-alias="II" entity-name="ItemIssuance"/> <alias entity-alias="OH" name="orderTypeId" group-by="false"/> <alias entity-alias="OH" name="orderStatusId" field="statusId" group-by="false"/> <alias entity-alias="OH" name="orderDate" group-by="true"/> <alias entity-alias="OI" name="orderItemStatusId" field="statusId" group-by="false"/> <alias entity-alias="OI" name="productId" group-by="true"/> <alias entity-alias="OI" name="issuedDateTime" group-by="false"/> <alias entity-alias="OI" name="quantityOrdered" function="sum"> <complex-alias operator="-"> <complex-alias-field entity-alias="OI" field="quantity" default-value="0"/> <complex-alias-field entity-alias="OI" field="cancelQuantity" default-value="0"/> </complex-alias> </alias> <alias entity-alias="II" name="quantityIssued" field="quantity" function="sum"/> <alias entity-alias="OI" name="quantityOpen" function="sum"> <complex-alias operator="-"> <complex-alias-field entity-alias="OI" field="quantity" default-value="0"/> <complex-alias-field entity-alias="OI" field="cancelQuantity" default-value="0"/> <complex-alias-field entity-alias="II" field="quantity" default-value="0"/> </complex-alias> </alias> <view-link entity-alias="OI" rel-entity-alias="OH"> <key-map field-name="orderId"/> </view-link> <view-link entity-alias="OI" rel-entity-alias="II" rel-optional="true"> <key-map field-name="orderId"/> <key-map field-name="orderItemSeqId"/> </view-link> </view-entity> If you are looking at a purchase order and you have received part or all of that order in two or more partial shipments, you have two or more ItemIssuances which results in the summed fields being wrong (high by quantity * ItemIssuance records). In the case that was reported to me, there were 150 ordered, and 10 ItemIssuance records with 4, 4, 10, 4, 4, 6, 5, 5, 5, 4. That results in it appearing as if 1500 items were ordered and and 1449 outstanding. I need to get this fixed pretty fast. I can fix it by modifying InventoryHelper to use a different view (OrderHeaderAndItems for example) and subtract out the ItemIssuance in the code, but I am hoping that some view entity guru can see a way to fix this in the entity*.xml file. Thanks in Advance Skip |
Free forum by Nabble | Edit this page |