[
https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17072912#comment-17072912
]
James Yong commented on OFBIZ-11431:
------------------------------------
Hi Pierre, all,
2 issues here:
1st is the removal of *uomId* field from *InvoiceItem* entity because the info
is already captured in *Invoice* entity. As the field may be in use, we can
move this field to an *extend-entity* for *InvoiceItem* like the following.
This will address the deprecation issue.
{code:xml}
File: datamodel/entitydef/deprecated-entitymodel.xml
...
<!-- Add reason -->
<extend-entity entity-name="InvoiceItem">
<field name="uomId" type="id"></field>
<relation type="one" fk-name="INVCE_ITM_UOM" rel-entity-name="Uom">
<key-map field-name="uomId"/>
</relation>
</extend-entity>
...
{code}
2nd is the addition of *quantityUomId* field in *InvoiceItem* entity.
I can't find a corresponding field in *OrderItem* entity.
Is there is a corresponding field in another related entity?
> InvoiceItem: uomID is wrongly defined
> -------------------------------------
>
> Key: OFBIZ-11431
> URL: https://issues.apache.org/jira/browse/OFBIZ-11431
> Project: OFBiz
> Issue Type: Bug
> Components: datamodel
> Affects Versions: Trunk
> Reporter: Pierre Smits
> Priority: Critical
> Labels: refactoring
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently the InvoiceItem entity has the field uomId, per:
> {code:java}
> <field name="uomId" type="id"></field>
> {code}
> per the demo data this field is used to capture the currency of the invoice
> item. This is, however, wrong. The currency for invoice items is set in the
> invoice entity record (with field currencyUomId.
> The uomId in the invoice item is related to the quantity set, and must be
> correctly named: 'quantityUomId.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)