Author: jleroux
Date: Tue Feb 24 13:33:43 2009
New Revision: 747377
URL: http://svn.apache.org/viewvc?rev=747377&view=rev
Log:
Missing part of previous commit 747364 (the entity changes part)
I kept fixed-point for averageCost which I guess has been changed since Rashko
creaed his patch
Modified:
ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
Modified: ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml?rev=747377&r1=747376&r2=747377&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml Tue Feb 24
13:33:43 2009
@@ -824,6 +824,10 @@
<Enumeration description="Delivered Duty Paid" enumCode="DDP"
enumId="POTT_DDP" sequenceId="22" enumTypeId="PTSOFTTFR"/>
<Enumeration description="Delivered Duty Unpaid" enumCode="DDQ"
enumId="POTT_DDQ" sequenceId="23" enumTypeId="PTSOFTTFR"/>
+ <ProductAverageCostType productAverageCostTypeId="SIMPLE_AVG_COST"
hasTable="N" description="Simple Average Cost"/>
+ <ProductAverageCostType productAverageCostTypeId="WEIGHTED_AVG_COST"
hasTable="N" description="Weighted Average Cost"/>
+ <ProductAverageCostType productAverageCostTypeId="MOVING_AVG_COST"
hasTable="N" description="Moving Average Cost"/>
+
<!--
INCOTERM options found here:
http://www.foreign-trade.com/reference/incoterms.cfm
Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?rev=747377&r1=747376&r2=747377&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Tue Feb 24
13:33:43 2009
@@ -2197,21 +2197,43 @@
<entity entity-name="ProductAverageCost"
package-name="org.ofbiz.accounting.ledger"
title="Running tally of average cost">
- <description>Running tally of a product's average cost in a particular
company</description>
+ <description>Running tally of a product's average cost in a particular
company and facility</description>
+ <field name="productAverageCostTypeId" type="id-ne"/>
<field name="organizationPartyId" type="id-ne"/>
<field name="productId" type="id-ne"/>
- <field name="averageCost" type="fixed-point"/>
+ <field name="facilityId" type="id-ne"/>
<field name="fromDate" type="date-time"/>
<field name="thruDate" type="date-time"/>
+ <field name="averageCost" type="fixed-point"/>
+ <prim-key field="productAverageCostTypeId"/>
<prim-key field="organizationPartyId"/>
<prim-key field="productId"/>
+ <prim-key field="facilityId"/>
<prim-key field="fromDate"/>
+ <relation type="one" rel-entity-name="ProductAverageCostType"
fk-name="AVG_COST_TYPE">
+ <key-map field-name="productAverageCostTypeId"/>
+ </relation>
<relation type="one" rel-entity-name="Party" fk-name="AVG_COST_PARTY">
<key-map field-name="organizationPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" rel-entity-name="Product" fk-name="AVG_COST_PROD">
<key-map field-name="productId"/>
</relation>
+ <relation type="one" rel-entity-name="Facility" fk-name="AVG_COST_FACI">
+ <key-map field-name="facilityId"/>
+ </relation>
+ </entity>
+ <entity entity-name="ProductAverageCostType"
+ package-name="org.ofbiz.accounting.ledger"
+ title="Product average cost type"
default-resource-name="AccountingEntityLabels">
+ <field name="productAverageCostTypeId" type="id-ne"/>
+ <field name="parentTypeId" type="id-ne"/>
+ <field name="hasTable" type="indicator"/>
+ <field name="description" type="description"/>
+ <prim-key field="productAverageCostTypeId"/>
+ <relation type="one" fk-name="AVGCOST_TYPE_PAR" title="Parent"
rel-entity-name="ProductAverageCostType">
+ <key-map field-name="parentTypeId"
rel-field-name="productAverageCostTypeId"/>
+ </relation>
</entity>
<entity entity-name="SettlementTerm"
package-name="org.ofbiz.accounting.ledger"