blob: b4b6fca391392d194974aa176ca884f4c3344499 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
<!-- ========================================================= -->
<!-- ======================== Defaults ======================= -->
<!-- ========================================================= -->
<title>Entity of an Open For Business Project Component</title>
<description>None</description>
<version>1.0</version>
<!-- ========================================================= -->
<!-- ======================== Data Model ===================== -->
<!-- The modules in this file are as follows: -->
<!-- - org.ofbiz.accounting.budget -->
<!-- - org.ofbiz.accounting.finaccount -->
<!-- - org.ofbiz.accounting.fixedasset -->
<!-- - org.ofbiz.accounting.invoice -->
<!-- - org.ofbiz.accounting.ledger -->
<!-- - org.ofbiz.accounting.payment -->
<!-- - org.ofbiz.accounting.tax -->
<!-- - org.ofbiz.accounting.rate -->
<!-- ========================================================= -->
<!-- ========================================================= -->
<!-- org.ofbiz.accounting.budget -->
<!-- ========================================================= -->
<entity entity-name="Budget"
package-name="org.ofbiz.accounting.budget"
title="Budget Entity">
<field name="budgetId" type="id-ne"></field>
<field name="budgetTypeId" type="id"></field>
<field name="customTimePeriodId" type="id"></field>
<field name="comments" type="comment"></field>
<prim-key field="budgetId"/>
<relation type="one" fk-name="BUDGET_BGTTYP" rel-entity-name="BudgetType">
<key-map field-name="budgetTypeId"/>
</relation>
<relation type="one" fk-name="BUDGET_CTP" rel-entity-name="CustomTimePeriod">
<key-map field-name="customTimePeriodId"/>
</relation>
<relation type="many" rel-entity-name="BudgetTypeAttr">
<key-map field-name="budgetTypeId"/>
</relation>
</entity>
<entity entity-name="BudgetAttribute"
package-name="org.ofbiz.accounting.budget"
title="Budget Attribute Entity">
<field name="budgetId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="budgetId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="BUDGET_ATTR_BDGT" rel-entity-name="Budget">
<key-map field-name="budgetId"/>
</relation>
<relation type="many" rel-entity-name="BudgetTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="BudgetItem"
package-name="org.ofbiz.accounting.budget"
title="Budget Item Entity">
<field name="budgetId" type="id-ne"></field>
<field name="budgetItemSeqId" type="id-ne"></field>
<field name="budgetItemTypeId" type="id"></field>
<field name="amount" type="currency-amount"></field>
<field name="purpose" type="long-varchar"></field>
<field name="justification" type="long-varchar"></field>
<prim-key field="budgetId"/>
<prim-key field="budgetItemSeqId"/>
<relation type="one" fk-name="BDGTITM_TO_BDGT" rel-entity-name="Budget">
<key-map field-name="budgetId"/>
</relation>
<relation type="one" fk-name="BUDGET_ITEM_BTYP" rel-entity-name="BudgetItemType">
<key-map field-name="budgetItemTypeId"/>
</relation>
<relation type="many" rel-entity-name="BudgetItemTypeAttr">
<key-map field-name="budgetItemTypeId"/>
</relation>
</entity>
<entity entity-name="BudgetItemAttribute"
package-name="org.ofbiz.accounting.budget"
title="Budget Item Attribute Entity">
<field name="budgetId" type="id-ne"></field>
<field name="budgetItemSeqId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="budgetId"/>
<prim-key field="budgetItemSeqId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="BUDGET_ITEM_ATTR" rel-entity-name="BudgetItem">
<key-map field-name="budgetId"/>
<key-map field-name="budgetItemSeqId"/>
</relation>
<relation type="many" rel-entity-name="BudgetItemTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="BudgetItemType"
package-name="org.ofbiz.accounting.budget"
title="Budget Item Type Entity">
<field name="budgetItemTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="budgetItemTypeId"/>
<relation type="one" fk-name="BUDGET_ITM_TYPPAR" title="Parent" rel-entity-name="BudgetItemType">
<key-map field-name="parentTypeId" rel-field-name="budgetItemTypeId"/>
</relation>
</entity>
<entity entity-name="BudgetItemTypeAttr"
package-name="org.ofbiz.accounting.budget"
title="Budget Item Type Attribute Entity">
<field name="budgetItemTypeId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<prim-key field="budgetItemTypeId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="BUDGET_ITMTYPATTR" rel-entity-name="BudgetItemType">
<key-map field-name="budgetItemTypeId"/>
</relation>
<relation type="many" rel-entity-name="BudgetItemAttribute">
<key-map field-name="attrName"/>
</relation>
<relation type="many" rel-entity-name="BudgetItem">
<key-map field-name="budgetItemTypeId"/>
</relation>
</entity>
<entity entity-name="BudgetReview"
package-name="org.ofbiz.accounting.budget"
title="Budget Review Entity">
<field name="budgetId" type="id-ne"></field>
<field name="budgetReviewId" type="id-ne"></field>
<field name="partyId" type="id-ne"></field>
<field name="budgetReviewResultTypeId" type="id-ne"></field>
<field name="reviewDate" type="date-time"></field>
<prim-key field="budgetId"/>
<prim-key field="budgetReviewId"/>
<prim-key field="partyId"/>
<prim-key field="budgetReviewResultTypeId"/>
<relation type="one" fk-name="BUDGET_RVW_BDGT" rel-entity-name="Budget">
<key-map field-name="budgetId"/>
</relation>
<relation type="one" fk-name="BUDGET_RVW_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one" fk-name="BUDGET_RVW_RTYPE" rel-entity-name="BudgetReviewResultType">
<key-map field-name="budgetReviewResultTypeId"/>
</relation>
</entity>
<entity entity-name="BudgetReviewResultType"
package-name="org.ofbiz.accounting.budget"
title="Budget Review Result Type Entity">
<field name="budgetReviewResultTypeId" type="id-ne"></field>
<field name="description" type="description"></field>
<field name="comments" type="comment"></field>
<prim-key field="budgetReviewResultTypeId"/>
</entity>
<entity entity-name="BudgetRevision"
package-name="org.ofbiz.accounting.budget"
title="Budget Revision Entity">
<field name="budgetId" type="id-ne"></field>
<field name="revisionSeqId" type="id-ne"></field>
<field name="dateRevised" type="date-time"></field>
<prim-key field="budgetId"/>
<prim-key field="revisionSeqId"/>
<relation type="one" fk-name="BUDGET_RVSN_BDGT" rel-entity-name="Budget">
<key-map field-name="budgetId"/>
</relation>
</entity>
<entity entity-name="BudgetRevisionImpact"
package-name="org.ofbiz.accounting.budget"
title="Budget Revision Impact Entity">
<field name="budgetId" type="id-ne"></field>
<field name="budgetItemSeqId" type="id-ne"></field>
<field name="revisionSeqId" type="id-ne"></field>
<field name="revisedAmount" type="currency-amount"></field>
<field name="addDeleteFlag" type="indicator"></field>
<field name="revisionReason" type="long-varchar"></field>
<prim-key field="budgetId"/>
<prim-key field="budgetItemSeqId"/>
<prim-key field="revisionSeqId"/>
<relation type="one" fk-name="BUDGET_RNIMP_BDGT" rel-entity-name="Budget">
<key-map field-name="budgetId"/>
</relation>
<relation type="one" fk-name="BUDGET_RNIMP_BITM" rel-entity-name="BudgetItem">
<key-map field-name="budgetId"/>
<key-map field-name="budgetItemSeqId"/>
</relation>
<relation type="one" fk-name="BUDGET_RNIMP_REV" rel-entity-name="BudgetRevision">
<key-map field-name="budgetId"/>
<key-map field-name="revisionSeqId"/>
</relation>
</entity>
<entity entity-name="BudgetRole"
package-name="org.ofbiz.accounting.budget"
title="Budget Role Entity">
<field name="budgetId" type="id-ne"></field>
<field name="partyId" type="id-ne"></field>
<field name="roleTypeId" type="id-ne"></field>
<prim-key field="budgetId"/>
<prim-key field="partyId"/>
<prim-key field="roleTypeId"/>
<relation type="one" fk-name="BUDGET_ROLE_BDGT" rel-entity-name="Budget">
<key-map field-name="budgetId"/>
</relation>
<relation type="one" fk-name="BUDGET_ROLE_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one" fk-name="BUDGET_ROLE_PROLE" rel-entity-name="PartyRole">
<key-map field-name="partyId"/>
<key-map field-name="roleTypeId"/>
</relation>
</entity>
<entity entity-name="BudgetScenario"
package-name="org.ofbiz.accounting.budget"
title="Budget Scenario Entity">
<field name="budgetScenarioId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="budgetScenarioId"/>
</entity>
<entity entity-name="BudgetScenarioApplication"
package-name="org.ofbiz.accounting.budget"
title="Budget Scenario Application Entity">
<field name="budgetScenarioApplicId" type="id-ne"></field>
<field name="budgetScenarioId" type="id-ne"></field>
<field name="budgetId" type="id"></field>
<field name="budgetItemSeqId" type="id"></field>
<field name="amountChange" type="currency-amount"></field>
<field name="percentageChange" type="fixed-point"></field>
<prim-key field="budgetScenarioApplicId"/>
<prim-key field="budgetScenarioId"/>
<relation type="one" fk-name="BUDGET_SAPL_BSCN" rel-entity-name="BudgetScenario">
<key-map field-name="budgetScenarioId"/>
</relation>
<relation type="one" fk-name="BUDGET_SAPL_BDGT" rel-entity-name="Budget">
<key-map field-name="budgetId"/>
</relation>
<relation type="one" fk-name="BUDGET_SAPL_BITM" rel-entity-name="BudgetItem">
<key-map field-name="budgetId"/>
<key-map field-name="budgetItemSeqId"/>
</relation>
</entity>
<entity entity-name="BudgetScenarioRule"
package-name="org.ofbiz.accounting.budget"
title="Budget Scenario Rule Entity">
<field name="budgetScenarioId" type="id-ne"></field>
<field name="budgetItemTypeId" type="id-ne"></field>
<field name="amountChange" type="currency-amount"></field>
<field name="percentageChange" type="fixed-point"></field>
<prim-key field="budgetScenarioId"/>
<prim-key field="budgetItemTypeId"/>
<relation type="one" fk-name="BUDGET_SRLE_BSCN" rel-entity-name="BudgetScenario">
<key-map field-name="budgetScenarioId"/>
</relation>
<relation type="one" fk-name="BUDGET_SRLE_BITP" rel-entity-name="BudgetItemType">
<key-map field-name="budgetItemTypeId"/>
</relation>
</entity>
<entity entity-name="BudgetStatus"
package-name="org.ofbiz.accounting.budget"
title="Budget Status Entity">
<field name="budgetId" type="id-ne"></field>
<field name="statusId" type="id-ne"></field>
<field name="statusDate" type="date-time"></field>
<field name="comments" type="comment"></field>
<prim-key field="budgetId"/>
<prim-key field="statusId"/>
<relation type="one" fk-name="BUDGET_STTS_BDGT" rel-entity-name="Budget">
<key-map field-name="budgetId"/>
</relation>
<relation type="one" fk-name="BUDGET_STTS_STTS" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
</entity>
<entity entity-name="BudgetType"
package-name="org.ofbiz.accounting.budget"
title="Budget Type Entity">
<field name="budgetTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="budgetTypeId"/>
<relation type="one" fk-name="BUDGET_TYPE_PAR" title="Parent" rel-entity-name="BudgetType">
<key-map field-name="parentTypeId" rel-field-name="budgetTypeId"/>
</relation>
</entity>
<entity entity-name="BudgetTypeAttr"
package-name="org.ofbiz.accounting.budget"
title="Budget Type Attribute Entity">
<field name="budgetTypeId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<prim-key field="budgetTypeId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="BUDGET_TPATR_BT" rel-entity-name="BudgetType">
<key-map field-name="budgetTypeId"/>
</relation>
<relation type="many" rel-entity-name="BudgetAttribute">
<key-map field-name="attrName"/>
</relation>
<relation type="many" rel-entity-name="Budget">
<key-map field-name="budgetTypeId"/>
</relation>
</entity>
<!-- ========================================================= -->
<!-- org.ofbiz.accounting.finaccount -->
<!-- financial account entities for gift certificates, calling cards, or customer accounts -->
<!-- ========================================================= -->
<entity entity-name="FinAccount" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Entity">
<field name="finAccountId" type="id-ne"></field>
<field name="finAccountTypeId" type="id"></field>
<field name="statusId" type="id"></field>
<field name="finAccountName" type="name"></field>
<field name="finAccountCode" type="long-varchar" encrypt="true"></field>
<field name="finAccountPin" type="long-varchar" encrypt="true"></field>
<field name="currencyUomId" type="id-ne"/>
<field name="organizationPartyId" type="id"><description>The internal organization Party that owns (or rather, is liable for) the account.</description></field>
<field name="ownerPartyId" type="id"><description>The customer or third party that owns the account.</description></field>
<field name="postToGlAccountId" type="id"></field>
<field name="fromDate" type="date-time"><description>Describes when account will be valid. If null, valid immediately.</description></field>
<field name="thruDate" type="date-time"><description>Expiration date of the account. If null, will never expire.</description></field>
<field name="isRefundable" type="indicator"></field>
<field name="replenishPaymentId" type="id"></field>
<field name="replenishLevel" type="currency-amount"></field>
<field name="actualBalance" type="currency-amount"><description>Calculated as the sum of FinAccountTrans.amount</description></field>
<field name="availableBalance" type="currency-amount"><description>Calculated as actualBalance minus sum of outstanding FinAccountAuth.amount</description></field>
<prim-key field="finAccountId"/>
<relation type="one" fk-name="FINACCT_TYPE" rel-entity-name="FinAccountType">
<key-map field-name="finAccountTypeId"/>
</relation>
<relation type="one" fk-name="FINACCT_CURUOM" title="Currency" rel-entity-name="Uom">
<key-map field-name="currencyUomId" rel-field-name="uomId"/>
</relation>
<relation type="one" fk-name="FINACCT_ORGPTY" title="Organization" rel-entity-name="Party">
<key-map field-name="organizationPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="FINACCT_OWNPTY" title="Owner" rel-entity-name="Party">
<key-map field-name="ownerPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="FINACCT_GLAC" title="PostTo" rel-entity-name="GlAccount">
<key-map field-name="postToGlAccountId" rel-field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="FINACCT_PAYMETH" title="Replenish" rel-entity-name="PaymentMethod">
<key-map field-name="replenishPaymentId" rel-field-name="paymentMethodId"/>
</relation>
<relation type="many" rel-entity-name="FinAccountTypeAttr">
<key-map field-name="finAccountTypeId"/>
</relation>
</entity>
<view-entity entity-name="FinAccountAndRole" package-name="org.ofbiz.accounting.finaccount" title="Financial Account and Role View Entity">
<member-entity entity-alias="FA" entity-name="FinAccount"/>
<member-entity entity-alias="FR" entity-name="FinAccountRole"/>
<alias-all entity-alias="FA"/>
<alias name="partyId" entity-alias="FR"/>
<alias name="roleTypeId" entity-alias="FR"/>
<alias name="roleFromDate" entity-alias="FR" field="fromDate"/>
<alias name="roleThruDate" entity-alias="FR" field="thruDate"/>
<view-link entity-alias="FA" rel-entity-alias="FR">
<key-map field-name="finAccountId"/>
</view-link>
</view-entity>
<entity entity-name="FinAccountAttribute" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Attribute Entity">
<field name="finAccountId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="finAccountId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="FINACCT_ATTR" rel-entity-name="FinAccount">
<key-map field-name="finAccountId"/>
</relation>
<relation type="many" rel-entity-name="FinAccountTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="FinAccountAuth" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Authorizations record">
<field name="finAccountAuthId" type="id-ne"/>
<field name="finAccountId" type="id-ne"/>
<field name="amount" type="currency-amount"/>
<field name="currencyUomId" type="id-ne"/>
<field name="authorizationDate" type="date-time"/>
<field name="fromDate" type="date-time"/>
<field name="thruDate" type="date-time"/>
<prim-key field="finAccountAuthId"/>
<relation type="one" fk-name="FINACT_AUTH_FINACT" rel-entity-name="FinAccount">
<key-map field-name="finAccountId"/>
</relation>
</entity>
<entity entity-name="FinAccountRole" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Role Entity">
<field name="finAccountId" type="id-ne"></field>
<field name="partyId" type="id-ne"></field>
<field name="roleTypeId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<prim-key field="finAccountId"/>
<prim-key field="partyId"/>
<prim-key field="roleTypeId"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="FIN_ACT_RL_FNACT" rel-entity-name="FinAccount">
<key-map field-name="finAccountId"/>
</relation>
<relation type="one-nofk" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one-nofk" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_RL_RTRL" rel-entity-name="PartyRole">
<key-map field-name="partyId"/>
<key-map field-name="roleTypeId"/>
</relation>
</entity>
<entity entity-name="FinAccountStatus" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Status Entity">
<field name="finAccountId" type="id-ne"></field>
<field name="statusId" type="id"></field>
<field name="statusDate" type="date-time"></field>
<field name="statusEndDate" type="date-time"></field>
<prim-key field="finAccountId"/>
<prim-key field="statusId"/>
<prim-key field="statusDate"/>
<relation type="one" fk-name="FINACT_STTS_FNA" rel-entity-name="FinAccount">
<key-map field-name="finAccountId"/>
</relation>
<relation type="one" fk-name="FINACT_STTS_STI" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
</entity>
<entity entity-name="FinAccountTrans" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Transaction Entity">
<field name="finAccountTransId" type="id-ne"></field>
<field name="finAccountTransTypeId" type="id-ne"></field>
<field name="finAccountId" type="id"></field>
<field name="partyId" type="id"></field>
<field name="glReconciliationId" type="id"></field>
<field name="transactionDate" type="date-time"></field>
<field name="entryDate" type="date-time"></field>
<field name="amount" type="currency-amount"></field>
<field name="paymentId" type="id-ne"></field>
<field name="orderId" type="id"></field>
<field name="orderItemSeqId" type="id"><description>To be used along with orderId to point to an OrderItem that represents the purchase of a product to add money to the account.</description></field>
<field name="performedByPartyId" type="id"></field>
<field name="reasonEnumId" type="id"></field>
<field name="comments" type="comment"></field>
<field name="statusId" type="id"></field>
<prim-key field="finAccountTransId"/>
<relation type="one" fk-name="FINACCT_TX_TYPE" rel-entity-name="FinAccountTransType">
<key-map field-name="finAccountTransTypeId"/>
</relation>
<relation type="many" rel-entity-name="FinAccountTransTypeAttr">
<key-map field-name="finAccountTransTypeId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_TX_FNACT" rel-entity-name="FinAccount">
<key-map field-name="finAccountId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_TX_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_TX_PMT" rel-entity-name="Payment">
<key-map field-name="paymentId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_TX_ODITM" rel-entity-name="OrderItem">
<key-map field-name="orderId"/>
<key-map field-name="orderItemSeqId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_TX_PBPTY" title="PerformedBy" rel-entity-name="Party">
<key-map field-name="performedByPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_REAS_ENUM" title="Reason" rel-entity-name="Enumeration">
<key-map field-name="reasonEnumId" rel-field-name="enumId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_TX_STI" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
<relation type="one" fk-name="FIN_ACT_TX_GLREC" rel-entity-name="GlReconciliation">
<key-map field-name="glReconciliationId"/>
</relation>
</entity>
<entity entity-name="FinAccountTransAttribute" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Transaction Attribute Entity">
<field name="finAccountTransId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="finAccountTransId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="FINACCT_TX_ATTR" rel-entity-name="FinAccountTrans">
<key-map field-name="finAccountTransId"/>
</relation>
<relation type="many" rel-entity-name="FinAccountTransTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="FinAccountTransType"
package-name="org.ofbiz.accounting.finaccount"
default-resource-name="AccountingEntityLabels"
title="Financial Account Transaction Type Entity">
<field name="finAccountTransTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="finAccountTransTypeId"/>
<relation type="one" fk-name="FINACCT_TX_TYPPAR" title="Parent" rel-entity-name="FinAccountTransType">
<key-map field-name="parentTypeId" rel-field-name="finAccountTransTypeId"/>
</relation>
</entity>
<entity entity-name="FinAccountTransTypeAttr" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Transaction Type Attribute Entity">
<field name="finAccountTransTypeId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<prim-key field="finAccountTransTypeId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="FINACCT_TX_TYPATR" rel-entity-name="FinAccountTransType">
<key-map field-name="finAccountTransTypeId"/>
</relation>
<relation type="many" rel-entity-name="FinAccountTransAttribute">
<key-map field-name="attrName"/>
</relation>
<relation type="many" rel-entity-name="FinAccountTrans">
<key-map field-name="finAccountTransTypeId"/>
</relation>
</entity>
<entity entity-name="FinAccountType"
package-name="org.ofbiz.accounting.finaccount"
default-resource-name="AccountingEntityLabels"
title="Financial Account Type Entity">
<field name="finAccountTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="replenishEnumId" type="id-ne"></field>
<field name="isRefundable" type="indicator"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="finAccountTypeId"/>
<relation type="one" fk-name="FINACCT_TYPE_PAR" title="Parent" rel-entity-name="FinAccountType">
<key-map field-name="parentTypeId" rel-field-name="finAccountTypeId"/>
</relation>
<relation type="one" fk-name="FINACCT_TYPE_RENUM" title="Replenish" rel-entity-name="Enumeration">
<key-map field-name="replenishEnumId" rel-field-name="enumId"/>
</relation>
</entity>
<entity entity-name="FinAccountTypeAttr" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Type Attribute Entity">
<field name="finAccountTypeId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="long-varchar"></field>
<prim-key field="finAccountTypeId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="FINACCT_TYPE_ATTR" rel-entity-name="FinAccountType">
<key-map field-name="finAccountTypeId"/>
</relation>
<relation type="many" rel-entity-name="FinAccountAttribute">
<key-map field-name="attrName"/>
</relation>
<relation type="many" rel-entity-name="FinAccount">
<key-map field-name="finAccountTypeId"/>
</relation>
</entity>
<entity entity-name="FinAccountTypeGlAccount" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Type GL Account Entity">
<field name="finAccountTypeId" type="id-ne"></field>
<field name="organizationPartyId" type="id-ne"></field>
<field name="glAccountId" type="id"></field>
<prim-key field="finAccountTypeId"/>
<prim-key field="organizationPartyId"/>
<relation type="one" fk-name="FINACCT_TGA_PMT" rel-entity-name="FinAccountType">
<key-map field-name="finAccountTypeId"/>
</relation>
<relation type="one" fk-name="FINACCT_TGA_OPTY" title="Organization" rel-entity-name="Party">
<key-map field-name="organizationPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="FINACCT_TGA_GLAC" rel-entity-name="GlAccount">
<key-map field-name="glAccountId"/>
</relation>
</entity>
<view-entity entity-name="FinAccountTransSum" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Transactio Sum">
<description>View entity to help calculate total of financial account transactions by doing a query for the sum of all amounts
on a range of transactionDates for a given finAccountId, finAccountTransTypeId</description>
<member-entity entity-alias="FAT" entity-name="FinAccountTrans"/>
<alias entity-alias="FAT" name="finAccountId" group-by="true"/>
<alias entity-alias="FAT" name="finAccountTransTypeId" group-by="false"/> <!-- must not group-by this, or aggregating DEPOSIT and ADJUSTMENT won't work -->
<alias entity-alias="FAT" name="transactionDate" group-by="false"/>
<alias entity-alias="FAT" name="amount" function="sum"/>
</view-entity>
<view-entity entity-name="FinAccountAuthSum" package-name="org.ofbiz.accounting.finaccount" title="Financial Account Authorization Sum">
<description>View entity to help calculate total of financial account authorizations by doing a query for the sum of all amounts
on a range of transactionDates for a given finAccountId. Note there is no auth type to consider here, but authorizations do
have from and thru dates</description>
<member-entity entity-alias="FAA" entity-name="FinAccountAuth"/>
<alias entity-alias="FAA" name="finAccountId" group-by="true"/>
<alias entity-alias="FAA" name="authorizationDate" group-by="false"/>
<alias entity-alias="FAA" name="fromDate" group-by="false"/>
<alias entity-alias="FAA" name="thruDate" group-by="false"/>
<alias entity-alias="FAA" name="amount" function="sum"/>
</view-entity>
<!-- ========================================================= -->
<!-- org.ofbiz.accounting.fixedasset -->
<!-- ========================================================= -->
<entity entity-name="FixedAsset" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="fixedAssetTypeId" type="id"></field>
<field name="parentFixedAssetId" type="id"></field>
<field name="instanceOfProductId" type="id"></field>
<field name="classEnumId" type="id"></field>
<field name="partyId" type="id"></field>
<field name="roleTypeId" type="id"></field>
<field name="fixedAssetName" type="name"></field>
<field name="acquireOrderId" type="id"></field>
<field name="acquireOrderItemSeqId" type="id"></field>
<field name="dateAcquired" type="date-time"></field>
<field name="dateLastServiced" type="date-time"></field>
<field name="dateNextService" type="date-time"></field>
<field name="expectedEndOfLife" type="date"></field>
<field name="actualEndOfLife" type="date"></field>
<field name="productionCapacity" type="fixed-point"></field>
<field name="uomId" type="id"></field>
<field name="calendarId" type="id-ne"></field>
<field name="serialNumber" type="long-varchar"></field>
<field name="locatedAtFacilityId" type="id"></field>
<field name="locatedAtLocationSeqId" type="id"></field>
<field name="salvageValue" type="currency-amount"/>
<field name="depreciation" type="currency-amount"/>
<field name="purchaseCost" type="currency-amount"/>
<field name="purchaseCostUomId" type="id"/>
<prim-key field="fixedAssetId"/>
<relation type="one" fk-name="FIXEDAST_TYPE" rel-entity-name="FixedAssetType">
<key-map field-name="fixedAssetTypeId"/>
</relation>
<relation type="many" rel-entity-name="FixedAssetTypeAttr">
<key-map field-name="fixedAssetTypeId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_PAR" title="Parent" rel-entity-name="FixedAsset">
<key-map field-name="parentFixedAssetId" rel-field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_IOPROD" title="InstanceOf" rel-entity-name="Product">
<key-map field-name="instanceOfProductId" rel-field-name="productId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_CLSENM" title="Class" rel-entity-name="Enumeration">
<key-map field-name="classEnumId" rel-field-name="enumId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_ROLETYP" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one-nofk" rel-entity-name="PartyRole">
<key-map field-name="partyId"/>
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_ORDHDR" title="Acquire" rel-entity-name="OrderHeader">
<key-map field-name="acquireOrderId" rel-field-name="orderId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_ORDITM" title="Acquire" rel-entity-name="OrderItem">
<key-map field-name="acquireOrderId" rel-field-name="orderId"/>
<key-map field-name="acquireOrderItemSeqId" rel-field-name="orderItemSeqId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_UOM" rel-entity-name="Uom">
<key-map field-name="uomId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_CALENDAR" rel-entity-name="TechDataCalendar">
<key-map field-name="calendarId"/>
</relation>
<relation type="one" fk-name="FIXEDAST_FAC" title="LocatedAt" rel-entity-name="Facility">
<key-map field-name="locatedAtFacilityId" rel-field-name="facilityId"/>
</relation>
<relation type="one-nofk" title="LocatedAt" rel-entity-name="FacilityLocation">
<key-map field-name="locatedAtFacilityId" rel-field-name="facilityId"/>
<key-map field-name="locatedAtLocationSeqId" rel-field-name="locationSeqId"/>
</relation>
</entity>
<entity entity-name="FixedAssetAttribute"
package-name="org.ofbiz.accounting.fixedasset"
title="Fixed Asset Attribute Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="FIXEDAST_ATTR" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="many" rel-entity-name="FixedAssetTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="FixedAssetDepMethod"
package-name="org.ofbiz.accounting.fixedasset"
title="Fixed Asset Depreciation Method Entity">
<field name="depreciationCustomMethodId" type="id-ne"></field>
<field name="fixedAssetId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<prim-key field="depreciationCustomMethodId"/>
<prim-key field="fixedAssetId"/>
<relation type="one" fk-name="FIXDAST_DM_CMET" rel-entity-name="CustomMethod">
<key-map field-name="depreciationCustomMethodId" rel-field-name="customMethodId"/>
</relation>
<relation type="one" fk-name="FIXDAST_DM_FXAST" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
</entity>
<entity entity-name="FixedAssetGeoPoint" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset Geo Location with history">
<field name="fixedAssetId" type="id-ne"></field>
<field name="geoPointId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="geoPointId"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="FXDASTGEOPT_FXDAST" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FXDASTGEOPT_GEOPT" rel-entity-name="GeoPoint">
<key-map field-name="geoPointId"/>
</relation>
</entity>
<view-entity entity-name="FixedAssetAndGeoPoint" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset and Geo Point View Entity">
<member-entity entity-alias="FA" entity-name="FixedAsset"/>
<member-entity entity-alias="FAGPT" entity-name="FixedAssetGeoPoint"/>
<member-entity entity-alias="GPT" entity-name="GeoPoint"/>
<alias-all entity-alias="GPT"/>
<alias entity-alias="FA" name="fixedAssetId"/>
<alias entity-alias="FAGPT" name="fromDate"/>
<alias entity-alias="FAGPT" name="thruDate"/>
<view-link entity-alias="FA" rel-entity-alias="FAGPT">
<key-map field-name="fixedAssetId"/>
</view-link>
<view-link entity-alias="FAGPT" rel-entity-alias="GPT">
<key-map field-name="geoPointId"/>
</view-link>
<relation type="many" rel-entity-name="FixedAssetGeoPoint">
<key-map field-name="fixedAssetId"/>
<key-map field-name="geoPointId"/>
</relation>
<relation type="one-nofk" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one-nofk" rel-entity-name="GeoPoint">
<key-map field-name="geoPointId"/>
</relation>
</view-entity>
<entity entity-name="FixedAssetIdent"
package-name="org.ofbiz.accounting.fixedasset"
title="Fixed Asset Identification Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="fixedAssetIdentTypeId" type="id-ne"></field>
<field name="idValue" type="long-varchar"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="fixedAssetIdentTypeId"/>
<relation type="one" fk-name="FIXDASTID_FXAST" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FIXDASTID_IDTYP" rel-entity-name="FixedAssetIdentType">
<key-map field-name="fixedAssetIdentTypeId"/>
</relation>
</entity>
<entity entity-name="FixedAssetIdentType"
package-name="org.ofbiz.accounting.fixedasset"
default-resource-name="AccountingEntityLabels"
title="Fixed Asset Identification Type Entity">
<field name="fixedAssetIdentTypeId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="fixedAssetIdentTypeId"/>
</entity>
<entity entity-name="FixedAssetMaint"
package-name="org.ofbiz.accounting.fixedasset"
title="Fixed Asset Maintenance Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="maintHistSeqId" type="id-ne"></field>
<field name="statusId" type="id"></field>
<field name="productMaintTypeId" type="id-ne"><description>If productMaintSeqId is known can lookup using that and the FixedAsset.productId; for un-scheduled maintenance is filled in directly</description></field>
<field name="productMaintSeqId" type="id"><description>Optional, though should be filled in to determine upcoming maintenance for all scheduled maintenance</description></field>
<field name="scheduleWorkEffortId" type="id"><description>Has field for estimated/actual start and finish dates, etc</description></field>
<field name="intervalQuantity" type="fixed-point"></field>
<field name="intervalUomId" type="id"><description>UOM for intervalQuantity; if used intervalMeterTypeId is generally not used (ie one or the other); if a meter reading is done as well that is not tied to the interval it should be tracked in a FixedAssetMaintMeter record</description></field>
<field name="intervalMeterTypeId" type="id"><description>Meter Type for intervalQuantity; if used intervalUomId is generally not used (ie one or the other)</description></field>
<field name="purchaseOrderId" type="id"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="maintHistSeqId"/>
<relation type="one" fk-name="FXDASTMNT_FXAST" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FXDASTMNT_PMNTP" rel-entity-name="ProductMaintType">
<key-map field-name="productMaintTypeId"/>
</relation>
<relation type="one" fk-name="FXDASTMNT_SCHWE" title="Schedule" rel-entity-name="WorkEffort">
<key-map field-name="scheduleWorkEffortId" rel-field-name="workEffortId"/>
</relation>
<relation type="one" fk-name="FXDASTMNT_INTUOM" title="Interval" rel-entity-name="Uom">
<key-map field-name="intervalUomId" rel-field-name="uomId"/>
</relation>
<relation type="one" fk-name="FXDASTMNT_PDMTTYP" title="Interval" rel-entity-name="ProductMeterType">
<key-map field-name="intervalMeterTypeId" rel-field-name="productMeterTypeId"/>
</relation>
<relation type="one" fk-name="FXDASTMNT_PURORD" title="Purchase" rel-entity-name="OrderHeader">
<key-map field-name="purchaseOrderId" rel-field-name="orderId"/>
</relation>
<relation type="one" fk-name="FXDASTMNT_SI" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
</entity>
<entity entity-name="FixedAssetMaintMeter"
package-name="org.ofbiz.accounting.fixedasset"
title="Deprecated - use FixedAssetMeter">
<field name="fixedAssetId" type="id-ne"></field>
<field name="maintHistSeqId" type="id-ne"></field>
<field name="productMeterTypeId" type="id-ne"></field>
<field name="meterValue" type="fixed-point"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="maintHistSeqId"/>
<prim-key field="productMeterTypeId"/>
<relation type="one" fk-name="FXDASTMNMT_FAMNT" rel-entity-name="FixedAssetMaint">
<key-map field-name="fixedAssetId"/>
<key-map field-name="maintHistSeqId"/>
</relation>
<relation type="one" fk-name="FXDASTMNMT_PMTYP" rel-entity-name="ProductMeterType">
<key-map field-name="productMeterTypeId"/>
</relation>
</entity>
<entity entity-name="FixedAssetMeter"
package-name="org.ofbiz.accounting.fixedasset"
title="Fixed Asset Meter Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="productMeterTypeId" type="id-ne"></field>
<field name="readingDate" type="date-time"></field>
<field name="meterValue" type="fixed-point"></field>
<field name="readingReasonEnumId" type="id"></field>
<field name="maintHistSeqId" type="id"></field>
<field name="workEffortId" type="id"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="productMeterTypeId"/>
<prim-key field="readingDate"/>
<relation type="one" fk-name="FXDASTMTR_FAMNT" rel-entity-name="FixedAssetMaint">
<key-map field-name="fixedAssetId"/>
<key-map field-name="maintHistSeqId"/>
</relation>
<relation type="one" fk-name="FXDASTMTR_PMTYP" rel-entity-name="ProductMeterType">
<key-map field-name="productMeterTypeId"/>
</relation>
</entity>
<entity entity-name="FixedAssetProduct"
package-name="org.ofbiz.accounting.fixedasset"
title="Fixed Asset Product Representation Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="productId" type="id-ne"></field>
<field name="fixedAssetProductTypeId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<field name="comments" type="comment"></field>
<field name="sequenceNum" type="numeric"></field>
<field name="quantity" type="fixed-point"></field>
<field name="quantityUomId" type="id"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="productId"/>
<prim-key field="fixedAssetProductTypeId"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="FIXDASTPRD_PRD" rel-entity-name="Product">
<key-map field-name="productId"/>
</relation>
<relation type="one" fk-name="FIXDASTPRD_FA" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FIXDASTPRD_FAPT" rel-entity-name="FixedAssetProductType">
<key-map field-name="fixedAssetProductTypeId"/>
</relation>
<relation type="one" fk-name="FIXDASTPRD_UOM" rel-entity-name="Uom">
<key-map field-name="quantityUomId" rel-field-name="uomId"/>
</relation>
</entity>
<entity entity-name="FixedAssetProductType"
package-name="org.ofbiz.accounting.fixedasset"
default-resource-name="AccountingEntityLabels"
title="Fixed Asset Product Type Entity">
<field name="fixedAssetProductTypeId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="fixedAssetProductTypeId"/>
</entity>
<entity entity-name="FixedAssetTypeGlAccount"
package-name="org.ofbiz.accounting.fixedasset"
title="Gl Account Mapping For Fixed Asset Or Fixed Asset Types">
<field name="fixedAssetTypeId" type="id-ne"><description>The fixed asset type for the mappings. This field can be set to _NA_ in order to define a mapping for all types or for a specific asset (specified by the id in the fixedAssetId field).</description></field>
<field name="fixedAssetId" type="id-ne"><description>The fixed asset id for the mappings. This field can be set to _NA_ in order to define a mapping for all assets of a given type (specified by the id in the fixedAssetTypeId field).</description></field>
<field name="organizationPartyId" type="id-ne"></field>
<field name="assetGlAccountId" type="id"><description>The (debit) account for the initial asset value (purchase cost)</description></field>
<field name="accDepGlAccountId" type="id"><description>The (credit) account for the accumulated depreciation</description></field>
<field name="depGlAccountId" type="id"><description>The (debit) account for the depreciation expense (matches the accDepGlAccountId)</description></field>
<field name="profitGlAccountId" type="id"><description>The (credit) account for the eventual profit derived from the sale of the asset</description></field>
<field name="lossGlAccountId" type="id"><description>The (debit) account for the eventual loss derived from the sale of the asset</description></field>
<prim-key field="fixedAssetTypeId"/>
<prim-key field="fixedAssetId"/>
<prim-key field="organizationPartyId"/>
<relation type="one-nofk" rel-entity-name="FixedAssetType">
<key-map field-name="fixedAssetTypeId"/>
</relation>
<relation type="one-nofk" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FATGL_OP" rel-entity-name="Party">
<key-map field-name="organizationPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="FATGL_AGL" title="Asset" rel-entity-name="GlAccount">
<key-map field-name="assetGlAccountId" rel-field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="FATGL_ACCDGL" title="AccumulatedDepreciation" rel-entity-name="GlAccount">
<key-map field-name="accDepGlAccountId" rel-field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="FATGL_DGL" title="Depreciation" rel-entity-name="GlAccount">
<key-map field-name="depGlAccountId" rel-field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="FATGL_PGL" title="Profit" rel-entity-name="GlAccount">
<key-map field-name="profitGlAccountId" rel-field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="FATGL_LGL" title="Loss" rel-entity-name="GlAccount">
<key-map field-name="lossGlAccountId" rel-field-name="glAccountId"/>
</relation>
</entity>
<entity entity-name="FixedAssetRegistration" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset Registration Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<field name="registrationDate" type="date-time"></field>
<field name="govAgencyPartyId" type="id-ne"></field>
<field name="registrationNumber" type="long-varchar"></field>
<field name="licenseNumber" type="long-varchar"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="FIXDASTREG_FXAST" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FIXDASTREG_GVAPTY" title="GovAgency" rel-entity-name="Party">
<key-map field-name="govAgencyPartyId" rel-field-name="partyId"/>
</relation>
</entity>
<entity entity-name="FixedAssetStdCost" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset Standard Cost Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="fixedAssetStdCostTypeId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<field name="amountUomId" type="id"></field>
<field name="amount" type="currency-amount"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="fixedAssetStdCostTypeId"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="FIXASTCO_FIXAST" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FIXASTCO_TYPCOS" rel-entity-name="FixedAssetStdCostType">
<key-map field-name="fixedAssetStdCostTypeId"/>
</relation>
<relation type="one" fk-name="FIXASTCO_AMCURR" rel-entity-name="Uom">
<key-map field-name="amountUomId" rel-field-name="uomId"/>
</relation>
</entity>
<entity entity-name="FixedAssetStdCostType"
package-name="org.ofbiz.accounting.fixedasset"
default-resource-name="AccountingEntityLabels"
title="Fixed Asset Standard Cost Type Entity">
<field name="fixedAssetStdCostTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="fixedAssetStdCostTypeId"/>
<relation type="one" fk-name="FIXASTCO_TYPPAR" title="Parent" rel-entity-name="FixedAssetStdCostType">
<key-map field-name="parentTypeId" rel-field-name="fixedAssetStdCostTypeId"/>
</relation>
</entity>
<entity entity-name="FixedAssetType"
package-name="org.ofbiz.accounting.fixedasset"
default-resource-name="AccountingEntityLabels"
title="Fixed Asset Type Entity">
<field name="fixedAssetTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="fixedAssetTypeId"/>
<relation type="one" fk-name="FIXEDAST_TYPPAR" title="Parent" rel-entity-name="FixedAssetType">
<key-map field-name="parentTypeId" rel-field-name="fixedAssetTypeId"/>
</relation>
</entity>
<entity entity-name="FixedAssetTypeAttr"
package-name="org.ofbiz.accounting.fixedasset"
title="Fixed Asset Type Attribute Entity">
<field name="fixedAssetTypeId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<prim-key field="fixedAssetTypeId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="FIXEDAST_TYPATTR" rel-entity-name="FixedAssetType">
<key-map field-name="fixedAssetTypeId"/>
</relation>
<relation type="many" rel-entity-name="FixedAssetAttribute">
<key-map field-name="attrName"/>
</relation>
<relation type="many" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetTypeId"/>
</relation>
</entity>
<entity entity-name="PartyFixedAssetAssignment"
package-name="org.ofbiz.accounting.fixedasset"
title="Party Fixed Asset Assignment Entity">
<field name="partyId" type="id-ne"></field>
<field name="roleTypeId" type="id-ne"></field>
<field name="fixedAssetId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<field name="allocatedDate" type="date-time"></field>
<field name="statusId" type="id-ne"></field>
<field name="comments" type="comment"></field>
<prim-key field="partyId"/>
<prim-key field="roleTypeId"/>
<prim-key field="fixedAssetId"/>
<prim-key field="fromDate"/>
<relation type="one-nofk" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one-nofk" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="PTY_FASTAS_PTRL" rel-entity-name="PartyRole">
<key-map field-name="partyId"/>
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="PTY_FASTAS_FA" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="PTY_FASTAS_SI" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
</entity>
<view-entity entity-name="PartyFixedAssetAssignAndRole" package-name="org.ofbiz.accounting.fixedasset"
title="PartyFixedAssetAssignment and RoleType View Entity">
<member-entity entity-alias="PFA" entity-name="PartyFixedAssetAssignment"/>
<member-entity entity-alias="RT" entity-name="RoleType"/>
<alias-all entity-alias="PFA"/>
<alias-all entity-alias="RT"/>
<view-link entity-alias="PFA" rel-entity-alias="RT">
<key-map field-name="roleTypeId"/>
</view-link>
</view-entity>
<entity entity-name="FixedAssetMaintOrder" package-name="org.ofbiz.accounting.fixedasset" title="Fixed Asset Maintance And Order Entity">
<field name="fixedAssetId" type="id-ne"></field>
<field name="maintHistSeqId" type="id-ne"></field>
<field name="orderId" type="id"></field>
<field name="orderItemSeqId" type="id"></field>
<prim-key field="fixedAssetId"/>
<prim-key field="maintHistSeqId"/>
<prim-key field="orderId"/>
<prim-key field="orderItemSeqId"/>
<relation type="one" fk-name="FXDASTMNT_ORD_FXAS" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="FXDASTMNT_ORD" rel-entity-name="OrderHeader">
<key-map field-name="orderId"/>
</relation>
<relation type="one-nofk" rel-entity-name="OrderItem">
<key-map field-name="orderId"/>
<key-map field-name="orderItemSeqId"/>
</relation>
</entity>
<entity entity-name="AccommodationClass"
package-name="org.ofbiz.accounting.fixedasset"
title="Accommodation Class">
<field name="accommodationClassId" type="id-ne"></field>
<field name="parentClassId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="accommodationClassId"/>
<relation type="one" fk-name="ACCOMM_CLASS_PAR" title="Parent" rel-entity-name="AccommodationClass">
<key-map field-name="parentClassId" rel-field-name="accommodationClassId"/>
</relation>
</entity>
<entity entity-name="AccommodationSpot"
package-name="org.ofbiz.order.reservations"
title="Accommodation Spot">
<field name="accommodationSpotId" type="id-ne"></field>
<field name="accommodationClassId" type="id"></field>
<field name="fixedAssetId" type="id"></field>
<field name="numberOfSpaces" type="numeric"></field>
<field name="description" type="description"></field>
<prim-key field="accommodationSpotId"/>
<relation type="one" fk-name="ACCOM_CLASS" rel-entity-name="AccommodationClass">
<key-map field-name="accommodationClassId"/>
</relation>
<relation type="one" fk-name="SPOT_FA" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
</entity>
<entity entity-name="AccommodationMap"
package-name="org.ofbiz.accounting.fixedasset"
title="Accommodation Map">
<field name="accommodationMapId" type="id-ne"></field>
<field name="accommodationClassId" type="id-ne"></field>
<field name="fixedAssetId" type="id"></field>
<field name="accommodationMapTypeId" type="id"></field>
<field name="numberOfSpaces" type="numeric"></field>
<prim-key field="accommodationMapId"/>
<relation type="one" fk-name="ACMD_MAP_CLASS" rel-entity-name="AccommodationClass">
<key-map field-name="accommodationClassId"/>
</relation>
<relation type="one" fk-name="ACMD_MAP_FA" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="ACMD_MAP_TYPE" rel-entity-name="AccommodationMapType">
<key-map field-name="accommodationMapTypeId"/>
</relation>
</entity>
<entity entity-name="AccommodationMapType"
package-name="org.ofbiz.accounting.fixedasset"
title="Accommodation Map Type">
<field name="accommodationMapTypeId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="accommodationMapTypeId"/>
</entity>
<!-- ========================================================= -->
<!-- org.ofbiz.accounting.invoice -->
<!-- ========================================================= -->
<entity entity-name="Invoice"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Entity">
<field name="invoiceId" type="id-ne"></field>
<field name="invoiceTypeId" type="id"></field>
<field name="partyIdFrom" type="id"></field>
<field name="partyId" type="id"></field>
<field name="roleTypeId" type="id"></field>
<field name="statusId" type="id"></field>
<field name="billingAccountId" type="id"></field>
<field name="contactMechId" type="id"></field>
<field name="invoiceDate" type="date-time"></field>
<field name="dueDate" type="date-time"></field>
<field name="paidDate" type="date-time"></field>
<field name="invoiceMessage" type="long-varchar"></field>
<field name="referenceNumber" type="short-varchar"></field> <!-- used to record things like the vendor's invoice number -->
<field name="description" type="description"></field>
<field name="currencyUomId" type="id"></field>
<field name="recurrenceInfoId" type="id"></field>
<prim-key field="invoiceId"/>
<relation type="one" fk-name="INVOICE_INVTYP" rel-entity-name="InvoiceType">
<key-map field-name="invoiceTypeId"/>
</relation>
<relation type="many" rel-entity-name="InvoiceTypeAttr">
<key-map field-name="invoiceTypeId"/>
</relation>
<relation type="one" fk-name="INVOICE_PARTY_FRM" title="From" rel-entity-name="Party">
<key-map field-name="partyIdFrom" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="INVOICE_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one" fk-name="INVOICE_ROLETYP" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one-nofk" rel-entity-name="PartyRole">
<key-map field-name="partyId"/>
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="INVOICE_STTSITM" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
<relation type="one" fk-name="INVOICE_BILLACCT" rel-entity-name="BillingAccount">
<key-map field-name="billingAccountId"/>
</relation>
<relation type="one" fk-name="INVOICE_CMECH" rel-entity-name="ContactMech">
<key-map field-name="contactMechId"/>
</relation>
<relation type="one" fk-name="INVOICE_CUOM" title="Currency" rel-entity-name="Uom">
<key-map field-name="currencyUomId" rel-field-name="uomId"/>
</relation>
<relation type="one" fk-name="INVOICE_RECINFO" rel-entity-name="RecurrenceInfo">
<key-map field-name="recurrenceInfoId"/>
</relation>
</entity>
<entity entity-name="InvoiceAttribute"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Attribute Entity">
<field name="invoiceId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="invoiceId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="INVOICE_ATTR" rel-entity-name="Invoice">
<key-map field-name="invoiceId"/>
</relation>
<relation type="many" rel-entity-name="InvoiceTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="InvoiceContactMech"
package-name="org.ofbiz.accounting.invoice"
never-cache="true"
title="Invoice Contact Mechanism Entity">
<field name="invoiceId" type="id-ne"></field>
<field name="contactMechPurposeTypeId" type="id-ne"></field>
<field name="contactMechId" type="id-ne"></field>
<prim-key field="invoiceId"/>
<prim-key field="contactMechPurposeTypeId"/>
<prim-key field="contactMechId"/>
<relation type="one" fk-name="INVOICE_CMECH_HDR" rel-entity-name="Invoice">
<key-map field-name="invoiceId"/>
</relation>
<relation type="one" fk-name="INVOICE_CMECH_CM" rel-entity-name="ContactMech">
<key-map field-name="contactMechId"/>
</relation>
<relation type="one" fk-name="INVOICE_CMECH_CMPT" rel-entity-name="ContactMechPurposeType">
<key-map field-name="contactMechPurposeTypeId"/>
</relation>
</entity>
<entity entity-name="InvoiceItem"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Item Entity">
<field name="invoiceId" type="id-ne"></field>
<field name="invoiceItemSeqId" type="id-ne"></field>
<field name="invoiceItemTypeId" type="id"></field>
<field name="overrideGlAccountId" type="id"><description>used to specify the override or actual glAccountId used for the invoice, avoids problems if configuration changes after initial posting, etc </description></field>
<field name="overrideOrgPartyId" type="id"><description>Used to specify the organization override rather than using the payToPartyId</description></field>
<field name="inventoryItemId" type="id"></field>
<field name="productId" type="id"></field>
<field name="productFeatureId" type="id"></field>
<field name="parentInvoiceId" type="id"></field>
<field name="parentInvoiceItemSeqId" type="id"></field>
<field name="uomId" type="id"></field>
<field name="taxableFlag" type="indicator"></field>
<field name="quantity" type="fixed-point"></field>
<field name="amount" type="currency-precise"></field>
<field name="description" type="description"></field>
<field name="taxAuthPartyId" type="id-ne"/>
<field name="taxAuthGeoId" type="id-ne"/>
<field name="taxAuthorityRateSeqId" type="id-ne"></field>
<field name="salesOpportunityId" type="id-ne"></field>
<prim-key field="invoiceId"/>
<prim-key field="invoiceItemSeqId"/>
<relation type="one" fk-name="INVOICE_ITMITYP" rel-entity-name="InvoiceItemType">
<key-map field-name="invoiceItemTypeId"/>
</relation>
<relation type="many" rel-entity-name="InvoiceItemTypeAttr">
<key-map field-name="invoiceItemTypeId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_INVCE" rel-entity-name="Invoice">
<key-map field-name="invoiceId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_INVITM" rel-entity-name="InventoryItem">
<key-map field-name="inventoryItemId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_PROD" rel-entity-name="Product">
<key-map field-name="productId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_PRDFT" rel-entity-name="ProductFeature">
<key-map field-name="productFeatureId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_PINVIT" rel-entity-name="InvoiceItem">
<key-map field-name="parentInvoiceId" rel-field-name="invoiceId"/>
<key-map field-name="parentInvoiceItemSeqId" rel-field-name="invoiceItemSeqId"/>
</relation>
<relation type="many" fk-name="INVCE_ITM_CINVIT" title="Children" rel-entity-name="InvoiceItem">
<key-map field-name="invoiceId" rel-field-name="parentInvoiceId"/>
<key-map field-name="invoiceItemSeqId" rel-field-name="parentInvoiceItemSeqId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_UOM" rel-entity-name="Uom">
<key-map field-name="uomId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_ORGLA" title="Override" rel-entity-name="GlAccount">
<key-map field-name="overrideGlAccountId" rel-field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_TAXPTY" title="TaxAuthority" rel-entity-name="Party">
<key-map field-name="taxAuthPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_TAXGEO" title="Tax" rel-entity-name="Geo">
<key-map field-name="taxAuthGeoId" rel-field-name="geoId"/>
</relation>
<relation type="one" fk-name="INVOICE_ITM_TARP" rel-entity-name="TaxAuthorityRateProduct">
<key-map field-name="taxAuthorityRateSeqId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_OVRPTY" title="OverrideOrg" rel-entity-name="Party">
<key-map field-name="overrideOrgPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="INVCE_ITM_SLSOPP" rel-entity-name="SalesOpportunity" >
<key-map field-name="salesOpportunityId"/>
</relation>
</entity>
<entity entity-name="InvoiceItemAssoc"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Item Association Entity">
<field name="invoiceIdFrom" type="id-ne"></field>
<field name="invoiceItemSeqIdFrom" type="id-ne"></field>
<field name="invoiceIdTo" type="id-ne"></field>
<field name="invoiceItemSeqIdTo" type="id-ne"></field>
<field name="invoiceItemAssocTypeId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<field name="partyIdFrom" type="id"></field>
<field name="partyIdTo" type="id"></field>
<field name="quantity" type="fixed-point"></field>
<field name="amount" type="currency-amount"></field>
<prim-key field="invoiceIdFrom"/>
<prim-key field="invoiceItemSeqIdFrom"/>
<prim-key field="invoiceIdTo"/>
<prim-key field="invoiceItemSeqIdTo"/>
<prim-key field="invoiceItemAssocTypeId"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="INITMASCTYP_IIASC" rel-entity-name="InvoiceItemAssocType">
<key-map field-name="invoiceItemAssocTypeId"/>
</relation>
<relation type="one" fk-name="INITMASC_FIITM" title="From" rel-entity-name="InvoiceItem">
<key-map field-name="invoiceIdFrom" rel-field-name="invoiceId"/>
<key-map field-name="invoiceItemSeqIdFrom" rel-field-name="invoiceItemSeqId"/>
</relation>
<relation type="one" fk-name="INITMASC_TIITM" title="To" rel-entity-name="InvoiceItem">
<key-map field-name="invoiceIdTo" rel-field-name="invoiceId"/>
<key-map field-name="invoiceItemSeqIdTo" rel-field-name="invoiceItemSeqId"/>
</relation>
<relation type="one-nofk" title="From" rel-entity-name="Party">
<key-map field-name="partyIdFrom" rel-field-name="partyId"/>
</relation>
<relation type="one-nofk" title="To" rel-entity-name="Party">
<key-map field-name="partyIdTo" rel-field-name="partyId"/>
</relation>
</entity>
<entity entity-name="InvoiceItemAssocType"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Item Assoc Type Entity">
<field name="invoiceItemAssocTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="invoiceItemAssocTypeId"/>
<relation type="one" fk-name="INITMASCTYP_PRNT" title="Parent" rel-entity-name="InvoiceItemAssocType">
<key-map field-name="parentTypeId" rel-field-name="invoiceItemAssocTypeId"/>
</relation>
</entity>
<entity entity-name="InvoiceItemAttribute"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Item Attribute Entity">
<field name="invoiceId" type="id-ne"></field>
<field name="invoiceItemSeqId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="invoiceId"/>
<prim-key field="invoiceItemSeqId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="INVOICE_IMAT_ITM" rel-entity-name="InvoiceItem">
<key-map field-name="invoiceId"/>
<key-map field-name="invoiceItemSeqId"/>
</relation>
<relation type="many" rel-entity-name="InvoiceItemTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="InvoiceItemType"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Item Type Entity" default-resource-name="AccountingEntityLabels">
<field name="invoiceItemTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<field name="defaultGlAccountId" type="id"></field>
<prim-key field="invoiceItemTypeId"/>
<relation type="one" fk-name="INVOICE_ITEM_TPAR" title="Parent" rel-entity-name="InvoiceItemType">
<key-map field-name="parentTypeId" rel-field-name="invoiceItemTypeId"/>
</relation>
<relation type="one" fk-name="INVOICE_ITM_DGLAC" title="Default" rel-entity-name="GlAccount">
<key-map field-name="defaultGlAccountId" rel-field-name="glAccountId"/>
</relation>
</entity>
<entity entity-name="InvoiceItemTypeAttr"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Item Type Attribute Entity">
<field name="invoiceItemTypeId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<prim-key field="invoiceItemTypeId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="INVOICE_ITEM_TATR" rel-entity-name="InvoiceItemType">
<key-map field-name="invoiceItemTypeId"/>
</relation>
<relation type="many" rel-entity-name="InvoiceItemAttribute">
<key-map field-name="attrName"/>
</relation>
<relation type="many" rel-entity-name="InvoiceItem">
<key-map field-name="invoiceItemTypeId"/>
</relation>
</entity>
<entity entity-name="InvoiceItemTypeGlAccount"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Item Type GL Account Entity">
<field name="invoiceItemTypeId" type="id-ne"></field>
<field name="organizationPartyId" type="id-ne"></field>
<field name="glAccountId" type="id"></field>
<prim-key field="invoiceItemTypeId"/>
<prim-key field="organizationPartyId"/>
<relation type="one" fk-name="INVOICE_ITGA_IIT" rel-entity-name="InvoiceItemType">
<key-map field-name="invoiceItemTypeId"/>
</relation>
<relation type="one" fk-name="INVOICE_ITGA_OPTY" title="Organization" rel-entity-name="Party">
<key-map field-name="organizationPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="INVOICE_ITGA_GLAC" rel-entity-name="GlAccount">
<key-map field-name="glAccountId"/>
</relation>
</entity>
<entity entity-name="InvoiceItemTypeMap"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Item Type Map Entity">
<field name="invoiceItemMapKey" type="id-ne"></field>
<field name="invoiceTypeId" type="id-ne"></field>
<field name="invoiceItemTypeId" type="id-ne"></field>
<prim-key field="invoiceItemMapKey"/>
<prim-key field="invoiceTypeId"/>
<relation type="one" fk-name="INVOICE_ITEM_MAP" rel-entity-name="InvoiceItemType">
<key-map field-name="invoiceItemTypeId"/>
</relation>
<relation type="one" fk-name="INVITMMAP_INVTYP" rel-entity-name="InvoiceType">
<key-map field-name="invoiceTypeId"/>
</relation>
<relation type="many" rel-entity-name="InvoiceItem">
<key-map field-name="invoiceItemTypeId"/>
</relation>
</entity>
<entity entity-name="InvoiceRole"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Role Entity">
<field name="invoiceId" type="id-ne"></field>
<field name="partyId" type="id-ne"></field>
<field name="roleTypeId" type="id-ne"></field>
<field name="datetimePerformed" type="date-time"></field>
<field name="percentage" type="fixed-point"></field>
<prim-key field="invoiceId"/>
<prim-key field="partyId"/>
<prim-key field="roleTypeId"/>
<relation type="one" fk-name="INVCE_RLE_INVCE" rel-entity-name="Invoice">
<key-map field-name="invoiceId"/>
</relation>
<relation type="one" fk-name="INVCE_RLE_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one-nofk" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="INVCE_RLE_PTRL" rel-entity-name="PartyRole">
<key-map field-name="partyId"/>
<key-map field-name="roleTypeId"/>
</relation>
</entity>
<entity entity-name="InvoiceStatus"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Status Entity">
<field name="statusId" type="id-ne"></field>
<field name="invoiceId" type="id-ne"></field>
<field name="statusDate" type="date-time"></field>
<prim-key field="statusId"/>
<prim-key field="invoiceId"/>
<prim-key field="statusDate"/>
<relation type="one" fk-name="INVCE_STS_STSITM" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
<relation type="one" fk-name="INVCE_STS_INVCE" rel-entity-name="Invoice">
<key-map field-name="invoiceId"/>
</relation>
</entity>
<entity entity-name="InvoiceTerm"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Term Entity">
<field name="invoiceTermId" type="id-ne"></field>
<field name="termTypeId" type="id"></field>
<field name="invoiceId" type="id"></field>
<field name="invoiceItemSeqId" type="id"></field>
<field name="termValue" type="currency-amount"></field>
<field name="termDays" type="numeric"></field>
<field name="textValue" type="description"></field>
<field name="description" type="description"></field>
<field name="uomId" type="id"></field>
<prim-key field="invoiceTermId"/>
<relation type="one" fk-name="INVCE_TRM_TRM" rel-entity-name="TermType">
<key-map field-name="termTypeId"/>
</relation>
<relation type="one" fk-name="INVCE_TRM_INVCE" rel-entity-name="Invoice">
<key-map field-name="invoiceId"/>
</relation>
<relation type="one-nofk" rel-entity-name="InvoiceItem">
<key-map field-name="invoiceId"/>
<key-map field-name="invoiceItemSeqId"/>
</relation>
</entity>
<entity entity-name="InvoiceTermAttribute"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Term Attribute Entity">
<field name="invoiceTermId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="invoiceTermId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="INVOICE_TRM_ATTR" rel-entity-name="InvoiceTerm">
<key-map field-name="invoiceTermId"/>
</relation>
<relation type="many" rel-entity-name="TermTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="InvoiceType"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Type Entity" default-resource-name="AccountingEntityLabels">
<field name="invoiceTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="invoiceTypeId"/>
<relation type="one" fk-name="INVOICE_TYPE_PAR" title="Parent" rel-entity-name="InvoiceType">
<key-map field-name="parentTypeId" rel-field-name="invoiceTypeId"/>
</relation>
</entity>
<entity entity-name="InvoiceTypeAttr"
package-name="org.ofbiz.accounting.invoice"
title="Invoice Type Attribute Entity">
<field name="invoiceTypeId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<prim-key field="invoiceTypeId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="INVOICE_TPAT_TYP" rel-entity-name="InvoiceType">
<key-map field-name="invoiceTypeId"/>
</relation>
<relation type="many" rel-entity-name="InvoiceAttribute">
<key-map field-name="attrName"/>
</relation>
<relation type="many" rel-entity-name="Invoice">
<key-map field-name="invoiceTypeId"/>
</relation>
</entity>
<view-entity entity-name="InvoiceAndApplAndPayment" package-name="org.ofbiz.accounting.invoice" title="Invoice and related applications and payments">
<member-entity entity-alias="INV" entity-name="Invoice"/>
<member-entity entity-alias="PAP" entity-name="PaymentApplication"/>
<member-entity entity-alias="PAM" entity-name="Payment"/>
<alias-all entity-alias="INV"/>
<alias-all entity-alias="PAP">
<exclude field="billingAccountId"/>
</alias-all>
<alias-all entity-alias="PAM" prefix="pm"/>
<view-link entity-alias="INV" rel-entity-alias="PAP">
<key-map field-name="invoiceId"/>
</view-link>
<view-link entity-alias="PAP" rel-entity-alias="PAM">
<key-map field-name="paymentId"/>
</view-link>
</view-entity>
<view-entity entity-name="InvoiceAndType" package-name="org.ofbiz.accounting.invoice" title="Invoice and InvoiceType to be able to list invoices by invoiceParentType i.e. sales/purchase invoices">
<member-entity entity-alias="INV" entity-name="Invoice"/>
<member-entity entity-alias="IVT" entity-name="InvoiceType"/>
<alias-all entity-alias="INV"/>
<alias name="parentTypeId" entity-alias="IVT"></alias>
<alias name="invoiceTypeDesc" entity-alias="IVT" field="description"></alias>
<view-link entity-alias="INV" rel-entity-alias="IVT">
<key-map field-name="invoiceTypeId"/>
</view-link>
<relation type="many" rel-entity-name="InvoiceItem">
<key-map field-name="invoiceId"/>
</relation>
<relation type="one-nofk" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
<relation type="many" rel-entity-name="PaymentApplication">
<key-map field-name="invoiceId"/>
</relation>
<relation type="many" rel-entity-name="AcctgTrans">
<key-map field-name="invoiceId"/>
</relation>
</view-entity>
<view-entity entity-name="InvoiceAndRole" package-name="org.ofbiz.accounting.invoice">
<member-entity entity-alias="INV" entity-name="Invoice"/>
<member-entity entity-alias="INR" entity-name="InvoiceRole"/>
<alias-all entity-alias="INV"/>
<alias name="invoiceRolePartyId" entity-alias="INR" field="partyId"/>
<alias name="invoiceRoleTypeId" entity-alias="INR" field="roleTypeId"/>
<view-link entity-alias="INV" rel-entity-alias="INR" rel-optional="true">
<key-map field-name="invoiceId"/>
</view-link>
</view-entity>
<view-entity entity-name="InvoiceItemAndAssocProduct" package-name="org.ofbiz.accounting.invoice">
<member-entity entity-alias="INTM" entity-name="InvoiceItem"/>
<member-entity entity-alias="IIA" entity-name="InvoiceItemAssoc"/>
<member-entity entity-alias="PROD" entity-name="Product"/>
<alias-all entity-alias="IIA">
<exclude field="amount"/>
</alias-all>
<alias name="termAmount" field="amount" entity-alias="IIA"/>
<alias name="productId" entity-alias="PROD"/>
<alias name="productName" entity-alias="PROD"/>
<alias name="amount" entity-alias="INTM"/>
<view-link entity-alias="INTM" rel-entity-alias="IIA" rel-optional="false">
<key-map field-name="invoiceId" rel-field-name="invoiceIdFrom"/>
<key-map field-name="invoiceItemSeqId" rel-field-name="invoiceItemSeqIdFrom"/>
</view-link>
<view-link entity-alias="INTM" rel-entity-alias="PROD" rel-optional="false">
<key-map field-name="productId"/>
</view-link>
</view-entity>
<!-- ========================================================= -->
<!-- org.ofbiz.accounting.ledger -->
<!-- ========================================================= -->
<entity entity-name="AcctgTrans"
package-name="org.ofbiz.accounting.ledger"
title="Accounting Transaction Entity">
<field name="acctgTransId" type="id-ne"></field>
<field name="acctgTransTypeId" type="id"></field>
<field name="description" type="description"></field>
<field name="transactionDate" type="date-time"></field>
<field name="isPosted" type="indicator"></field>
<field name="postedDate" type="date-time"></field>
<field name="scheduledPostingDate" type="date-time"></field>
<field name="glJournalId" type="id"></field>
<field name="glFiscalTypeId" type="id"></field>
<field name="voucherRef" type="short-varchar"></field>
<field name="voucherDate" type="date-time"></field>
<field name="groupStatusId" type="id"></field>
<field name="fixedAssetId" type="id"></field>
<field name="inventoryItemId" type="id"></field>
<field name="physicalInventoryId" type="id"></field>
<field name="partyId" type="id"></field>
<field name="roleTypeId" type="id"></field>
<field name="invoiceId" type="id"></field>
<field name="paymentId" type="id"></field>
<field name="finAccountTransId" type="id"></field>
<field name="shipmentId" type="id"></field>
<field name="receiptId" type="id"></field>
<field name="workEffortId" type="id"></field>
<field name="theirAcctgTransId" type="id-long"></field>
<field name="createdByUserLogin" type="id-vlong"></field>
<field name="lastModifiedByUserLogin" type="id-vlong"></field>
<prim-key field="acctgTransId"/>
<relation type="one" fk-name="ACCTTX_TYPE" rel-entity-name="AcctgTransType">
<key-map field-name="acctgTransTypeId"/>
</relation>
<relation type="one" fk-name="ACCTTX_GLJRNL" rel-entity-name="GlJournal">
<key-map field-name="glJournalId"/>
</relation>
<relation type="one" fk-name="ACCTTX_GLFST" rel-entity-name="GlFiscalType">
<key-map field-name="glFiscalTypeId"/>
</relation>
<relation type="one" fk-name="ACCTTX_GRPSTTS" rel-entity-name="StatusItem">
<key-map field-name="groupStatusId" rel-field-name="statusId"/>
</relation>
<relation type="one" fk-name="ACCTTX_FASSET" rel-entity-name="FixedAsset">
<key-map field-name="fixedAssetId"/>
</relation>
<relation type="one" fk-name="ACCTTX_PHS_INV" rel-entity-name="PhysicalInventory">
<key-map field-name="physicalInventoryId"/>
</relation>
<relation type="one" fk-name="ACCTTX_INVITEM" rel-entity-name="InventoryItem">
<key-map field-name="inventoryItemId"/>
</relation>
<relation type="one" fk-name="ACCTTX_INVITEMVAR" rel-entity-name="InventoryItemVariance">
<key-map field-name="inventoryItemId"/>
<key-map field-name="physicalInventoryId"/>
</relation>
<relation type="one" fk-name="ACCTTX_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one" fk-name="ACCTTX_ROLETYP" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one-nofk" rel-entity-name="PartyRole">
<key-map field-name="partyId"/>
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="ACCTTX_INVOICE" rel-entity-name="Invoice">
<key-map field-name="invoiceId"/>
</relation>
<relation type="one" fk-name="ACCTTX_PAYMENT" rel-entity-name="Payment">
<key-map field-name="paymentId"/>
</relation>
<relation type="one" fk-name="ACCTTX_FNACTTR" rel-entity-name="FinAccountTrans">
<key-map field-name="finAccountTransId"/>
</relation>
<relation type="one" fk-name="ACCTTX_SHIPMENT" rel-entity-name="Shipment">
<key-map field-name="shipmentId"/>
</relation>
<relation type="one" fk-name="ACCTTX_SHIPRCPT" rel-entity-name="ShipmentReceipt">
<key-map field-name="receiptId"/>
</relation>
<relation type="one" fk-name="ACCTTX_WEFF" rel-entity-name="WorkEffort">
<key-map field-name="workEffortId"/>
</relation>
<relation type="many" rel-entity-name="AcctgTransTypeAttr">
<key-map field-name="acctgTransTypeId"/>
</relation>
</entity>
<entity entity-name="AcctgTransAttribute"
package-name="org.ofbiz.accounting.ledger"
title="Accounting Transaction Attribute Entity">
<field name="acctgTransId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<field name="attrValue" type="value"></field>
<prim-key field="acctgTransId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="ACCTTX_ATTR" rel-entity-name="AcctgTrans">
<key-map field-name="acctgTransId"/>
</relation>
<relation type="many" rel-entity-name="AcctgTransTypeAttr">
<key-map field-name="attrName"/>
</relation>
</entity>
<entity entity-name="AcctgTransEntry"
package-name="org.ofbiz.accounting.ledger"
title="Transaction Entry Entity">
<field name="acctgTransId" type="id-ne"></field>
<field name="acctgTransEntrySeqId" type="id-ne"></field>
<field name="acctgTransEntryTypeId" type="id-ne"></field>
<field name="description" type="description"></field>
<field name="voucherRef" type="short-varchar"></field>
<field name="partyId" type="id"></field>
<field name="roleTypeId" type="id"></field>
<field name="theirPartyId" type="id"></field>
<field name="productId" type="id"></field>
<field name="theirProductId" type="id"></field>
<field name="inventoryItemId" type="id"></field>
<field name="glAccountTypeId" type="id"></field>
<field name="glAccountId" type="id-ne"></field>
<field name="organizationPartyId" type="id-ne"></field>
<field name="amount" type="currency-amount"></field>
<field name="currencyUomId" type="id"></field>
<field name="origAmount" type="currency-amount"></field>
<field name="origCurrencyUomId" type="id"></field>
<field name="debitCreditFlag" type="indicator"></field>
<field name="dueDate" type="date"></field>
<field name="groupId" type="id"></field>
<field name="taxId" type="id"></field>
<field name="reconcileStatusId" type="id"></field>
<field name="settlementTermId" type="id"></field>
<field name="isSummary" type="indicator"></field>
<prim-key field="acctgTransId"/>
<prim-key field="acctgTransEntrySeqId"/>
<relation type="one" fk-name="ACCTTXENT_ATET" rel-entity-name="AcctgTransEntryType">
<key-map field-name="acctgTransEntryTypeId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_CURNCY" title="Currency" rel-entity-name="Uom"> <!-- title strictly speaking not necessary here but nice for consistency -->
<key-map field-name="currencyUomId" rel-field-name="uomId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_OCURNCY" title="OrigCurrency" rel-entity-name="Uom">
<key-map field-name="origCurrencyUomId" rel-field-name="uomId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_ACTX" rel-entity-name="AcctgTrans">
<key-map field-name="acctgTransId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_INVITEM" rel-entity-name="InventoryItem">
<key-map field-name="inventoryItemId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_RLTYP" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one-nofk" rel-entity-name="PartyRole">
<key-map field-name="partyId"/>
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_GLACTT" rel-entity-name="GlAccountType">
<key-map field-name="glAccountTypeId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_GLACT" rel-entity-name="GlAccount">
<key-map field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_GLACOG" rel-entity-name="GlAccountOrganization">
<key-map field-name="glAccountId"/>
<key-map field-name="organizationPartyId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_RCSTS" rel-entity-name="StatusItem">
<key-map field-name="reconcileStatusId" rel-field-name="statusId"/>
</relation>
<relation type="one" fk-name="ACCTTXENT_STLEN" rel-entity-name="SettlementTerm">
<key-map field-name="settlementTermId"/>
</relation>
</entity>
<view-entity entity-name="AcctgTransAndEntries"
package-name="org.ofbiz.accounting.ledger"
title="View of AcctgTrans and Entries, for easier lookup and calculation">
<member-entity entity-alias="ATR" entity-name="AcctgTrans"/>
<member-entity entity-alias="ATT" entity-name="AcctgTransType"/>
<member-entity entity-alias="ATE" entity-name="AcctgTransEntry"/>
<member-entity entity-alias="GLA" entity-name="GlAccount"/>
<member-entity entity-alias="GLAC" entity-name="GlAccountClass"/>
<alias entity-alias="ATR" name="isPosted"/>
<alias entity-alias="ATR" name="glFiscalTypeId"/>
<alias entity-alias="ATR" name="acctgTransTypeId"/>
<alias entity-alias="ATR" name="transactionDate"/>
<alias entity-alias="ATR" name="postedDate"/>
<alias entity-alias="ATR" name="transDescription" field="description"/>
<alias entity-alias="ATR" name="glJournalId"/>
<alias entity-alias="ATT" name="transTypeDescription" field="description"/>
<alias entity-alias="ATR" name="invoiceId"/>
<alias entity-alias="ATR" name="paymentId"/>
<alias entity-alias="ATR" name="shipmentId"/>
<alias entity-alias="ATR" name="receiptId"/>
<alias entity-alias="ATR" name="inventoryItemId"/>
<alias entity-alias="ATR" name="workEffortId"/>
<alias entity-alias="ATR" name="fixedAssetId"/>
<alias entity-alias="ATR" name="physicalInventoryId"/>
<alias entity-alias="ATE" name="acctgTransId"/>
<alias entity-alias="ATE" name="acctgTransEntrySeqId"/>
<alias entity-alias="ATE" name="glAccountId"/>
<alias entity-alias="ATE" name="productId"/>
<alias entity-alias="ATE" name="debitCreditFlag"/>
<alias entity-alias="ATE" name="amount"/>
<alias entity-alias="ATE" name="currencyUomId"/>
<alias entity-alias="ATE" name="origAmount"/>
<alias entity-alias="ATE" name="origCurrencyUomId"/>
<alias entity-alias="ATE" name="organizationPartyId"/>
<alias entity-alias="GLA" name="glAccountTypeId"/>
<alias entity-alias="GLA" name="accountCode"/>
<alias entity-alias="GLA" name="accountName"/>
<alias entity-alias="GLAC" name="glAccountClassId"/>
<alias entity-alias="ATE" name="partyId"/>
<alias entity-alias="ATE" name="reconcileStatusId"/>
<alias entity-alias="ATE" name="acctgTransEntryTypeId"/>
<view-link entity-alias="ATR" rel-entity-alias="ATE">
<key-map field-name="acctgTransId"/>
</view-link>
<view-link entity-alias="ATR" rel-entity-alias="ATT">
<key-map field-name="acctgTransTypeId"/>
</view-link>
<view-link entity-alias="ATE" rel-entity-alias="GLA" rel-optional="true">
<key-map field-name="glAccountId"/>
</view-link>
<view-link entity-alias="GLA" rel-entity-alias="GLAC" rel-optional="true">
<key-map field-name="glAccountClassId"/>
</view-link>
<relation type="one" fk-name="ATAE_GLACT" rel-entity-name="GlAccount">
<key-map field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="ATAE_GLACTCLS" rel-entity-name="GlAccountClass">
<key-map field-name="glAccountClassId"/>
</relation>
<relation type="one" fk-name="ATAE_ATTYPE" rel-entity-name="AcctgTransType">
<key-map field-name="acctgTransTypeId"/>
</relation>
<relation type="one" fk-name="ATAE_INVOICE" rel-entity-name="Invoice">
<key-map field-name="invoiceId"/>
</relation>
<relation type="one" fk-name="ATAE_PAYMENT" rel-entity-name="Payment">
<key-map field-name="paymentId"/>
</relation>
<relation type="one" fk-name="ATAE_GLJOURNAL" rel-entity-name="GlJournal">
<key-map field-name="glJournalId"/>
</relation>
</view-entity>
<view-entity entity-name="AcctgTransEntrySums"
package-name="org.ofbiz.accounting.ledger"
title="Sum of AcctgTransEntry entity amounts grouped by glAccountId, debitCreditFlag">
<member-entity entity-alias="ATE" entity-name="AcctgTransEntry"/>
<member-entity entity-alias="ACT" entity-name="AcctgTrans"/>
<member-entity entity-alias="GLA" entity-name="GlAccount"/>
<alias entity-alias="ATE" name="glAccountId" group-by="true"/>
<alias entity-alias="GLA" name="glAccountTypeId" group-by="true"/>
<alias entity-alias="GLA" name="glAccountClassId" group-by="true"/>
<alias entity-alias="GLA" name="accountName" group-by="true"/>
<alias entity-alias="GLA" name="accountCode" group-by="true"/>
<alias entity-alias="ACT" name="glFiscalTypeId" group-by="true"/>
<alias entity-alias="ACT" name="acctgTransTypeId" group-by="false"/>
<alias entity-alias="ATE" name="debitCreditFlag" group-by="true"/>
<alias entity-alias="ATE" name="amount" function="sum"/>
<alias entity-alias="ATE" name="organizationPartyId" group-by="false"/>
<alias entity-alias="ACT" name="isPosted" group-by="false"/>
<alias entity-alias="ACT" name="transactionDate" group-by="false"/> <!-- so we can select the sum by date -->
<view-link entity-alias="ATE" rel-entity-alias="ACT">
<key-map field-name="acctgTransId"/>
</view-link>
<view-link entity-alias="ATE" rel-entity-alias="GLA">
<key-map field-name="glAccountId"/>
</view-link>
</view-entity>
<entity entity-name="AcctgTransEntryType"
package-name="org.ofbiz.accounting.ledger"
title="Accounting Transaction Entry Type Entity">
<field name="acctgTransEntryTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="acctgTransEntryTypeId"/>
<relation type="one" fk-name="ACCTTXE_TYPE_PAR" title="Parent" rel-entity-name="AcctgTransEntryType">
<key-map field-name="parentTypeId" rel-field-name="acctgTransEntryTypeId"/>
</relation>
</entity>
<entity entity-name="AcctgTransType"
package-name="org.ofbiz.accounting.ledger"
default-resource-name="AccountingEntityLabels"
title="Accounting Transaction Type Entity">
<field name="acctgTransTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id-ne"></field>
<field name="hasTable" type="indicator"></field>
<field name="description" type="description"></field>
<prim-key field="acctgTransTypeId"/>
<relation type="one" fk-name="ACCTTX_TYPE_PAR" title="Parent" rel-entity-name="AcctgTransType">
<key-map field-name="parentTypeId" rel-field-name="acctgTransTypeId"/>
</relation>
</entity>
<entity entity-name="AcctgTransTypeAttr"
package-name="org.ofbiz.accounting.ledger"
title="Accounting Transaction Type Attribute Entity">
<field name="acctgTransTypeId" type="id-ne"></field>
<field name="attrName" type="id-long-ne"></field>
<prim-key field="acctgTransTypeId"/>
<prim-key field="attrName"/>
<relation type="one" fk-name="ACCTTX_TYPE_ATTR" rel-entity-name="AcctgTransType">
<key-map field-name="acctgTransTypeId"/>
</relation>
<relation type="many" rel-entity-name="AcctgTransAttribute">
<key-map field-name="attrName"/>
</relation>
<relation type="many" rel-entity-name="AcctgTrans">
<key-map field-name="acctgTransTypeId"/>
</relation>
</entity>
<entity entity-name="GlAccount"
package-name="org.ofbiz.accounting.ledger"
title="General Ledger Account Entity">
<!-- default-resource-name="ChartOfAccountsEntityLabels" <= this does not exist yet and his blocking LookupGlAccount -->
<field name="glAccountId" type="id-ne"></field>
<field name="glAccountTypeId" type="id"></field>
<field name="glAccountClassId" type="id"></field>
<field name="glResourceTypeId" type="id"></field>
<field name="glXbrlClassId" type="id"></field>
<field name="parentGlAccountId" type="id"></field>
<field name="accountCode" type="name"></field>
<field name="accountName" type="name"></field>
<field name="description" type="description"></field>
<field name="productId" type="id"></field>
<field name="externalId" type="id"><description>id of the account in an external system where the accounts are imported/exported</description></field>
<field name="postedBalance" type="currency-amount"></field>
<prim-key field="glAccountId"/>
<relation type="one" fk-name="GLACCT_TYPE" rel-entity-name="GlAccountType">
<key-map field-name="glAccountTypeId"/>
</relation>
<relation type="one" fk-name="GLACCT_CLSS" rel-entity-name="GlAccountClass">
<key-map field-name="glAccountClassId"/>
</relation>
<relation type="one" fk-name="GLACCT_REC" rel-entity-name="GlResourceType">
<key-map field-name="glResourceTypeId"/>
</relation>
<relation type="one" fk-name="GLACCT_XBRLCLS" rel-entity-name="GlXbrlClass">
<key-map field-name="glXbrlClassId"/>
</relation>
<relation type="one" fk-name="GLACCT_PAR" title="Parent" rel-entity-name="GlAccount">
<key-map field-name="parentGlAccountId" rel-field-name="glAccountId"/>
</relation>
<index name="GLACCT_UNQCD" unique="true">
<index-field name="accountCode"/>
</index>
</entity>
<entity entity-name="GlAccountClass"
package-name="org.ofbiz.accounting.ledger"
default-resource-name="AccountingEntityLabels"
title="General Ledger Account Class Entity">
<field name="glAccountClassId" type="id-ne"></field>
<field name="parentClassId" type="id-ne"></field>
<field name="description" type="description"></field>
<field name="isAssetClass" type="indicator"></field>
<prim-key field="glAccountClassId"/>
<relation type="one" fk-name="GLACTCLS_PAR" title="Parent" rel-entity-name="GlAccountClass">
<key-map field-name="parentClassId" rel-field-name="glAccountClassId"/>
</relation>
</entity>
<entity entity-name="GlAccountGroup"
package-name="org.ofbiz.accounting.ledger"
title="General Ledger Account Group Entity">
<field name="glAccountGroupId" type="id-ne"></field>
<field name="glAccountGroupTypeId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="glAccountGroupId"/>
<relation type="one" fk-name="GLACT_GRP_TP" rel-entity-name="GlAccountGroupType">
<key-map field-name="glAccountGroupTypeId"/>
</relation>
</entity>
<entity entity-name="GlAccountGroupMember"
package-name="org.ofbiz.accounting.ledger"
title="General Ledger Account Group Member Entity">
<field name="glAccountId" type="id-ne"></field>
<field name="glAccountGroupTypeId" type="id-ne"></field>
<field name="glAccountGroupId" type="id-ne"></field>
<prim-key field="glAccountId"/>
<prim-key field="glAccountGroupTypeId"/>
<relation type="one" fk-name="GLACT_GPMBR_AC" rel-entity-name="GlAccount">
<key-map field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="GLACT_GPMBR_GP" rel-entity-name="GlAccountGroup">
<key-map field-name="glAccountGroupId"/>
</relation>
<relation type="one" fk-name="GLACT_GPMBR_TP" rel-entity-name="GlAccountGroupType">
<key-map field-name="glAccountGroupTypeId"/>
</relation>
</entity>
<entity entity-name="GlAccountGroupType"
package-name="org.ofbiz.accounting.ledger"
title="General Ledger Account Group Type Entity">
<field name="glAccountGroupTypeId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="glAccountGroupTypeId"/>
</entity>
<entity entity-name="GlAccountHistory"
package-name="org.ofbiz.accounting.ledger"
title="GL Account History Entity">
<field name="glAccountId" type="id-ne"></field>
<field name="organizationPartyId" type="id-ne"></field>
<field name="customTimePeriodId" type="id-ne"></field>
<field name="postedDebits" type="currency-amount"></field>
<field name="postedCredits" type="currency-amount"></field>
<field name="endingBalance" type="currency-amount"></field>
<prim-key field="glAccountId"/>
<prim-key field="organizationPartyId"/>
<prim-key field="customTimePeriodId"/>
<relation type="one" fk-name="GLACCT_HST_GLA" rel-entity-name="GlAccount">
<key-map field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="GLACCT_HST_PARTY" rel-entity-name="Party">
<key-map field-name="organizationPartyId" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="GLACCT_HST_CTP" rel-entity-name="CustomTimePeriod">
<key-map field-name="customTimePeriodId"/>
</relation>
</entity>
<view-entity entity-name="GlAccountAndHistory"
package-name="org.ofbiz.accounting.ledger"
title="View of GL Account and its History, for lookup and calculation">
<member-entity entity-alias="GLA" entity-name="GlAccount"/>
<member-entity entity-alias="GLAH" entity-name="GlAccountHistory"/>
<member-entity entity-alias="GLAC" entity-name="GlAccountClass"/>
<alias-all entity-alias="GLA"/>
<alias-all entity-alias="GLAH"/>
<alias entity-alias="GLAC" name="glAccountClassId"/>
<view-link entity-alias="GLA" rel-entity-alias="GLAH">
<key-map field-name="glAccountId"/>
</view-link>
<view-link entity-alias="GLA" rel-entity-alias="GLAC">
<key-map field-name="glAccountClassId"/>
</view-link>
<relation type="one" fk-name="GLAAH_GLACT" rel-entity-name="GlAccount">
<key-map field-name="glAccountId"/>
</relation>
<relation type="one" fk-name="GLAAH_GLACTCLS" rel-entity-name="GlAccountClass">
<key-map field-name="glAccountClassId"/>
</relation>
<relation type="one" fk-name="GLAAH_GLAH" rel-entity-name="GlAccountHistory">
<key-map field-name="glAccountId"/>
<key-map field-name="organizationPartyId"/>
<key-map field-name="customTimePeriodId"/>
</relation>
</view-entity>
<view-entity entity-name="GlAccountAndHistoryTotals"
package-name="org.ofbiz.accounting.ledger"
title="View of GL Account and its History totals">
<member-entity entity-alias="GLA" entity-name="GlAccount"/>
<member-entity entity-alias="GLAH" entity-name="GlAccountHistory"/>
<alias-all entity-alias="GLA" group-by="true"/>
<alias-all entity-alias="GLAH" group-by="true"/>
<alias entity-alias="GLAH" name="totalPostedDebits" field="postedDebits" function="sum"/>
<alias entity-alias="GLAH" name="totalPostedCredits" field="postedCredits" function="sum"/>
<alias entity-alias="GLAH" name="totalEndingBalance" field="endingBalance" function="sum&q