[ 
https://issues.apache.org/jira/browse/OFBIZ-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13855879#comment-13855879
 ] 

Christian Carlow commented on OFBIZ-5440:
-----------------------------------------

I created the following entity to handle OrderItem BOM pricing:

{code}
    <entity entity-name="OrderItemBom"
            package-name="org.ofbiz.order.order"
            never-cache="true"
            title="Order Item BOM Info">
      <field name="orderItemBomId" type="id-ne"></field>
      <field name="parentOrderItemBomId" type="id-ne"></field>
      <field name="orderId" type="id-ne"></field>
      <field name="orderItemSeqId" type="id-ne"></field>
      <field name="productId" type="id-ne"></field>
      <field name="price" type="fixed-point"></field>
      <field name="quantity" type="fixed-point"></field>
      <field name="sequenceNum" type="numeric"></field>
      <field name="description" type="description"></field>
      <field name="comments" type="comment"></field>
      <prim-key field="orderItemBomId"/>
      <relation type="one" fk-name="ORDER_ITBOM_OHDR" 
rel-entity-name="OrderHeader">
        <key-map field-name="orderId"/>
      </relation>
      <relation type="one" fk-name="ORDER_ITBOM_OITM" 
rel-entity-name="OrderItem">
        <key-map field-name="orderId"/>
        <key-map field-name="orderItemSeqId"/>
      </relation>
      <relation type="one" fk-name="ORDER_ITBOM_PD" rel-entity-name="Product">
        <key-map field-name="productId"/>
      </relation>
      <relation type="one" fk-name="ORDER_ITBOM_PITBOM" 
rel-entity-name="OrderItemBom">
        <key-map field-name="parentOrderItemBomId" 
rel-field-name="orderItemBomId"/>
      </relation>
    </entity>
{code}

I think adding the shipGroupSeqId field will be necessary for tracking the ship 
group to which each variant should be assigned.

> Improve BOM functionality to handle virtual BOM variant selection
> -----------------------------------------------------------------
>
>                 Key: OFBIZ-5440
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5440
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: SVN trunk
>            Reporter: Christian Carlow
>
> The BOM functionality should be improved to handle virtual product 
> variant/feature selections.  Such functionality would allow for something 
> such as GZ-OUTER-BASKET of selected features to contain 3 GZ-INNER-BASKETs of 
> different selected features
> I think the BOMNode class should contain a List<BOMNode>variantNodes member 
> to be used for virtual nodes in the loadChildren function.  When virtual 
> variants exist, the virtual node childrenNodes can be unset since the nodes 
> will be contained in the variantNodes instead.
> I disovered the need for such functionality while trying to implement 
> OFBIZ-5420 and OFBIZ-5437.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to