<?xml version="1.0" encoding="utf-8"?>
<!--
 *	CFAccounting
 *
 *	Copyright (c) 2016-2017 Mark Sobkow
 *	
 *	Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
 *	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 &quot;AS IS&quot; 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.
 *-->
<MSSBam
		xmlns="uri://msscodefactory/mssbam"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:xs="http://www.w3.org/2001/XMLSchema"
		xsi:schemaLocation="uri://msscodefactory/mssbam file:../bin/xsd/mssbam-2.9.xsd"
		Name="CFAccounting"
		Revision="2.10"
		Description="CFAccounting"
		ProjectRoot="net.sourceforge.MSSCodeFactory.CFAccounting.2.10" >
	<Tld Name="org" >
		<TopDomain Name="apache" >
			<License Name="ApacheV2"
					Description="Apache Version 2 License">
Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
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 &quot;AS IS&quot; 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.</License>
		</TopDomain>
		<TopDomain Name="gnu" >
			<License Name="GplV2"
					Description="GNU GPL v2+ License">
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
.
This project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this project.  If not, see http://www.gnu.org/licenses/.</License>
			<License Name="GplV3"
					Description="GNU GPL v3+ License">
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this project.  If not, see http://www.gnu.org/licenses/.</License>
			<License Name="LGplV2"
					Description="GNU Lesser/Library GPL v2+ License">
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
.
This project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser Public License for more details.
.
You should have received a copy of the GNU Lesser Public License
along with this project.  If not, see http://www.gnu.org/licenses/.</License>
			<License Name="LGplV3"
					Description="GNU Lesser/Library GPL v3+ License">
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser Public License for more details.
.
You should have received a copy of the GNU Lesser Public License
along with this project.  If not, see http://www.gnu.org/licenses/.</License>
		</TopDomain>
	</Tld>
	<Tld Name="net" >
		<TopDomain Name="sourceforge" >
			<TopProject Name="MSSCodeFactory" >
				<SubProject Name="CFAccounting" >
					<MajorVersion Name="2" >
						<MinorVersion Name="10" >
<SchemaDef Name="CFAccounting"
		DbName="CFAcc210"
		Description=""
		DefaultLicense="org.apache.ApacheV2"
		ExtendCFCore="true"
		CopyrightHolder="Mark Sobkow"
		CopyrightPeriod="2016-2017"
		AuthorEMail="msobkow@sasktel.net"
		ProjectURL="http://msscodefactory.sourceforge.net/"
		PublishURI="http://msscodefactory.sourceforge.net/model-2.9/net-sourceforge-MSSCodeFactory-CFAccounting-2-10-CFAccounting.xml" >

	<SchemaRef Name="CFSecurity"
			RefModelName="net-sourceforge-MSSCodeFactory-CFSecurity-2-10-CFSecurity"
			IncludeRoot="net.sourceforge.MSSCodeFactory.CFSecurity.2.10.CFSecurity" />

	<SchemaRef Name="CFCrm"
			RefModelName="net-sourceforge-MSSCodeFactory-CFCrm-2-10-CFCrm"
			IncludeRoot="net.sourceforge.MSSCodeFactory.CFCrm.2.10.CFCrm" />

	<StringType Name="ACCode"
			IsNullable="false"
			DefaultVisibility="true"
			MaxLen="64"
			ShowLines="1"
			InitValue="" />

	<StringType Name="ACDescription"
			IsNullable="false"
			DefaultVisibility="true"
			MaxLen="128"
			ShowLines="1"
			InitValue="" />

	<StringType Name="ACIdCode"
			IsNullable="false"
			DefaultVisibility="true"
			MaxLen="128"
			ShowLines="1"
			InitValue="" />

	<NumberType Name="ACInterest"
			IsNullable="false"
			DefaultVisibility="true"
			Digits="8"
			Precis="5"
			InitValue="0" />

	<StringType Name="ACMeasure"
			IsNullable="false"
			DefaultVisibility="true"
			MaxLen="20"
			ShowLines="1"
			InitValue="" />

	<NumberType Name="ACMoney"
			IsNullable="false"
			DefaultVisibility="true"
			Digits="31"
			Precis="5"
			InitValue="0" />

	<NumberType Name="ACUnits"
			IsNullable="false"
			DefaultVisibility="true"
			Digits="20"
			Precis="5"
			InitValue="0" />

	<Id64Gen Name="AccountContactIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="AcctContIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="801"
			BlockSize="1" />

	<Id64Gen Name="AccountIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="802"
			BlockSize="1" />

	<EnumType Name="AccountTypeEnum"
			IsNullable="false"
			DefaultVisibility="true"
			MinValue="0"
			InitValue="0" >
		<EnumTag Name="General" />
		<EnumTag Name="Bank" />
		<EnumTag Name="Payable" />
		<EnumTag Name="Receivable" />
	</EnumType>

	<Id64Gen Name="BillIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="BillIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="803"
			BlockSize="1" />

	<Id64Gen Name="BillItemIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="BillItemIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="804"
			BlockSize="1" />

	<Id64Gen Name="ChequeDetailIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="ChequeDtlIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="805"
			BlockSize="1" />

	<Id64Gen Name="ChequeIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="ChequeIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="806"
			BlockSize="1" />

	<Id64Gen Name="DepositDetailIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="DepositDtlIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="807"
			BlockSize="1" />

	<Id64Gen Name="DepositIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="DepositIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="808"
			BlockSize="1" />

	<Id64Gen Name="FeeDetailIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="FeeDtlIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="809"
			BlockSize="1" />

	<Id64Gen Name="FeeIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="FeeIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="810"
			BlockSize="1" />

	<Id64Gen Name="InvoiceIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="InvoiceIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="811"
			BlockSize="1" />

	<Id64Gen Name="InvoiceItemIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="InvItemIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="812"
			BlockSize="1" />

	<Id64Gen Name="LedgerIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="LedgerIdGen"
			Dispenser="Tenant"
			Slice="813"
			BlockSize="1" />

	<Id64Gen Name="POItemIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="POItemIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="814"
			BlockSize="1" />

	<Id64Gen Name="PaymentDetailIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="PaymentDtlIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="815"
			BlockSize="1" />

	<Id64Gen Name="PaymentIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="PaymentIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="816"
			BlockSize="1" />

	<Id64Gen Name="PurchaseOrderIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="POIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="817"
			BlockSize="1" />

	<Id64Gen Name="TaxIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="TaxIdGen"
			MinValue="0"
			InitValue="0"
			Slice="818"
			BlockSize="1" />

	<Id64Gen Name="TransferIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="TransferIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="819"
			BlockSize="1" />

	<Id32Gen Name="VendorUnitIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="VendorUnitIdGen"
			MinValue="0"
			InitValue="0"
			Dispenser="Tenant"
			Slice="820"
			BlockSize="1" />

	<Table Name="Account"
			TableClassCode="ACCT"
			DbName="acct"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LookupIndex="AccountUCodeIdx"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="AccountIdGen" />
		<TableCol Name="AccountType"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="AccTyp"
				DataType="AccountTypeEnum" />
		<TableCol Name="AccountCode"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACCode" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="CurrencyId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ISOCurrencyIdGen" />
		<TableCol Name="Balance"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACMoney" />
		<BoolCol Name="IsRollupAccount"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="IsRollAcct"
				InitValue="false" />
		<TableCol Name="RollupTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="RollupAccountId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<BoolCol Name="ChequeAlwaysEFT"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="ChqAllEFT"
				InitValue="false" />
		<Int32Col Name="NextChequeNum"
				Label="Next Cheque Number"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="nxt_chq_num"
				MinValue="0"
				MaxValue="999999999"
				InitValue="1" />
		<Int16Col Name="ChequeNumDigits"
				Label="Cheque Number Digits"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="chq_num_digits"
				MinValue="1"
				MaxValue="9"
				InitValue="4" />
		<Int32Col Name="NextTransferNum"
				Label="Next Transfer Number"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="nxt_xfer_num"
				MinValue="0"
				MaxValue="999999999"
				InitValue="1" />
		<Int16Col Name="TransferNumDigits"
				Label="Transfer Number Digits"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="xfer_num_digits"
				MinValue="1"
				MaxValue="9"
				InitValue="6" />
		<Int32Col Name="NextInvoiceNum"
				Label="Next Invoice Number"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="nxt_invc_num"
				MinValue="0"
				MaxValue="999999999"
				InitValue="1" />
		<Int16Col Name="InvoiceNumDigits"
				Label="Invoice Number Digits"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="invc_num_digits"
				MinValue="1"
				MaxValue="9"
				InitValue="6" />
		<Int32Col Name="NextPurchaseOrderNum"
				Label="Next Purchase Order Number"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="nxt_po_num"
				MinValue="0"
				MaxValue="999999999"
				InitValue="1" />
		<Int16Col Name="PurchaseOrderNumDigits"
				Label="Purchase Order Number Digits"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="po_num_digits"
				MinValue="1"
				MaxValue="9"
				InitValue="6" />
		<PrimaryIndex Name="AccountIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="acct_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="AccountUCodeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="acct_xucode"
				ShortName="UCode"
				Suffix="UCodeIdx"
				Label="Unique Account Code Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountCode" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acct_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountTenantRollupIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acct_tenantrollidx"
				ShortName="TenantRoll"
				Suffix="TenantRollIdx"
				Label="Tenant Rollup Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="RollupAccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountTenantTypeRollupIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acct_tenanttprollidx"
				ShortName="TenantTypeRoll"
				Suffix="TentTypRollIdx"
				Label="Tenant Type IsRollup Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountType" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="IsRollupAccount" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountRollupAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acct_rollupidx"
				ShortName="RollupIdx"
				Suffix="RollupAcctIdx"
				Label="Rollup account index" >
			<IndexCol Name="RollupTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="RollupAccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountCurrencyIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acct_ccyidx"
				ShortName="CcyIdx"
				Suffix="CcyIdx"
				Label="Currency Index" >
			<IndexCol Name="CurrencyId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="AccountConfig"
			TableClassCode="ACFG"
			DbName="acct_cfg"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="DefaultCurrencyId"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="DefCcyId"
				DataType="ISOCurrencyIdGen" />
		<TableCol Name="DefaultTimezoneId"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="DefTzId"
				DataType="ISOTimezoneIdGen" />
		<PrimaryIndex Name="AccountConfigIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="acctcfg_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="AccountConfigTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="false"
				IsUnique="false"
				DbName="acctcfg_xtent"
				ShortName="TenantIdx"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountConfigDefaultCurrencyIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctcfg_xdefccy"
				ShortName="DefCcyIdx"
				Suffix="DefCcyIdx"
				Label="Default Currency Index" >
			<IndexCol Name="DefaultCurrencyId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountConfigDefaultTimezoneIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctcfg_xdeftz"
				ShortName="DefTzIdx"
				Suffix="DefTzIdx"
				Label="Default Timezone Index" >
			<IndexCol Name="DefaultTimezoneId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="AccountContact"
			TableClassCode="ACNT"
			DbName="ac_contact"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="false"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountContactId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="AccountContactIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="ContactListId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ContactListIdGen" />
		<TableCol Name="ContactId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ContactIdGen" />
		<PrimaryIndex Name="AccountContactIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="acctct_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountContactId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="AccountContactAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctct_xacct"
				ShortName="AcctIdx"
				Suffix="AccountIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountContactTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctct_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountContactContactListIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctct_ctctlstidx"
				ShortName="ContactList"
				Suffix="CtctLstIdx"
				Label="Contact List Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="ContactListId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountContactContactIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctct_ctctidx"
				ShortName="Contact"
				Suffix="CtctIdx"
				Label="Contact Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="ContactId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="AccountTaxId"
			TableClassCode="ACTX"
			DbName="acctaxid"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="TaxId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TaxIdGen" />
		<StringCol Name="TaxIdCode"
				IsNullable="false"
				DefaultVisibility="true"
				MaxLen="64"
				ShowLines="1"
				InitValue="" />
		<PrimaryIndex Name="AccountTaxIdIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="acctaxid_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="AccountTaxIdTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctaxid_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountTaxIdAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctaxid_acctidx"
				ShortName="Account"
				Suffix="InvAcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="AccountTaxIdTaxIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acctaxid_taxidx"
				ShortName="ACTaxIdx"
				Suffix="ACTaxIdx"
				Label="Tax Index" >
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="Bill"
			TableClassCode="BIL"
			DbName="bill"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="BillId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="BillIdGen" />
		<DateCol Name="BillDate"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2016-01-01" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="BillingCode"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACIdCode" />
		<TableCol Name="Amount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="amt"
				DataType="ACMoney" />
		<TableCol Name="LedgerTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_tent_id"
				DataType="TenantIdGen" />
		<TableCol Name="LedgerId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_id"
				DataType="LedgerIdGen" />
		<PrimaryIndex Name="BillIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="bill_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="BillId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="BillDateIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="bill_date"
				ShortName="DateIdx"
				Suffix="DateIdx"
				Label="Bill Date Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="BillDate" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="bill_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="bill_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillBillingCodeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="bill_billcdidx"
				ShortName="BillCodeIdx"
				Suffix="BillCdIdx"
				Label="Billing Code Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="BillingCode" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillLedgerIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="bill_ledgidx"
				ShortName="LedgerIdx"
				Suffix="LedgerIdx"
				Label="Ledger Index" >
			<IndexCol Name="LedgerTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="LedgerId" IsAscending="true" DefaultVisibility="true" />
		</Index>

		<CPlusDb2LUWTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusDb2LUWTableInclude>

		<CPlusMySqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusMySqlTableInclude>

		<CPlusOracleTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusOracleTableInclude>

		<CPlusPgSqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusPgSqlTableInclude>

		<CPlusSybaseTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusSybaseTableInclude>

		<CPlusRamTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusRamTableInclude>
	</Table>

	<Table Name="BillItem"
			TableClassCode="BLIT"
			DbName="billitem"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="BillId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="BillIdGen" />
		<TableCol Name="BillItemId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="BillItemIdGen" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="NumOrdered"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACUnits" />
		<TableCol Name="VendorUnitTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendtentid"
				DataType="TenantIdGen" />
		<TableCol Name="VendorUnitAccountId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendaccid"
				DataType="AccountIdGen" />
		<TableCol Name="VendorUnitId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendunitid"
				DataType="VendorUnitIdGen" />
		<TableCol Name="UnitPrice"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="unit_price"
				DataType="ACMoney" />
		<TableCol Name="AmountBilled"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="amt_billed"
				DataType="ACMoney" />
		<TableCol Name="TaxId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TaxIdGen" />
		<TableCol Name="PurchaseOrderTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="purchordtentid"
				DataType="TenantIdGen" />
		<TableCol Name="PurchaseOrderId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="purchordunitid"
				DataType="PurchaseOrderIdGen" />
		<TableCol Name="POItemTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="poitemtentid"
				DataType="TenantIdGen" />
		<TableCol Name="POItemId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="poitemid"
				DataType="POItemIdGen" />
		<PrimaryIndex Name="BillItemIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="billitem_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="BillItemId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="BillItemTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billitem_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillItemBillIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billitem_billidx"
				ShortName="BillIdx"
				Suffix="BillIdx"
				Label="Bill Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="BillId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillItemVendorUnitIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billitem_xvunit"
				ShortName="VUnit"
				Suffix="VUnitIdx"
				Label="Vendor Unit Index" >
			<IndexCol Name="VendorUnitTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="VendorUnitAccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="VendorUnitId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillItemTaxIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billitem_xtax"
				ShortName="Tax"
				Suffix="BITaxIdx"
				Label="Tax Index" >
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillItemPurchaseOrderIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billitem_xpurchord"
				ShortName="PurchOrd"
				Suffix="PurchOrdIdx"
				Label="Purchase Order Index" >
			<IndexCol Name="PurchaseOrderTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PurchaseOrderId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillItemPOItemIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billitem_xpoitem"
				ShortName="POItem"
				Suffix="POItemIdx"
				Label="Purchase Order Item Index" >
			<IndexCol Name="POItemTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="POItemId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="BillTax"
			TableClassCode="BILT"
			DbName="billtax"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="BillItemId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="BillItemIdGen" />
		<TableCol Name="TaxId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TaxIdGen" />
		<PrimaryIndex Name="BillTaxIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="billtax_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="BillItemId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="BillTaxTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billtax_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillTaxItemIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billtax_billitmidx"
				ShortName="InvItem"
				Suffix="InvItemIdx"
				Label="Bill Item Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="BillItemId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="BillTaxTaxIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="billtax_taxidx"
				ShortName="BITaxIdx"
				Suffix="BTTaxIdx"
				Label="Tax Index" >
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="Cheque"
			TableClassCode="CHEQ"
			DbName="cheque"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="ChequeId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="ChequeIdGen" />
		<DateCol Name="ChequeDate"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2016-01-01" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<BoolCol Name="IsEFT"
				Label="EFT"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="false" />
		<TableCol Name="ChequeNumber"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACIdCode" />
		<TableCol Name="Amount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="amt"
				DataType="ACMoney" />
		<TableCol Name="LedgerTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_tent_id"
				DataType="TenantIdGen" />
		<TableCol Name="LedgerId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_id"
				DataType="LedgerIdGen" />
		<PrimaryIndex Name="ChequeIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="cheque_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="ChequeId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="ChequeDateIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="cheque_date"
				ShortName="DateIdx"
				Suffix="DateIdx"
				Label="Cheque Date Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="ChequeDate" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="ChequeTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="cheque_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="ChequeAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="cheque_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="ChequeNumberIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="cheque_numberidx"
				ShortName="ChqNumIdx"
				Suffix="ChqNmIdx"
				Label="Cheque Number Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="ChequeNumber" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="ChequeLedgerIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="cheque_ledgidx"
				ShortName="LedgerIdx"
				Suffix="LedgerIdx"
				Label="Ledger Index" >
			<IndexCol Name="LedgerTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="LedgerId" IsAscending="true" DefaultVisibility="true" />
		</Index>

		<CPlusDb2LUWTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusDb2LUWTableInclude>

		<CPlusMySqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusMySqlTableInclude>

		<CPlusOracleTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusOracleTableInclude>

		<CPlusPgSqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusPgSqlTableInclude>

		<CPlusSybaseTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusSybaseTableInclude>

		<CPlusRamTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusRamTableInclude>
	</Table>

	<Table Name="ChequeDetail"
			TableClassCode="CHQD"
			DbName="chqdtl"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="ChequeId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ChequeIdGen" />
		<TableCol Name="ChequeDetailId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="ChequeDetailIdGen" />
		<TableCol Name="BillTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="bill_tentid"
				DataType="TenantIdGen" />
		<TableCol Name="BillId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="bill_id"
				DataType="BillIdGen" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="AmountPaid"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="amt_paid"
				DataType="ACMoney" />
		<TableCol Name="PrevTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="PrevChequeDetailId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="ChequeDetailIdGen" />
		<TableCol Name="NextTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="NextChequeDetailId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="ChequeDetailIdGen" />
		<PrimaryIndex Name="ChequeDetailIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="chqdtl_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="ChequeDetailId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="ChequeDetailTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="chqdtl_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="ChequeDetailChequeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="chqdtl_chqidx"
				ShortName="ChequeIdx"
				Suffix="ChequeIdx"
				Label="Cheque Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="ChequeId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="ChequeDetailBillIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="chqdtl_billidx"
				ShortName="BillIdx"
				Suffix="BillIdx"
				Label="Bill Index" >
			<IndexCol Name="BillTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="BillId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PrevIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="chqdtl_prvidx"
				Suffix="PrevIdx" >
			<IndexCol Name="PrevTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PrevChequeDetailId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="NextIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="chqdtl_nxtidx"
				Suffix="NextIdx" >
			<IndexCol Name="NextTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="NextChequeDetailId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="Deposit"
			TableClassCode="DPST"
			DbName="deposit"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="DepositId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="DepositIdGen" />
		<DateCol Name="DepositDate"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2016-01-01" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<BoolCol Name="IsEFT"
				Label="EFT"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="false" />
		<TableCol Name="DepositCode"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACIdCode" />
		<TableCol Name="Amount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="amt"
				DataType="ACMoney" />
		<TableCol Name="LedgerTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_tent_id"
				DataType="TenantIdGen" />
		<TableCol Name="LedgerId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_id"
				DataType="LedgerIdGen" />
		<PrimaryIndex Name="DepositIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="deposit_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="DepositId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="DepositDateIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="deposit_date"
				ShortName="DateIdx"
				Suffix="DateIdx"
				Label="Deposit Date Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="DepositDate" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="DepositTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="deposit_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="DepositAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="deposit_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="DepositCodeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="deposit_codeidx"
				ShortName="DepCodeIdx"
				Suffix="DepCodeIdx"
				Label="Deposit Code Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="DepositCode" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="DepositLedgerIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="deposit_ledgidx"
				ShortName="LedgerIdx"
				Suffix="LedgerIdx"
				Label="Ledger Index" >
			<IndexCol Name="LedgerTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="LedgerId" IsAscending="true" DefaultVisibility="true" />
		</Index>

		<CPlusDb2LUWTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusDb2LUWTableInclude>

		<CPlusMySqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusMySqlTableInclude>

		<CPlusOracleTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusOracleTableInclude>

		<CPlusPgSqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusPgSqlTableInclude>

		<CPlusSybaseTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusSybaseTableInclude>

		<CPlusRamTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusRamTableInclude>
	</Table>

	<Table Name="DepositDetail"
			TableClassCode="DEPD"
			DbName="depdtl"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="DepositId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="DepositIdGen" />
		<TableCol Name="DepositDetailId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="DepositDetailIdGen" />
		<TableCol Name="PaymentTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="pymt_tentid"
				DataType="TenantIdGen" />
		<TableCol Name="PaymentId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="pymt_id"
				DataType="PaymentIdGen" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="AmountPaid"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="amt_paid"
				DataType="ACMoney" />
		<TableCol Name="NextTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="NextDepositDetailId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="DepositDetailIdGen" />
		<TableCol Name="PrevTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="PrevDepositDetailId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="DepositDetailIdGen" />
		<PrimaryIndex Name="DepositDetailIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="depdtl_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="DepositDetailId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="DepositDetailTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="depdtl_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="DepositDetailDepositIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="depdtl_depidx"
				ShortName="DepositIdx"
				Suffix="DepositIdx"
				Label="Deposit Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="DepositId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="DepositDetailPaymentIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="depdtl_pymtidx"
				ShortName="PaymentIdx"
				Suffix="PaymentIdx"
				Label="Payment Index" >
			<IndexCol Name="PaymentTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PaymentId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="DepositDetailPrevIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="depdtl_prvidx"
				Suffix="PrevIdx" >
			<IndexCol Name="PrevTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PrevDepositDetailId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="DepositDetailNextidx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="depdtl_nextidx"
				Suffix="NextIdx" >
			<IndexCol Name="NextTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="NextDepositDetailId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="Fee"
			TableClassCode="FEE"
			DbName="fee"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="FeeId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="FeeIdGen" />
		<DateCol Name="FeeDate"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2016-01-01" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="Amount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="amt"
				DataType="ACMoney" />
		<TableCol Name="LedgerTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_tent_id"
				DataType="TenantIdGen" />
		<TableCol Name="LedgerId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_id"
				DataType="LedgerIdGen" />
		<PrimaryIndex Name="FeeIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="fee_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="FeeId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="FeeDateIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="fee_date"
				ShortName="DateIdx"
				Suffix="DateIdx"
				Label="Fee Date Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="FeeDate" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="FeeTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="fee_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="FeeAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="fee_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="FeeLedgerIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="fee_ledgidx"
				ShortName="LedgerIdx"
				Suffix="LedgerIdx"
				Label="Ledger Index" >
			<IndexCol Name="LedgerTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="LedgerId" IsAscending="true" DefaultVisibility="true" />
		</Index>

		<CPlusDb2LUWTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusDb2LUWTableInclude>

		<CPlusMySqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusMySqlTableInclude>

		<CPlusOracleTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusOracleTableInclude>

		<CPlusPgSqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusPgSqlTableInclude>

		<CPlusSybaseTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusSybaseTableInclude>

		<CPlusRamTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusRamTableInclude>
	</Table>

	<Table Name="FeeDetail"
			TableClassCode="FEDT"
			DbName="feedtl"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="FeeId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="FeeIdGen" />
		<TableCol Name="FeeDetailId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="FeeDetailIdGen" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="AmountCharged"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="amt_chg"
				DataType="ACMoney" />
		<TableCol Name="PrevTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="PrevFeeDetailId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="FeeDetailIdGen" />
		<TableCol Name="NextTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="NextFeeDetailId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="FeeDetailIdGen" />
		<PrimaryIndex Name="FeeDetailIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="feedtl_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="FeeDetailId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="FeeDetailTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="feedtl_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="FeeDetailFeeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="feedtl_depidx"
				ShortName="FeeIdx"
				Suffix="FeeIdx"
				Label="Fee Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="FeeId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="FeeDetailPrevIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="feedtl_previdx"
				Suffix="PrevIdx" >
			<IndexCol Name="PrevTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PrevFeeDetailId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="FeeDetailNextIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="feedtl_nextidx"
				Suffix="NextIdx" >
			<IndexCol Name="NextTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="NextFeeDetailId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="Invoice"
			TableClassCode="INVC"
			DbName="invoice"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="InvoiceId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="InvoiceIdGen" />
		<DateCol Name="InvoiceDate"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2016-01-01" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="IdCode"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACIdCode" />
		<TableCol Name="Amount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="amt"
				DataType="ACMoney" />
		<TableCol Name="LedgerTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_tent_id"
				DataType="TenantIdGen" />
		<TableCol Name="LedgerId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_id"
				DataType="LedgerIdGen" />
		<PrimaryIndex Name="InvoiceIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="invoice_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="InvoiceId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="InvoiceDateIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invoice_date"
				ShortName="DateIdx"
				Suffix="DateIdx"
				Label="Invoice Date Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="InvoiceDate" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invoice_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invoice_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceIdCodeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invoice_idcdidx"
				ShortName="InvIdCodeIdx"
				Suffix="InvIdCdIdx"
				Label="Invoice ID Code Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="IdCode" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceLedgerIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invoice_ledgidx"
				ShortName="LedgerIdx"
				Suffix="LedgerIdx"
				Label="Ledger Index" >
			<IndexCol Name="LedgerTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="LedgerId" IsAscending="true" DefaultVisibility="true" />
		</Index>

		<CPlusDb2LUWTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusDb2LUWTableInclude>

		<CPlusMySqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusMySqlTableInclude>

		<CPlusOracleTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusOracleTableInclude>

		<CPlusPgSqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusPgSqlTableInclude>

		<CPlusSybaseTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusSybaseTableInclude>

		<CPlusRamTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusRamTableInclude>
	</Table>

	<Table Name="InvoiceItem"
			TableClassCode="INVI"
			DbName="invitem"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="InvoiceId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="InvoiceIdGen" />
		<TableCol Name="InvoiceItemId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="InvoiceItemIdGen" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="NumCharged"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACUnits" />
		<TableCol Name="VendorUnitTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendtentid"
				DataType="TenantIdGen" />
		<TableCol Name="VendorUnitAccountId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendaccid"
				DataType="AccountIdGen" />
		<TableCol Name="VendorUnitId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendunitid"
				DataType="VendorUnitIdGen" />
		<TableCol Name="UnitPrice"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="unit_price"
				DataType="ACMoney" />
		<TableCol Name="AmountInvoiced"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="amt_invoiced"
				DataType="ACMoney" />
		<TableCol Name="TaxId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TaxIdGen" />
		<TableCol Name="PrevTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="PrevInvoiceItemId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="InvoiceItemIdGen" />
		<TableCol Name="NextTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="NextInvoiceItemId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="InvoiceItemIdGen" />
		<PrimaryIndex Name="InvoiceItemIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="invitem_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="InvoiceItemId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="InvoiceItemTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invitem_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceItemInvoiceIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invitem_invidx"
				ShortName="Invoice"
				Suffix="InvIdx"
				Label="Invoice Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="InvoiceId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceItemVendorUnitIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invitem_xvunit"
				ShortName="VUnit"
				Suffix="VUnitIdx"
				Label="Vendor Unit Index" >
			<IndexCol Name="VendorUnitTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="VendorUnitAccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="VendorUnitId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceItemTaxIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invitem_xtax"
				ShortName="IITax"
				Suffix="IITaxIdx"
				Label="Tax Index" >
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceItemPrevIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invitm_previdx"
				Suffix="PrevIdx" >
			<IndexCol Name="PrevTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PrevInvoiceItemId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceItemNextIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invitem_nextidx"
				Suffix="NextIdx" >
			<IndexCol Name="NextTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="NextInvoiceItemId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="InvoiceTax"
			TableClassCode="INVT"
			DbName="invtax"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="InvoiceItemId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="InvoiceItemIdGen" />
		<TableCol Name="TaxId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TaxIdGen" />
		<PrimaryIndex Name="InvoiceTaxIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="invtax_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="InvoiceItemId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="InvoiceTaxTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invtax_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceTaxItemIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invtax_invitmidx"
				ShortName="InvItem"
				Suffix="InvItemIdx"
				Label="Invoice Item Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="InvoiceItemId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="InvoiceTaxTaxIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="invtax_taxidx"
				ShortName="ITTaxIdx"
				Suffix="ITTaxIdx"
				Label="Tax Index" >
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="Ledger"
			TableClassCode="LEDG"
			DbName="ledger"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="false"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="LedgerId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="LedgerIdGen" />
		<TimestampCol Name="EntryStamp"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2014-06-22T15:30:52" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="IdCode"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACIdCode" />
		<TableCol Name="TransferTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="XfrTentId"
				DataType="TenantIdGen" />
		<TableCol Name="TransferAccountId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="XfrAcctId"
				DataType="AccountIdGen" />
		<TableCol Name="Debit"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="ACMoney" />
		<TableCol Name="Credit"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="ACMoney" />
		<TableCol Name="ConvertedAmount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="cvsn_amt"
				DataType="ACMoney" />
		<TableCol Name="ConversionCurrency"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="cvsn_ccy"
				DataType="ISOCurrencyIdGen" />
		<TableCol Name="Balance"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACMoney" />
		<PrimaryIndex Name="LedgerIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="ledger_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="LedgerId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="LedgerAccountTStampIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="ledger_accstmp"
				ShortName="AccTsIdx"
				Suffix="AccTsIdx"
				Label="Account Timestamp Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="EntryStamp" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="LedgerEStampIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="ledger_estamp"
				ShortName="EStampIdx"
				Suffix="EStampIdx"
				Label="Account Entry Stamp Index" >
			<IndexCol Name="EntryStamp" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="LedgerTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="ledger_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="LedgerAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="ledger_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="LedgerIdCodeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="ledger_acctidcdidx"
				ShortName="AccountIdCode"
				Suffix="AcctIdCdIdx"
				Label="Account ID Code Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="IdCode" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="LedgerTransferAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="ledger_xfracctidx"
				ShortName="XfrAccount"
				Suffix="XfrAcctIdx"
				Label="Transfer Account Index" >
			<IndexCol Name="TransferTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="TransferAccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="LedgerConversionCcyIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="ledger_cvsnccyidx"
				ShortName="CvtCcy"
				Suffix="CvtCcyIdx"
				Label="Transfer Account Index" >
			<IndexCol Name="ConversionCurrency" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="POItem"
			TableClassCode="POIT"
			DbName="poitem"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="PurchaseOrderId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="PurchaseOrderIdGen" />
		<TableCol Name="POItemId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="POItemIdGen" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="NumOrdered"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACUnits" />
		<TableCol Name="VendorUnitTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendtentid"
				DataType="TenantIdGen" />
		<TableCol Name="VendorUnitAccountId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendaccid"
				DataType="AccountIdGen" />
		<TableCol Name="VendorUnitId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="vendunitid"
				DataType="VendorUnitIdGen" />
		<TableCol Name="PrevTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="PrevPOItemId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="POItemIdGen" />
		<TableCol Name="NextTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="NextPOItemId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="POItemIdGen" />
		<PrimaryIndex Name="POItemIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="poitem_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="POItemId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="POItemTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="poitem_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="POItemPurchaseOrderIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="poitem_poidx"
				ShortName="POrder"
				Suffix="POIdx"
				Label="Purchase Order Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PurchaseOrderId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="POItemVendorUnitIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="poitem_xvunit"
				ShortName="VUnit"
				Suffix="VUnitIdx"
				Label="Vendor Unit Index" >
			<IndexCol Name="VendorUnitTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="VendorUnitAccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="VendorUnitId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="POItemPrevIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="poitem_previdx"
				Suffix="PrevIdx" >
			<IndexCol Name="PrevTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PrevPOItemId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="POItemNextIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="poitem_nextidx"
				Suffix="NextIdx" >
			<IndexCol Name="NextTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="NextPOItemId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="Payment"
			TableClassCode="PYMT"
			DbName="pymt"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="PaymentId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="PaymentIdGen" />
		<DateCol Name="PaymentDate"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2016-01-01" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="IdCode"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACIdCode" />
		<TableCol Name="Amount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="amt"
				DataType="ACMoney" />
		<TableCol Name="LedgerTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_tent_id"
				DataType="TenantIdGen" />
		<TableCol Name="LedgerId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_id"
				DataType="LedgerIdGen" />
		<PrimaryIndex Name="PaymentIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="pymt_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="PaymentId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="PaymentDateIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymt_date"
				ShortName="DateIdx"
				Suffix="DateIdx"
				Label="Payment Date Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PaymentDate" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PaymentTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymt_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PaymentAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymt_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PaymentIdCodeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymt_idcdidx"
				ShortName="PymtIdCodeIdx"
				Suffix="PymtIdCdIdx"
				Label="Payment ID Code Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="IdCode" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PaymentLedgerIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymt_ledgidx"
				ShortName="LedgerIdx"
				Suffix="LedgerIdx"
				Label="Ledger Index" >
			<IndexCol Name="LedgerTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="LedgerId" IsAscending="true" DefaultVisibility="true" />
		</Index>

		<CPlusDb2LUWTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusDb2LUWTableInclude>

		<CPlusMySqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusMySqlTableInclude>

		<CPlusOracleTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusOracleTableInclude>

		<CPlusPgSqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusPgSqlTableInclude>

		<CPlusSybaseTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusSybaseTableInclude>

		<CPlusRamTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusRamTableInclude>
	</Table>

	<Table Name="PaymentDetail"
			TableClassCode="PYMD"
			DbName="pymtdtl"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="PaymentId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="PaymentIdGen" />
		<TableCol Name="PaymentDetailId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="PaymentDetailIdGen" />
		<TableCol Name="InvoiceTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="inv_tentid"
				DataType="TenantIdGen" />
		<TableCol Name="InvoiceId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="inv_id"
				DataType="InvoiceIdGen" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="AmountApplied"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="amt_applied"
				DataType="ACMoney" />
		<TableCol Name="PrevTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="PrevPaymentDetailId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="PaymentDetailIdGen" />
		<TableCol Name="NextTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="NextPaymentDetailId"
				IsNullable="true"
				DefaultVisibility="true"
				DataType="PaymentDetailIdGen" />
		<PrimaryIndex Name="PaymentDetailIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="pymtdtl_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PaymentDetailId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="PaymentDetailTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymtdtl_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PaymentDetailPaymentIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymtdtl_pymtidx"
				ShortName="PaymentIdx"
				Suffix="PaymentIdx"
				Label="Payment Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PaymentId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PaymentDetailInvoiceIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymtdtl_invidx"
				ShortName="InvoiceIdx"
				Suffix="InvoiceIdx"
				Label="Invoice Index" >
			<IndexCol Name="InvoiceTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="InvoiceId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PaymentDetailPrevIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymtdtl_previdx"
				Suffix="PrevIdx" >
			<IndexCol Name="PrevTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="PrevPaymentDetailId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PaymentDetailNextIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="pymtdtl_nextidx"
				Suffix="NextIdx" >
			<IndexCol Name="NextTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="NextPaymentDetailId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="PurchaseOrder"
			TableClassCode="PORD"
			DbName="purchord"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="PurchaseOrderId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="PurchaseOrderIdGen" />
		<DateCol Name="OrderDate"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2016-01-01" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="IdCode"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACIdCode" />
		<TableCol Name="ApprovedAmount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="amt_approved"
				DataType="ACMoney" />
		<TimestampCol Name="OrderPlaced"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="OrderPlaced" />
		<PrimaryIndex Name="PurchaseOrderIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="purchord_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="PurchaseOrderId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="PurchaseOrderDateIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="purchord_date"
				ShortName="DateIdx"
				Suffix="DateIdx"
				Label="Purchase Order Date Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="OrderDate" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PurchaseOrderTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="purchord_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PurchaseOrderAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="purchord_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="PurchaseOrderIdCodeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="purchord_idcdidx"
				ShortName="POIdCode"
				Suffix="POIdCdIdx"
				Label="Purchase Order ID Code Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="IdCode" IsAscending="true" DefaultVisibility="true" />
		</Index>

		<CPlusDb2LUWTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusDb2LUWTableInclude>

		<CPlusMySqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusMySqlTableInclude>

		<CPlusOracleTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusOracleTableInclude>

		<CPlusPgSqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusPgSqlTableInclude>

		<CPlusSybaseTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusSybaseTableInclude>

		<CPlusRamTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusRamTableInclude>
	</Table>

	<Table Name="Tax"
			TableClassCode="TAX"
			DbName="tax"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LookupIndex="TaxUNameIdx"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="TaxId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="TaxIdGen" />
		<StringCol Name="Name"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="safe_name"
				MaxLen="32"
				ShowLines="1"
				InitValue="" />
		<TableCol Name="Fee"
				Label="Fee (In default currency)"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="fee"
				DataType="ACMoney" />
		<TableCol Name="Percent"
				Label="Percentage"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="pct"
				DataType="ACInterest" />
		<PrimaryIndex Name="TaxIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="tax_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TaxId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="TaxTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="false"
				IsUnique="false"
				DbName="tax_xtent"
				ShortName="TenantIdx"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="TaxUNameIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="tax_xuname"
				ShortName="UNameIdx"
				Suffix="UNameIdx"
				Label="Unique Name Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="Name" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="VendorUnit"
			TableClassCode="ACVU"
			DbName="ac_vunit"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="false"
			HasAuditColumns="true"
			PageData="true"
			LookupIndex="VendorUnitMeasurementIdx"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="VendorUnitId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="VendorUnitIdGen" />
		<TableCol Name="Measurement"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="meas"
				DataType="ACMeasure" />
		<Int32Col Name="UnitDigits"
				IsNullable="false"
				DefaultVisibility="true"
				MinValue="0"
				MaxValue="5"
				InitValue="0" />
		<PrimaryIndex Name="VendorUnitIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="acvunit_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="VendorUnitId" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="VendorUnitMeasurementIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="acvunit_xumeas"
				ShortName="MeasureIdx"
				Suffix="MeasureIdx"
				Label="Measurement Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="Measurement" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="VendorUnitAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acvunit_xacct"
				ShortName="AcctIdx"
				Suffix="AccountIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="VendorUnitTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="acvunit_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="Transfer"
			TableClassCode="XFER"
			DbName="transfer"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			PageData="true"
			LoaderBehaviour="Insert"
			SecScope="Tenant" >
		<TableCol Name="TenantId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="TenantIdGen" />
		<TableCol Name="AccountId"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="AccountIdGen" />
		<TableCol Name="TransferId"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="TransferIdGen" />
		<DateCol Name="TransferDate"
				IsNullable="false"
				DefaultVisibility="true"
				InitValue="2016-01-01" />
		<TableCol Name="Description"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACDescription" />
		<TableCol Name="TransferNumber"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ACIdCode" />
		<TableCol Name="Amount"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="amt"
				DataType="ACMoney" />
		<TableCol Name="ToAccountTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="toacct_tent_id"
				DataType="TenantIdGen" />
		<TableCol Name="ToAccountId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="toacct_id"
				DataType="AccountIdGen" />
		<TableCol Name="LedgerTenantId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_tent_id"
				DataType="TenantIdGen" />
		<TableCol Name="LedgerId"
				IsNullable="true"
				DefaultVisibility="true"
				DbName="ledg_id"
				DataType="LedgerIdGen" />
		<PrimaryIndex Name="TransferIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="transfer_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Id Index" >
			<IndexCol Name="TenantId" IsAscending="false" DefaultVisibility="true" />
			<IndexCol Name="TransferId" IsAscending="false" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="TransferDateIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="transfer_date"
				ShortName="DateIdx"
				Suffix="DateIdx"
				Label="Transfer Date Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="TransferDate" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="TransferTenantIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="transfer_tenantidx"
				ShortName="Tenant"
				Suffix="TenantIdx"
				Label="Tenant Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="TransferAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="transfer_acctidx"
				ShortName="Account"
				Suffix="AcctIdx"
				Label="Account Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="TransferNumberIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="transfer_numberidx"
				ShortName="ChqNumIdx"
				Suffix="ChqNmIdx"
				Label="Transfer Number Index" >
			<IndexCol Name="TenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="AccountId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="TransferNumber" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="TransferLedgerIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="transfer_ledgidx"
				ShortName="LedgerIdx"
				Suffix="LedgerIdx"
				Label="Ledger Index" >
			<IndexCol Name="LedgerTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="LedgerId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="TransferToAccountIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="transfer_toacctidx"
				ShortName="ToAccount"
				Suffix="ToAcctIdx"
				Label="To Account Index" >
			<IndexCol Name="ToAccountTenantId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="ToAccountId" IsAscending="true" DefaultVisibility="true" />
		</Index>

		<CPlusDb2LUWTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusDb2LUWTableInclude>

		<CPlusMySqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusMySqlTableInclude>

		<CPlusOracleTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusOracleTableInclude>

		<CPlusPgSqlTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusPgSqlTableInclude>

		<CPlusSybaseTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusSybaseTableInclude>

		<CPlusRamTableInclude>
#include &lt;cflib/CFLibNotImplementedYetException.hpp&gt;
</CPlusRamTableInclude>
	</Table>

	<TableAddendum FromTable="Account">
		<Relation Name="Tenant"
				RelationType="Container"
				DbName="acct_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="AccountTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="SubAccounts"
				RelationType="Children"
				DbName="acct_subacct"
				Label="Sub Accounts"
				Suffix="SubAccts"
				FromIndex="AccountIdIdx"
				ToIndex="Account.AccountRollupAccountIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="RollupTenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="RollupAccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Currency"
				RelationType="Lookup"
				DbName="acct_ccy"
				Label="Currency"
				Suffix="Ccy"
				FromIndex="AccountCurrencyIdx"
				ToIndex="ISOCurrency.ISOCurrencyIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="CurrencyId" ToCol="ISOCurrencyId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="AccountContact"
				RelationType="Components"
				DbName="acct_contact"
				Label="Account Contact"
				Suffix="AccCont"
				FromIndex="AccountIdIdx"
				ToIndex="AccountContact.AccountContactAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Entry"
				RelationType="Components"
				DbName="acct_entry"
				Label="Account Entry"
				Suffix="Entry"
				FromIndex="AccountIdIdx"
				ToIndex="Ledger.LedgerAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="PurchaseOrder"
				RelationType="Components"
				DbName="acct_po"
				Label="Purchase Order"
				Suffix="POrder"
				FromIndex="AccountIdIdx"
				ToIndex="PurchaseOrder.PurchaseOrderAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Invoice"
				RelationType="Components"
				DbName="acct_invc"
				Label="Invoice"
				Suffix="Invoice"
				FromIndex="AccountIdIdx"
				ToIndex="Invoice.InvoiceAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Payment"
				RelationType="Components"
				DbName="acct_pymt"
				Label="Payment"
				Suffix="Payment"
				FromIndex="AccountIdIdx"
				ToIndex="Payment.PaymentAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Bill"
				RelationType="Components"
				DbName="acct_bill"
				Label="Bill"
				Suffix="Bill"
				FromIndex="AccountIdIdx"
				ToIndex="Bill.BillAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Cheque"
				RelationType="Components"
				DbName="acct_chq"
				Label="Cheque"
				Suffix="Cheque"
				FromIndex="AccountIdIdx"
				ToIndex="Cheque.ChequeAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Deposit"
				RelationType="Components"
				DbName="acct_dep"
				Label="Deposit"
				Suffix="Deposit"
				FromIndex="AccountIdIdx"
				ToIndex="Deposit.DepositAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Fee"
				RelationType="Components"
				DbName="acct_fee"
				Label="Fee"
				Suffix="Fee"
				FromIndex="AccountIdIdx"
				ToIndex="Fee.FeeAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="VendorUnit"
				RelationType="Components"
				DbName="acct_vendunit"
				Label="Vendor Unit Measurement"
				Suffix="VendorUnit"
				FromIndex="AccountIdIdx"
				ToIndex="VendorUnit.VendorUnitAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="TaxId"
				RelationType="Components"
				DbName="acct_taxid"
				Label="Tax Id"
				Suffix="TaxId"
				FromIndex="AccountIdIdx"
				ToIndex="AccountTaxId.AccountTaxIdAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Transfer"
				RelationType="Components"
				DbName="acct_xfer"
				Label="Transfer"
				Suffix="Transfer"
				FromIndex="AccountIdIdx"
				ToIndex="Transfer.TransferAccountIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="AccountConfig">
		<Relation Name="Tenant"
				RelationType="Container"
				DbName="acctconf_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="AccountConfigIdIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="DefaultCurrency"
				RelationType="Lookup"
				DbName="acctconf_defccy"
				Label="Default Currency"
				Suffix="DefCcy"
				FromIndex="AccountConfigDefaultCurrencyIdx"
				ToIndex="ISOCurrency.ISOCurrencyIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="DefaultCurrencyId" ToCol="ISOCurrencyId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="DefaultTimezone"
				RelationType="Lookup"
				DbName="acctconf_deftz"
				Label="Default Timezone"
				Suffix="DefTz"
				FromIndex="AccountConfigDefaultTimezoneIdx"
				ToIndex="ISOTimezone.ISOTimezoneIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="DefaultTimezoneId" ToCol="ISOTimezoneId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="AccountContact">
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="acctcont_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="AccountContactTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Account"
				RelationType="Container"
				DbName="acctcont_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="AccountContactAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="ContactList"
				RelationType="Parent"
				DbName="acctcont_contlist"
				Label="Contact List"
				Suffix="ContList"
				FromIndex="AccountContactContactListIdx"
				ToIndex="ContactList.ContactListIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="ContactListId" ToCol="ContactListId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Contact"
				RelationType="Parent"
				DbName="acctcont_cont"
				Label="Contact"
				Suffix="Contact"
				FromIndex="AccountContactContactIdx"
				ToIndex="Contact.ContactIdIdx"
				IsRequired="true"
				DefaultVisibility="true"
				PopDepChain="ContactList.ContactListContact" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="ContactId" ToCol="ContactId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="AccountTaxId">
		<Relation Name="Account"
				RelationType="Container"
				DbName="accttax_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="AccountTaxIdAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="accttax_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="AccountTaxIdTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Bill">
		<Relation Name="Account"
				RelationType="Container"
				DbName="bill_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="BillAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="bill_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="BillTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Ledger"
				RelationType="Lookup"
				DbName="bill_ledger"
				Label="Bill Ledger Entry"
				Suffix="Ledger"
				FromIndex="BillLedgerIdx"
				ToIndex="Ledger.LedgerIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="LedgerTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="BillItem"
				RelationType="Components"
				DbName="bill_billitem"
				Label="Bill Item"
				Suffix="BillItem"
				FromIndex="BillIdIdx"
				ToIndex="BillItem.BillItemBillIdx"
				IsRequired="true"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="BillId" ToCol="BillId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="ChequeDetail"
				RelationType="Children"
				ShortName="ChequeDetail"
				DbName="bill_chqdtl"
				Suffix="ChequeDetail"
				FromIndex="BillIdIdx"
				ToIndex="ChequeDetail.ChequeDetailBillIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="BillTenantId" DefaultVisibility="true" />
			<RelationCol Name="BillId" ToCol="BillId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="BillItem">
		<Relation Name="Bill"
				RelationType="Container"
				DbName="billitem_bill"
				Label="Bill"
				Suffix="Bill"
				FromIndex="BillItemBillIdx"
				ToIndex="Bill.BillIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="BillId" ToCol="BillId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="billitem_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="BillItemTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="VendorUnit"
				RelationType="Lookup"
				DbName="billitem_vendunit"
				Label="Vendor Unit"
				Suffix="VUnit"
				FromIndex="BillItemVendorUnitIdx"
				ToIndex="VendorUnit.VendorUnitIdIdx"
				IsRequired="false"
				DefaultVisibility="true"
				PopDepChain="Bill.Account.VendorUnit" >
			<RelationCol Name="VendorUnitTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="VendorUnitAccountId" ToCol="AccountId" DefaultVisibility="true" />
			<RelationCol Name="VendorUnitId" ToCol="VendorUnitId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tax"
				RelationType="Components"
				DbName="billitem_tax"
				Label="Tax Applied"
				Suffix="Tax"
				FromIndex="BillItemIdIdx"
				ToIndex="BillTax.BillTaxItemIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="BillItemId" ToCol="BillItemId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="PurchaseOrder"
				RelationType="Lookup"
				DbName="billitem_po"
				Label="Purchase Order"
				Suffix="PurchOrd"
				FromIndex="BillItemPurchaseOrderIdx"
				ToIndex="PurchaseOrder.PurchaseOrderIdIdx"
				IsRequired="false"
				DefaultVisibility="true"
				PopDepChain="Bill.Account.PurchaseOrder" >
			<RelationCol Name="PurchaseOrderTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PurchaseOrderId" ToCol="PurchaseOrderId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="BillTax">
		<Relation Name="BillItem"
				RelationType="Container"
				DbName="billtax_billitem"
				Label="Bill Item"
				Suffix="BillItem"
				FromIndex="BillTaxItemIdx"
				ToIndex="BillItem.BillItemIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="BillItemId" ToCol="BillItemId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="billtax_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="BillTaxTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Cheque">
		<Relation Name="Account"
				RelationType="Container"
				DbName="chq_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="ChequeAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="chq_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="ChequeTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Ledger"
				RelationType="Lookup"
				DbName="chq_ledger"
				Label="Cheque Ledger Entry"
				Suffix="Ledger"
				FromIndex="ChequeLedgerIdx"
				ToIndex="Ledger.LedgerIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="LedgerTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="ChequeDetail"
				RelationType="Components"
				DbName="chq_chqdtl"
				Label="Cheque Detail"
				Suffix="Detail"
				FromIndex="ChequeIdIdx"
				ToIndex="ChequeDetail.ChequeDetailChequeIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="ChequeId" ToCol="ChequeId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="ChequeDetail">
		<Relation Name="Cheque"
				RelationType="Container"
				DbName="chqdtl_chq"
				Label="Cheque"
				Suffix="Cheque"
				FromIndex="ChequeDetailChequeIdx"
				ToIndex="Cheque.ChequeIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="ChequeId" ToCol="ChequeId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="chqdtl_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="ChequeDetailTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Bill"
				RelationType="Parent"
				DbName="chqdtl_bill"
				Label="Bill"
				Suffix="Bill"
				FromIndex="ChequeDetailBillIdx"
				ToIndex="Bill.BillIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="BillTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="BillId" ToCol="BillId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Prev"
				RelationType="Lookup"
				DbName="chqdtl_prev"
				Suffix="Prev"
				FromIndex="PrevIdx"
				ToIndex="ChequeDetail.ChequeDetailIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="PrevTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PrevChequeDetailId" ToCol="ChequeDetailId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Next"
				RelationType="Lookup"
				DbName="chqdtl_next"
				Suffix="Next"
				FromIndex="NextIdx"
				ToIndex="ChequeDetail.ChequeDetailIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="NextTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="NextChequeDetailId" ToCol="ChequeDetailId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Contact">
		<Relation Name="AccountContact"
				RelationType="Children"
				DbName="ctct_acctctct"
				Label="Account Contact"
				Suffix="AccCont"
				FromIndex="ContactIdIdx"
				ToIndex="AccountContact.AccountContactContactIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="ContactId" ToCol="ContactId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="ContactList">
		<Relation Name="AccountContact"
				RelationType="Children"
				DbName="ctctlst_acctcont"
				Label="Account Contact"
				Suffix="AccCont"
				FromIndex="ContactListIdIdx"
				ToIndex="AccountContact.AccountContactContactListIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="ContactListId" ToCol="ContactListId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Deposit">
		<Relation Name="Account"
				RelationType="Container"
				DbName="depsit_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="DepositAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="depsit_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="DepositTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Ledger"
				RelationType="Lookup"
				DbName="depsit_ledger"
				Label="Deposit Ledger Entry"
				Suffix="Ledger"
				FromIndex="DepositLedgerIdx"
				ToIndex="Ledger.LedgerIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="LedgerTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="DepositDetail"
				RelationType="Components"
				DbName="depsit_depdtl"
				Label="Deposit Detail"
				Suffix="Detail"
				FromIndex="DepositIdIdx"
				ToIndex="DepositDetail.DepositDetailDepositIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="DepositId" ToCol="DepositId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="DepositDetail">
		<Relation Name="Deposit"
				RelationType="Container"
				DbName="depdtl_depsit"
				Label="Deposit"
				Suffix="Deposit"
				FromIndex="DepositDetailDepositIdx"
				ToIndex="Deposit.DepositIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="DepositId" ToCol="DepositId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="depdtl_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="DepositDetailTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Payment"
				RelationType="Parent"
				DbName="depdtl_pymt"
				Label="Payment"
				Suffix="Payment"
				FromIndex="DepositDetailPaymentIdx"
				ToIndex="Payment.PaymentIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="PaymentTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PaymentId" ToCol="PaymentId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Prev"
				RelationType="Lookup"
				DbName="depdtl_prev"
				Suffix="Prev"
				FromIndex="DepositDetailPrevIdx"
				ToIndex="DepositDetail.DepositDetailIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="PrevTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PrevDepositDetailId" ToCol="DepositDetailId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Next"
				RelationType="Lookup"
				DbName="depdtl_next"
				Suffix="Next"
				FromIndex="DepositDetailNextidx"
				ToIndex="DepositDetail.DepositDetailIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="NextTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="NextDepositDetailId" ToCol="DepositDetailId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Fee">
		<Relation Name="Account"
				RelationType="Container"
				DbName="fee_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="FeeAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="fee_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="FeeTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Ledger"
				RelationType="Lookup"
				DbName="fee_ledger"
				Label="Fee Ledger Entry"
				Suffix="Ledger"
				FromIndex="FeeLedgerIdx"
				ToIndex="Ledger.LedgerIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="LedgerTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="FeeDetail"
				RelationType="Components"
				DbName="fee_feedtl"
				Label="Fee Detail"
				Suffix="Detail"
				FromIndex="FeeIdIdx"
				ToIndex="FeeDetail.FeeDetailFeeIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="FeeId" ToCol="FeeId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="FeeDetail">
		<Relation Name="Fee"
				RelationType="Container"
				DbName="feedtl_fee"
				Label="Fee"
				Suffix="Fee"
				FromIndex="FeeDetailFeeIdx"
				ToIndex="Fee.FeeIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="FeeId" ToCol="FeeId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="feedtl_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="FeeDetailTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Prev"
				RelationType="Lookup"
				DbName="feedtl_prev"
				Suffix="Prev"
				FromIndex="FeeDetailPrevIdx"
				ToIndex="FeeDetail.FeeDetailIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="PrevTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PrevFeeDetailId" ToCol="FeeDetailId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Next"
				RelationType="Lookup"
				DbName="feedtl_next"
				Suffix="Next"
				FromIndex="FeeDetailNextIdx"
				ToIndex="FeeDetail.FeeDetailIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="NextTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="NextFeeDetailId" ToCol="FeeDetailId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Invoice">
		<Relation Name="Account"
				RelationType="Container"
				DbName="invc_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="InvoiceAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="invc_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="InvoiceTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Ledger"
				RelationType="Lookup"
				DbName="invc_ledger"
				Label="Invoice Ledger Entry"
				Suffix="Ledger"
				FromIndex="InvoiceLedgerIdx"
				ToIndex="Ledger.LedgerIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="LedgerTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="InvoiceItem"
				RelationType="Components"
				DbName="invc_invcitem"
				Label="Invoice Item"
				Suffix="InvoiceItem"
				FromIndex="InvoiceIdIdx"
				ToIndex="InvoiceItem.InvoiceItemInvoiceIdx"
				IsRequired="true"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="InvoiceId" ToCol="InvoiceId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="PaymentDetail"
				RelationType="Children"
				DbName="invc_pymtdtl"
				Label="Payment Detail"
				Suffix="PaymentDetail"
				FromIndex="InvoiceIdIdx"
				ToIndex="PaymentDetail.PaymentDetailInvoiceIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="InvoiceTenantId" DefaultVisibility="true" />
			<RelationCol Name="InvoiceId" ToCol="InvoiceId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="InvoiceItem">
		<Relation Name="Invoice"
				RelationType="Container"
				DbName="invcitm_invc"
				Label="Invoice"
				Suffix="Invoice"
				FromIndex="InvoiceItemInvoiceIdx"
				ToIndex="Invoice.InvoiceIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="InvoiceId" ToCol="InvoiceId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="invcitm_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="InvoiceItemTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="VendorUnit"
				RelationType="Lookup"
				DbName="invcitm_vendunit"
				Label="Vendor Unit"
				Suffix="VUnit"
				FromIndex="InvoiceItemVendorUnitIdx"
				ToIndex="VendorUnit.VendorUnitIdIdx"
				IsRequired="false"
				DefaultVisibility="true"
				PopDepChain="Invoice.Account.VendorUnit" >
			<RelationCol Name="VendorUnitTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="VendorUnitAccountId" ToCol="AccountId" DefaultVisibility="true" />
			<RelationCol Name="VendorUnitId" ToCol="VendorUnitId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tax"
				RelationType="Components"
				DbName="invcitem_tax"
				Label="Tax Applied"
				Suffix="Tax"
				FromIndex="InvoiceItemIdIdx"
				ToIndex="InvoiceTax.InvoiceTaxItemIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="InvoiceItemId" ToCol="InvoiceItemId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Prev"
				RelationType="Lookup"
				DbName="invitem_prev"
				Suffix="Prev"
				FromIndex="InvoiceItemPrevIdx"
				ToIndex="InvoiceItem.InvoiceItemIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="PrevTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PrevInvoiceItemId" ToCol="InvoiceItemId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Next"
				RelationType="Lookup"
				DbName="invitem_next"
				Suffix="Next"
				FromIndex="InvoiceItemNextIdx"
				ToIndex="InvoiceItem.InvoiceItemIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="NextTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="NextInvoiceItemId" ToCol="InvoiceItemId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="InvoiceTax">
		<Relation Name="InvoiceItem"
				RelationType="Container"
				DbName="invctax_invcitem"
				Label="Invoice Item"
				Suffix="InvItem"
				FromIndex="InvoiceTaxItemIdx"
				ToIndex="InvoiceItem.InvoiceItemIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="InvoiceItemId" ToCol="InvoiceItemId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="invctax_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="InvoiceTaxTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Ledger">
		<Relation Name="Account"
				RelationType="Container"
				DbName="ledger_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="LedgerAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="ledger_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="LedgerTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="TransferAccount"
				RelationType="Lookup"
				DbName="ledger_xferacct"
				Label="Transfer Account"
				Suffix="XfrAccount"
				FromIndex="LedgerTransferAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TransferTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="TransferAccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="ConversionCurrency"
				RelationType="Lookup"
				DbName="ledger_convccy"
				Label="Conversion Currency"
				Suffix="ConvertCcy"
				FromIndex="LedgerConversionCcyIdx"
				ToIndex="ISOCurrency.ISOCurrencyIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="ConversionCurrency" ToCol="ISOCurrencyId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Invoice"
				RelationType="Children"
				DbName="ledger_invc"
				Label="Invoice"
				Suffix="Invoice"
				FromIndex="LedgerIdIdx"
				ToIndex="Invoice.InvoiceLedgerIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="LedgerTenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Payment"
				RelationType="Children"
				DbName="ledger_pymt"
				Label="Payment"
				Suffix="Payment"
				FromIndex="LedgerIdIdx"
				ToIndex="Payment.PaymentLedgerIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="LedgerTenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Bill"
				RelationType="Children"
				DbName="ledger_bill"
				Label="Bill"
				Suffix="Bill"
				FromIndex="LedgerIdIdx"
				ToIndex="Bill.BillLedgerIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="LedgerTenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Cheque"
				RelationType="Children"
				DbName="ledger_chq"
				Label="Cheque"
				Suffix="Cheque"
				FromIndex="LedgerIdIdx"
				ToIndex="Cheque.ChequeLedgerIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="LedgerTenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Deposit"
				RelationType="Children"
				DbName="ledger_depsit"
				Label="Deposit"
				Suffix="Deposit"
				FromIndex="LedgerIdIdx"
				ToIndex="Deposit.DepositLedgerIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="LedgerTenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Fee"
				RelationType="Children"
				DbName="ledger_fee"
				Label="Fee"
				Suffix="Fee"
				FromIndex="LedgerIdIdx"
				ToIndex="Fee.FeeLedgerIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="LedgerTenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Transfer"
				RelationType="Children"
				DbName="ledger_xfer"
				Label="Transfer"
				Suffix="Transfer"
				FromIndex="LedgerIdIdx"
				ToIndex="Transfer.TransferLedgerIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="LedgerTenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="POItem">
		<Relation Name="PurchaseOrder"
				RelationType="Container"
				DbName="poitem_po"
				Label="Purchase Order"
				Suffix="POrder"
				FromIndex="POItemPurchaseOrderIdx"
				ToIndex="PurchaseOrder.PurchaseOrderIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PurchaseOrderId" ToCol="PurchaseOrderId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="poitem_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="POItemTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="BillItem"
				RelationType="Children"
				DbName="poitem_billitem"
				Label="Bill Item"
				Suffix="BillItem"
				FromIndex="POItemIdIdx"
				ToIndex="BillItem.BillItemPOItemIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="POItemTenantId" DefaultVisibility="true" />
			<RelationCol Name="POItemId" ToCol="POItemId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Prev"
				RelationType="Lookup"
				DbName="poitem_prev"
				Suffix="Prev"
				FromIndex="POItemPrevIdx"
				ToIndex="POItem.POItemIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="PrevTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PrevPOItemId" ToCol="POItemId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Next"
				RelationType="Lookup"
				DbName="poitem_next"
				Suffix="Next"
				FromIndex="POItemNextIdx"
				ToIndex="POItem.POItemIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="NextTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="NextPOItemId" ToCol="POItemId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Payment">
		<Relation Name="Account"
				RelationType="Container"
				DbName="pymt_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="PaymentAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="pymt_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="PaymentTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Ledger"
				RelationType="Lookup"
				DbName="pymt_ledger"
				Label="Payment Ledger Entry"
				Suffix="Ledger"
				FromIndex="PaymentLedgerIdx"
				ToIndex="Ledger.LedgerIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="LedgerTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="PaymentDetail"
				RelationType="Components"
				DbName="pymt_pymtdtl"
				Label="Payment Detail"
				Suffix="Detail"
				FromIndex="PaymentIdIdx"
				ToIndex="PaymentDetail.PaymentDetailPaymentIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PaymentId" ToCol="PaymentId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="DepositDetail"
				RelationType="Children"
				DbName="pymt_depdtl"
				Label="Deposit Detail"
				Suffix="DepositDetail"
				FromIndex="PaymentIdIdx"
				ToIndex="DepositDetail.DepositDetailPaymentIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="PaymentTenantId" DefaultVisibility="true" />
			<RelationCol Name="PaymentId" ToCol="PaymentId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="PaymentDetail">
		<Relation Name="Payment"
				RelationType="Container"
				DbName="pymtdtl_pymt"
				Label="Payment"
				Suffix="Payment"
				FromIndex="PaymentDetailPaymentIdx"
				ToIndex="Payment.PaymentIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PaymentId" ToCol="PaymentId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="pymtdtl_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="PaymentDetailTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Invoice"
				RelationType="Parent"
				DbName="pymtdtl_invc"
				Label="Invoice"
				Suffix="Invoice"
				FromIndex="PaymentDetailInvoiceIdx"
				ToIndex="Invoice.InvoiceIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="InvoiceTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="InvoiceId" ToCol="InvoiceId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Prev"
				RelationType="Lookup"
				DbName="pymtdtl_prev"
				Suffix="Prev"
				FromIndex="PaymentDetailPrevIdx"
				ToIndex="PaymentDetail.PaymentDetailIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="PrevTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PrevPaymentDetailId" ToCol="PaymentDetailId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Next"
				RelationType="Lookup"
				DbName="pymtdtl_next"
				Suffix="Next"
				FromIndex="PaymentDetailNextIdx"
				ToIndex="PaymentDetail.PaymentDetailIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="NextTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="NextPaymentDetailId" ToCol="PaymentDetailId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="PurchaseOrder">
		<Relation Name="Account"
				RelationType="Container"
				DbName="po_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="PurchaseOrderAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="po_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="PurchaseOrderTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="POItem"
				RelationType="Components"
				DbName="po_poitem"
				Label="Purchase Order Item"
				Suffix="POItem"
				FromIndex="PurchaseOrderIdIdx"
				ToIndex="POItem.POItemPurchaseOrderIdx"
				IsRequired="true"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="PurchaseOrderId" ToCol="PurchaseOrderId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="BillItem"
				RelationType="Children"
				DbName="po_billitem"
				Label="Bill Item"
				Suffix="BillItem"
				FromIndex="PurchaseOrderIdIdx"
				ToIndex="BillItem.BillItemPurchaseOrderIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="PurchaseOrderTenantId" DefaultVisibility="true" />
			<RelationCol Name="PurchaseOrderId" ToCol="PurchaseOrderId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Tax">
		<Relation Name="Tenant"
				RelationType="Container"
				DbName="tax_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="TaxTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Tenant">
		<Relation Name="AccountConfig"
				RelationType="Components"
				DbName="tenant_acctconf"
				Label="Account Configuration"
				Suffix="AcctCfg"
				FromIndex="TenantIdIdx"
				ToIndex="AccountConfig.AccountConfigIdIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="Id" ToCol="TenantId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tax"
				RelationType="Components"
				DbName="tenant_tax"
				Label="Tax Configuration"
				Suffix="Tax"
				FromIndex="TenantIdIdx"
				ToIndex="Tax.TaxTenantIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="Id" ToCol="TenantId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Account"
				RelationType="Components"
				DbName="tenant_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="TenantIdIdx"
				ToIndex="Account.AccountTenantIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="Id" ToCol="TenantId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Transfer">
		<Relation Name="Account"
				RelationType="Container"
				DbName="transfer_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="TransferAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="transfer_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="TransferTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="ToAccount"
				RelationType="Parent"
				DbName="transfer_toacct"
				Label="ToAccount"
				Suffix="ToAccount"
				FromIndex="TransferToAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				PopDepChain="Tenant.Account"
				DefaultVisibility="true" >
			<RelationCol Name="ToAccountTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="ToAccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Ledger"
				RelationType="Lookup"
				DbName="transfer_ledger"
				Label="Transfer Ledger Entry"
				Suffix="Ledger"
				FromIndex="TransferLedgerIdx"
				ToIndex="Ledger.LedgerIdIdx"
				IsRequired="false"
				DefaultVisibility="true" >
			<RelationCol Name="LedgerTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="LedgerId" ToCol="LedgerId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="VendorUnit">
		<Relation Name="Tenant"
				RelationType="Owner"
				DbName="vendunit_tenant"
				Label="Tenant"
				Suffix="Tenant"
				FromIndex="VendorUnitTenantIdx"
				ToIndex="Tenant.TenantIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="Account"
				RelationType="Container"
				DbName="vendunit_acct"
				Label="Account"
				Suffix="Account"
				FromIndex="VendorUnitAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="TenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="AccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="Account">
		<Relation Name="RollupAccount"
				RelationType="Parent"
				DbName="acct_rollupacct"
				Label="Rollup Account"
				Suffix="RollupAcct"
				FromIndex="AccountRollupAccountIdx"
				ToIndex="Account.AccountIdIdx"
				IsRequired="false"
				DefaultVisibility="true"
				PopDepChain="Tenant.Account" >
			<RelationCol Name="RollupTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="RollupAccountId" ToCol="AccountId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="AccountTaxId">
		<Relation Name="Tax"
				RelationType="Parent"
				DbName="accttaxid_tax"
				Label="Tax"
				Suffix="Tax"
				FromIndex="AccountTaxIdTaxIdx"
				ToIndex="Tax.TaxIdIdx"
				IsRequired="true"
				DefaultVisibility="true"
				PopDepChain="Tenant.Tax" >
			<RelationCol Name="TaxId" ToCol="TaxId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="BillItem">
		<Relation Name="LineForTax"
				RelationType="Lookup"
				DbName="billitem_lnfortax"
				Label="Line For Tax"
				Suffix="LineForTax"
				FromIndex="BillItemTaxIdx"
				ToIndex="Tax.TaxIdIdx"
				IsRequired="true"
				DefaultVisibility="true"
				PopDepChain="Tenant.Tax" >
			<RelationCol Name="TaxId" ToCol="TaxId" DefaultVisibility="true" />
		</Relation>
		<Relation Name="POItem"
				RelationType="Lookup"
				DbName="billitem_poitm"
				Label="Purchase Order Item"
				Suffix="POItem"
				FromIndex="BillItemPOItemIdx"
				ToIndex="POItem.POItemIdIdx"
				IsRequired="false"
				DefaultVisibility="true"
				PopDepChain="PurchaseOrder.POItem" >
			<RelationCol Name="POItemTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="POItemId" ToCol="POItemId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="BillTax">
		<Relation Name="Tax"
				RelationType="Parent"
				DbName="billtax_tax"
				Label="Tax"
				Suffix="Tax"
				FromIndex="BillTaxTaxIdx"
				ToIndex="Tax.TaxIdIdx"
				IsRequired="true"
				DefaultVisibility="true"
				PopDepChain="Tenant.Tax" >
			<RelationCol Name="TaxId" ToCol="TaxId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="InvoiceItem">
		<Relation Name="LineForTax"
				RelationType="Lookup"
				DbName="invcitem_lnfortax"
				Label="Line For Tax"
				Suffix="LineForTax"
				FromIndex="InvoiceItemTaxIdx"
				ToIndex="Tax.TaxIdIdx"
				IsRequired="true"
				DefaultVisibility="true"
				PopDepChain="Tenant.Tax" >
			<RelationCol Name="TaxId" ToCol="TaxId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="InvoiceTax">
		<Relation Name="Tax"
				RelationType="Parent"
				DbName="invctax_tax"
				Label="Tax"
				Suffix="Tax"
				FromIndex="InvoiceTaxTaxIdx"
				ToIndex="Tax.TaxIdIdx"
				IsRequired="true"
				DefaultVisibility="true"
				PopDepChain="Tenant.Tax" >
			<RelationCol Name="TaxId" ToCol="TaxId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="POItem">
		<Relation Name="VendorUnit"
				RelationType="Lookup"
				DbName="poitem_vendunit"
				Label="Vendor Unit"
				Suffix="VUnit"
				FromIndex="POItemVendorUnitIdx"
				ToIndex="VendorUnit.VendorUnitIdIdx"
				IsRequired="false"
				DefaultVisibility="true"
				PopDepChain="PurchaseOrder.Account.VendorUnit" >
			<RelationCol Name="VendorUnitTenantId" ToCol="TenantId" DefaultVisibility="true" />
			<RelationCol Name="VendorUnitAccountId" ToCol="AccountId" DefaultVisibility="true" />
			<RelationCol Name="VendorUnitId" ToCol="VendorUnitId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="ChequeDetail">
		<Chain Name="Order"
				Suffix="Order"
				DefaultVisibility="true"
				PrevRel="Prev"
				NextRel="Next" />
	</TableAddendum>

	<TableAddendum FromTable="DepositDetail">
		<Chain Name="Order"
				Suffix="Order"
				DefaultVisibility="true"
				PrevRel="Prev"
				NextRel="Next" />
	</TableAddendum>

	<TableAddendum FromTable="FeeDetail">
		<Chain Name="Order"
				Suffix="Order"
				DefaultVisibility="true"
				PrevRel="Prev"
				NextRel="Next" />
	</TableAddendum>

	<TableAddendum FromTable="InvoiceItem">
		<Chain Name="Order"
				Suffix="Order"
				DefaultVisibility="true"
				PrevRel="Prev"
				NextRel="Next" />
	</TableAddendum>

	<TableAddendum FromTable="POItem">
		<Chain Name="Order"
				Suffix="Order"
				DefaultVisibility="true"
				PrevRel="Prev"
				NextRel="Next" />
	</TableAddendum>

	<TableAddendum FromTable="PaymentDetail">
		<Chain Name="Order"
				Suffix="Order"
				DefaultVisibility="true"
				PrevRel="Prev"
				NextRel="Next" />
	</TableAddendum>

	<TableAddendum FromTable="Account">
		<ClearDep Name="ClearPaymentDtlInvoice" ClearDepChain="Payment.PaymentDetail.Invoice" />
		<ClearDep Name="ClearChequeDtlBill" ClearDepChain="Cheque.ChequeDetail.Bill" />
		<ClearDep Name="ClearDepositDtlPayment" ClearDepChain="Deposit.DepositDetail.Payment" />
		<ClearDep Name="ClearInvoiceItmTax" ClearDepChain="Invoice.InvoiceItem.LineForTax" />
		<ClearDep Name="ClearBillItmTax" ClearDepChain="Bill.BillItem.LineForTax" />
	</TableAddendum>

	<TableAddendum FromTable="Tenant">
		<ClearDep Name="ClearRollupAccount" ClearDepChain="Account.RollupAccount" />
	</TableAddendum>

	<TableAddendum FromTable="Account">
		<DelDep Name="DelFeeDetail" DelDepChain="Fee.FeeDetail" />
		<DelDep Name="DelFee" DelDepChain="Fee" />
		<DelDep Name="DelCheque" DelDepChain="Cheque" />
		<DelDep Name="DelTransfer" DelDepChain="Transfer" />
		<DelDep Name="DelBillTax" DelDepChain="Bill.BillItem.Tax" />
		<DelDep Name="DelBill" DelDepChain="Bill" />
		<DelDep Name="DelPOItem" DelDepChain="PurchaseOrder.POItem" />
		<DelDep Name="DelPurchaseOrder" DelDepChain="PurchaseOrder" />
		<DelDep Name="DelDeposit" DelDepChain="Deposit" />
		<DelDep Name="DelPayment" DelDepChain="Payment" />
		<DelDep Name="DelInvoiceTax" DelDepChain="Invoice.InvoiceItem.Tax" />
		<DelDep Name="DelInvoiceItem" DelDepChain="Invoice.InvoiceItem" />
		<DelDep Name="DelInvoice" DelDepChain="Invoice" />
		<DelDep Name="DelAccountContact" DelDepChain="AccountContact" />
		<DelDep Name="DelVendorUnit" DelDepChain="VendorUnit" />
		<DelDep Name="DelTaxId" DelDepChain="TaxId" />
		<DelDep Name="DelEntries" DelDepChain="Entry" />
	</TableAddendum>

	<TableAddendum FromTable="Bill">
		<DelDep Name="DelBillItem" DelDepChain="BillItem" />
		<DelDep Name="DelBillTax" DelDepChain="BillItem.Tax" />
	</TableAddendum>

	<TableAddendum FromTable="BillItem">
		<DelDep Name="DelBillTax" DelDepChain="Tax" />
	</TableAddendum>

	<TableAddendum FromTable="Cheque">
		<DelDep Name="DelChequeDetail" DelDepChain="ChequeDetail" />
	</TableAddendum>

	<TableAddendum FromTable="Deposit">
		<DelDep Name="DelDepositDetail" DelDepChain="DepositDetail" />
	</TableAddendum>

	<TableAddendum FromTable="Fee">
		<DelDep Name="DelFeeDetail" DelDepChain="FeeDetail" />
	</TableAddendum>

	<TableAddendum FromTable="Invoice">
		<DelDep Name="DelInvoiceTax" DelDepChain="InvoiceItem.Tax" />
		<DelDep Name="DelInvoiceItem" DelDepChain="InvoiceItem" />
	</TableAddendum>

	<TableAddendum FromTable="InvoiceItem">
		<DelDep Name="DelInvoiceTax" DelDepChain="Tax" />
	</TableAddendum>

	<TableAddendum FromTable="Ledger">
		<DelDep Name="DelFee" DelDepChain="Fee" />
		<DelDep Name="DelDeposit" DelDepChain="Deposit" />
		<DelDep Name="DelPayment" DelDepChain="Payment" />
		<DelDep Name="DelInvoice" DelDepChain="Invoice" />
		<DelDep Name="DelCheque" DelDepChain="Cheque" />
		<DelDep Name="DelBill" DelDepChain="Bill" />
	</TableAddendum>

	<TableAddendum FromTable="Payment">
		<DelDep Name="DelPaymentDetail" DelDepChain="PaymentDetail" />
	</TableAddendum>

	<TableAddendum FromTable="PurchaseOrder">
		<DelDep Name="DelPOItem" DelDepChain="POItem" />
	</TableAddendum>

	<TableAddendum FromTable="Tenant">
		<DelDep Name="DelAccountContact" DelDepChain="Account.AccountContact" />
		<DelDep Name="DelAccount" DelDepChain="Account" />
		<DelDep Name="DelTax" DelDepChain="Tax" />
		<DelDep Name="DelAccountConfigs" DelDepChain="AccountConfig" />
	</TableAddendum>

	<TableAddendum FromTable="Bill">

		<ServerObjFunc Name="FinalizeBill"
				IsInstanceMethod="true"
				DefaultVisibility="true"
				ReturnTable="Bill" >
<JavaMethodBody>		final String S_ProcName = "finalizeBill";
		if( schemaObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				1,
				"schemaObj" );
		}
		if( obj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				2,
				"obj" );
		}
		I$DefSchemaName$BillEditObj editObj = obj.beginEdit();
		if( editObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj" );
		}
		I$DefSchemaName$AccountEditObj editAccount = editObj.getRequiredContainerAccount().beginEdit();
		if( editAccount == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editAccount" );
		}

		Calendar currentDate = Calendar.getInstance();
		currentDate.set( Calendar.HOUR_OF_DAY, 0 );
		currentDate.set( Calendar.MINUTE, 0 );
		currentDate.set( Calendar.SECOND, 0 );
		currentDate.set( Calendar.MILLISECOND, 0 );
		editObj.setRequiredBillDate( currentDate );

		BigDecimal total = new BigDecimal( "0.0" );
		BigDecimal addme;
		I$DefSchemaName$BillItemObj billItem;
		List&lt;I$DefSchemaName$BillItemObj&gt; billItemList = editObj.getRequiredComponentsBillItem( true );
		if( billItemList.size() &gt; 0 ) {
			Iterator&lt;I$DefSchemaName$BillItemObj&gt; iterBillItem = billItemList.iterator();
			while( iterBillItem.hasNext() ) {
				billItem = iterBillItem.next();
				addme = billItem.getRequiredAmountBilled();
				total = total.add( addme );
			}
			editObj.setOptionalAmount( total );
		}
		else {
			total = editObj.getOptionalAmount();
			if( total == null ) {
				throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
					S_ProcName,
					0,
					"editObj.getOptionalAmount" );
			}
		}
		editAccount.setRequiredBalance( editAccount.getRequiredBalance().subtract( total ) );
		editAccount.update();
		I$DefSchemaName$LedgerObj ledger = schemaObj.getLedgerTableObj().newInstance();
		I$DefSchemaName$LedgerEditObj editLedger = ledger.beginEdit();
		editLedger.setRequiredContainerAccount( editObj.getRequiredContainerAccount() );
		editLedger.setRequiredEntryStamp( Calendar.getInstance() );
		editLedger.setRequiredDescription( "Bill " + editObj.getRequiredDescription() );
		editLedger.setOptionalDebit( total );
		editLedger.setOptionalCredit( null );
		editLedger.setOptionalLookupConvertCcy( null );
		editLedger.setOptionalConvertedAmount( null );
		editLedger.setOptionalLookupXfrAccount( null );
		editLedger.setRequiredBalance( editAccount.getRequiredBalance() );
		ledger = editLedger.create();
		editObj.setOptionalLookupLedger( ledger );
		editObj.update();
		return( editObj.getBillBuff() );
</JavaMethodBody>
		<CPlusMethodBody>
		static const std::string S_ProcName( "finalizeBill" );
		throw cflib::CFLib::getDefaultExceptionFactory()-&gt;newNotImplementedYetException( CLASS_NAME, S_ProcName );
</CPlusMethodBody>
		</ServerObjFunc>
	</TableAddendum>

	<TableAddendum FromTable="Cheque">
		<ServerObjFunc Name="FinalizeCheque"
				IsInstanceMethod="true"
				DefaultVisibility="true"
				ReturnTable="Cheque" >
<JavaMethodBody>		final String S_ProcName = "finalizeCheque";
		if( schemaObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				1,
				"schemaObj" );
		}
		if( obj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				2,
				"obj" );
		}
		I$DefSchemaName$ChequeEditObj editObj = obj.beginEdit();
		if( editObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj" );
		}
		I$DefSchemaName$AccountEditObj editAccount = editObj.getRequiredContainerAccount().beginEdit();
		if( editAccount == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editAccount" );
		}

		boolean isEFT = editObj.getRequiredIsEFT();

		Calendar currentDate = Calendar.getInstance();
		currentDate.set( Calendar.HOUR_OF_DAY, 0 );
		currentDate.set( Calendar.MINUTE, 0 );
		currentDate.set( Calendar.SECOND, 0 );
		currentDate.set( Calendar.MILLISECOND, 0 );
		editObj.setRequiredChequeDate( currentDate );

		I$DefSchemaName$AccountObj objAccount = editAccount.getOrig();
		if( ! isEFT ) {
			short chequeNumDigits = objAccount.getRequiredChequeNumDigits();
			int maxChequeNum;
			switch( chequeNumDigits ) {
				case 1: maxChequeNum = 9; break;
				case 2: maxChequeNum = 99; break;
				case 3: maxChequeNum = 999; break;
				case 4: maxChequeNum = 9999; break;
				case 5: maxChequeNum = 99999; break;
				case 6: maxChequeNum = 999999; break;
				case 7: maxChequeNum = 9999999; break;
				case 8: maxChequeNum = 99999999; break;
				case 9: maxChequeNum = 999999999; break;
				default:
					if( chequeNumDigits &gt; 0 ) {
						throw CFLib.getDefaultExceptionFactory().newArgumentOverflowException( getClass(),
							S_ProcName,
							0,
							"Account.ChequeNumDigits",
							(int)chequeNumDigits,
							9 );
					}
					else {
						throw CFLib.getDefaultExceptionFactory().newArgumentUnderflowException( getClass(),
							S_ProcName,
							0,
							"Account.ChequeNumDigits",
							(int)chequeNumDigits,
							1 );
					}
			}

			int nextChequeNum = objAccount.getRequiredNextChequeNum();
			if( nextChequeNum &gt; maxChequeNum ) {
				nextChequeNum = 1;
				editAccount.setRequiredNextChequeNum( 2 );
			}
			else {
				editAccount.setRequiredNextChequeNum( nextChequeNum + 1 );
			}
			
			NumberFormat fmtChequeNum = NumberFormat.getInstance();
			fmtChequeNum.setMaximumFractionDigits( 0 );
			fmtChequeNum.setMinimumFractionDigits( 0 );
			fmtChequeNum.setMaximumIntegerDigits( chequeNumDigits );
			fmtChequeNum.setMinimumIntegerDigits( chequeNumDigits );
			String formattedChequeNum = fmtChequeNum.format( (long)nextChequeNum );
			editObj.setRequiredChequeNumber( formattedChequeNum );
		}
		BigDecimal total = new BigDecimal( "0.0" );
		BigDecimal addme;
		I$DefSchemaName$ChequeDetailObj chequeDetail;
		List&lt;I$DefSchemaName$ChequeDetailObj&gt; chequeDetailList = editObj.getOptionalComponentsDetail( true );
		if( chequeDetailList.size() &gt; 0 ) {
			Iterator&lt;I$DefSchemaName$ChequeDetailObj&gt; iterChequeDetail = chequeDetailList.iterator();
			while( iterChequeDetail.hasNext() ) {
				chequeDetail = iterChequeDetail.next();
				addme = chequeDetail.getRequiredAmountPaid();
				total = total.add( addme );
			}
			editObj.setOptionalAmount( total );
		}
		else {
			total = editObj.getOptionalAmount();
			if( total == null ) {
				throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
					S_ProcName,
					0,
					"editObj.getOptionalAmount" );
			}
		}
		editAccount.setRequiredBalance( editAccount.getRequiredBalance().subtract( total ) );
		editAccount.update();
		I$DefSchemaName$LedgerObj ledger = schemaObj.getLedgerTableObj().newInstance();
		I$DefSchemaName$LedgerEditObj editLedger = ledger.beginEdit();
		editLedger.setRequiredContainerAccount( editObj.getRequiredContainerAccount() );
		editLedger.setRequiredEntryStamp( Calendar.getInstance() );
		if( isEFT ) {
			editLedger.setRequiredDescription( "EFT " + editObj.getRequiredChequeNumber() );
		}
		else {
			editLedger.setRequiredDescription( "Cheque " + editObj.getRequiredChequeNumber() );
		}
		editLedger.setOptionalDebit( total );
		editLedger.setOptionalCredit( null );
		editLedger.setOptionalLookupConvertCcy( null );
		editLedger.setOptionalConvertedAmount( null );
		editLedger.setOptionalLookupXfrAccount( null );
		editLedger.setRequiredBalance( editAccount.getRequiredBalance() );
		ledger = editLedger.create();
		editObj.setOptionalLookupLedger( ledger );
		editObj.update();
		return( editObj.getChequeBuff() );
</JavaMethodBody>
		<CPlusMethodBody>
		static const std::string S_ProcName( "finalizeCheque" );
		throw cflib::CFLib::getDefaultExceptionFactory()-&gt;newNotImplementedYetException( CLASS_NAME, S_ProcName );
</CPlusMethodBody>
		</ServerObjFunc>
	</TableAddendum>

	<TableAddendum FromTable="Deposit">
		<ServerObjFunc Name="FinalizeDeposit"
				IsInstanceMethod="true"
				DefaultVisibility="true"
				ReturnTable="Deposit" >
<JavaMethodBody>		final String S_ProcName = "finalizeDeposit";
		if( schemaObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				1,
				"schemaObj" );
		}
		if( obj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				2,
				"obj" );
		}
		I$DefSchemaName$DepositEditObj editObj = obj.beginEdit();
		if( editObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj" );
		}
		I$DefSchemaName$AccountEditObj editAccount = editObj.getRequiredContainerAccount().beginEdit();
		if( editAccount == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editAccount" );
		}

		Calendar currentDate = Calendar.getInstance();
		currentDate.set( Calendar.HOUR_OF_DAY, 0 );
		currentDate.set( Calendar.MINUTE, 0 );
		currentDate.set( Calendar.SECOND, 0 );
		currentDate.set( Calendar.MILLISECOND, 0 );
		editObj.setRequiredDepositDate( currentDate );

		I$DefSchemaName$AccountObj objAccount = editAccount.getOrig();

		BigDecimal total = new BigDecimal( "0.0" );
		BigDecimal addme;
		I$DefSchemaName$DepositDetailObj chequeDetail;
		List&lt;I$DefSchemaName$DepositDetailObj&gt; chequeDetailList = editObj.getOptionalComponentsDetail( true );
		if( chequeDetailList.size() > 0 ) {
			Iterator&lt;I$DefSchemaName$DepositDetailObj&gt; iterDepositDetail = chequeDetailList.iterator();
			while( iterDepositDetail.hasNext() ) {
				chequeDetail = iterDepositDetail.next();
				addme = chequeDetail.getRequiredAmountPaid();
				total = total.add( addme );
			}
			editObj.setOptionalAmount( total );
		}
		else {
			total = editObj.getOptionalAmount();
			if( total == null ) {
				throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
					S_ProcName,
					0,
					"editObj.getOptionalAmount" );
			}
		}
		editAccount.setRequiredBalance( editAccount.getRequiredBalance().add( total ) );
		editAccount.update();
		I$DefSchemaName$LedgerObj ledger = schemaObj.getLedgerTableObj().newInstance();
		I$DefSchemaName$LedgerEditObj editLedger = ledger.beginEdit();
		editLedger.setRequiredContainerAccount( editObj.getRequiredContainerAccount() );
		editLedger.setRequiredEntryStamp( Calendar.getInstance() );
		editLedger.setRequiredDescription( "Deposit " + editObj.getRequiredDescription() );
		editLedger.setOptionalDebit( null );
		editLedger.setOptionalCredit( total );
		editLedger.setOptionalLookupConvertCcy( null );
		editLedger.setOptionalConvertedAmount( null );
		editLedger.setOptionalLookupXfrAccount( null );
		editLedger.setRequiredBalance( editAccount.getRequiredBalance() );
		ledger = editLedger.create();
		editObj.setOptionalLookupLedger( ledger );
		editObj.update();
		return( editObj.getDepositBuff() );
</JavaMethodBody>
		<CPlusMethodBody>
		static const std::string S_ProcName( "finalizeDeposit" );
		throw cflib::CFLib::getDefaultExceptionFactory()-&gt;newNotImplementedYetException( CLASS_NAME, S_ProcName );
</CPlusMethodBody>
		</ServerObjFunc>
	</TableAddendum>

	<TableAddendum FromTable="Fee">
		<ServerObjFunc Name="FinalizeFee"
				IsInstanceMethod="true"
				DefaultVisibility="true"
				ReturnTable="Fee" >
			<JavaMethodBody>return( null );</JavaMethodBody>
		<CPlusMethodBody>
		static const std::string S_ProcName( "finalizeFee" );
		throw cflib::CFLib::getDefaultExceptionFactory()-&gt;newNotImplementedYetException( CLASS_NAME, S_ProcName );
</CPlusMethodBody>
		</ServerObjFunc>
	</TableAddendum>

	<TableAddendum FromTable="Invoice">
		<ServerObjFunc Name="FinalizeInvoice"
				IsInstanceMethod="true"
				DefaultVisibility="true"
				ReturnTable="Invoice" >
<JavaMethodBody>		final String S_ProcName = "finalizeInvoice";
		if( schemaObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				1,
				"schemaObj" );
		}
		if( obj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				2,
				"obj" );
		}
		I$DefSchemaName$InvoiceEditObj editObj = obj.beginEdit();
		if( editObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj" );
		}
		I$DefSchemaName$AccountEditObj editAccount = editObj.getRequiredContainerAccount().beginEdit();
		if( editAccount == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editAccount" );
		}

		Calendar currentDate = Calendar.getInstance();
		currentDate.set( Calendar.HOUR_OF_DAY, 0 );
		currentDate.set( Calendar.MINUTE, 0 );
		currentDate.set( Calendar.SECOND, 0 );
		currentDate.set( Calendar.MILLISECOND, 0 );
		editObj.setRequiredInvoiceDate( currentDate );

		short invoiceNumDigits = editAccount.getRequiredInvoiceNumDigits();
		int maxInvoiceNum;
		switch( invoiceNumDigits ) {
			case 1: maxInvoiceNum = 9; break;
			case 2: maxInvoiceNum = 99; break;
			case 3: maxInvoiceNum = 999; break;
			case 4: maxInvoiceNum = 9999; break;
			case 5: maxInvoiceNum = 99999; break;
			case 6: maxInvoiceNum = 999999; break;
			case 7: maxInvoiceNum = 9999999; break;
			case 8: maxInvoiceNum = 99999999; break;
			case 9: maxInvoiceNum = 999999999; break;
			default:
				if( invoiceNumDigits &gt; 0 ) {
					throw CFLib.getDefaultExceptionFactory().newArgumentOverflowException( getClass(),
						S_ProcName,
						0,
						"Account.InvoiceNumDigits",
						(int)invoiceNumDigits,
						9 );
				}
				else {
					throw CFLib.getDefaultExceptionFactory().newArgumentUnderflowException( getClass(),
						S_ProcName,
						0,
						"Account.InvoiceNumDigits",
						(int)invoiceNumDigits,
						1 );
				}
		}

		int nextInvoiceNum = editAccount.getRequiredNextInvoiceNum();
		if( nextInvoiceNum &gt; maxInvoiceNum ) {
			nextInvoiceNum = 1;
			editAccount.setRequiredNextInvoiceNum( 2 );
		}
		else {
			editAccount.setRequiredNextInvoiceNum( nextInvoiceNum + 1 );
		}
			
		NumberFormat fmtInvoiceNum = NumberFormat.getInstance();
		fmtInvoiceNum.setMaximumFractionDigits( 0 );
		fmtInvoiceNum.setMinimumFractionDigits( 0 );
		fmtInvoiceNum.setMaximumIntegerDigits( invoiceNumDigits );
		fmtInvoiceNum.setMinimumIntegerDigits( invoiceNumDigits );
		String formattedInvoiceNum = fmtInvoiceNum.format( (long)nextInvoiceNum );
		editObj.setRequiredIdCode( formattedInvoiceNum );

		BigDecimal total = new BigDecimal( "0.0" );
		BigDecimal addme;
		I$DefSchemaName$InvoiceItemObj invoiceItem;
		List&lt;I$DefSchemaName$InvoiceItemObj&gt; invoiceItemList = editObj.getRequiredComponentsInvoiceItem( true );
		if( invoiceItemList.size() &gt; 0 ) {
			Iterator&lt;I$DefSchemaName$InvoiceItemObj&gt; iterInvoiceItem = invoiceItemList.iterator();
			while( iterInvoiceItem.hasNext() ) {
				invoiceItem = iterInvoiceItem.next();
				addme = invoiceItem.getRequiredAmountInvoiced();
				total = total.add( addme );
			}
			editObj.setOptionalAmount( total );
		}
		else {
			total = editObj.getOptionalAmount();
			if( total == null ) {
				throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
					S_ProcName,
					0,
					"editObj.getOptionalAmount" );
			}
		}
		editAccount.setRequiredBalance( editAccount.getRequiredBalance().add( total ) );
		editAccount.update();
		I$DefSchemaName$LedgerObj ledger = schemaObj.getLedgerTableObj().newInstance();
		I$DefSchemaName$LedgerEditObj editLedger = ledger.beginEdit();
		editLedger.setRequiredContainerAccount( editObj.getRequiredContainerAccount() );
		editLedger.setRequiredEntryStamp( Calendar.getInstance() );
		editLedger.setRequiredDescription( "Invoice " + editObj.getRequiredDescription() );
		editLedger.setOptionalDebit( null );
		editLedger.setOptionalCredit( total );
		editLedger.setOptionalLookupConvertCcy( null );
		editLedger.setOptionalConvertedAmount( null );
		editLedger.setOptionalLookupXfrAccount( null );
		editLedger.setRequiredBalance( editAccount.getRequiredBalance() );
		ledger = editLedger.create();
		editObj.setOptionalLookupLedger( ledger );
		editObj.update();
		return( editObj.getInvoiceBuff() );
</JavaMethodBody>
		<CPlusMethodBody>
		static const std::string S_ProcName( "finalizeInvoice" );
		throw cflib::CFLib::getDefaultExceptionFactory()-&gt;newNotImplementedYetException( CLASS_NAME, S_ProcName );
</CPlusMethodBody>
		</ServerObjFunc>
	</TableAddendum>

	<TableAddendum FromTable="Payment">
		<ServerObjFunc Name="FinalizePayment"
				IsInstanceMethod="true"
				DefaultVisibility="true"
				ReturnTable="Payment" >
<JavaMethodBody>		final String S_ProcName = "finalizePayment";
		if( schemaObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				1,
				"schemaObj" );
		}
		if( obj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				2,
				"obj" );
		}
		I$DefSchemaName$PaymentEditObj editObj = obj.beginEdit();
		if( editObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj" );
		}
		I$DefSchemaName$AccountEditObj editAccount = editObj.getRequiredContainerAccount().beginEdit();
		if( editAccount == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editAccount" );
		}

		Calendar currentDate = Calendar.getInstance();
		currentDate.set( Calendar.HOUR_OF_DAY, 0 );
		currentDate.set( Calendar.MINUTE, 0 );
		currentDate.set( Calendar.SECOND, 0 );
		currentDate.set( Calendar.MILLISECOND, 0 );
		editObj.setRequiredPaymentDate( currentDate );

		BigDecimal total = new BigDecimal( "0.0" );
		BigDecimal addme;
		I$DefSchemaName$PaymentDetailObj paymentDetail;
		List&lt;I$DefSchemaName$PaymentDetailObj&gt; paymentDetailList = editObj.getOptionalComponentsDetail( true );
		if( paymentDetailList.size() &gt; 0 ) {
			Iterator&lt;I$DefSchemaName$PaymentDetailObj&gt; iterPaymentDetail = paymentDetailList.iterator();
			while( iterPaymentDetail.hasNext() ) {
				paymentDetail = iterPaymentDetail.next();
				addme = paymentDetail.getRequiredAmountApplied();
				total = total.add( addme );
			}
			editObj.setOptionalAmount( total );
		}
		else {
			total = editObj.getOptionalAmount();
			if( total == null ) {
				throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
					S_ProcName,
					0,
					"editObj.getOptionalAmount" );
			}
		}
		editAccount.setRequiredBalance( editAccount.getRequiredBalance().subtract( total ) );
		editAccount.update();
		I$DefSchemaName$LedgerObj ledger = schemaObj.getLedgerTableObj().newInstance();
		I$DefSchemaName$LedgerEditObj editLedger = ledger.beginEdit();
		editLedger.setRequiredContainerAccount( editObj.getRequiredContainerAccount() );
		editLedger.setRequiredEntryStamp( Calendar.getInstance() );
		editLedger.setRequiredDescription( "Payment " + editObj.getRequiredDescription() );
		editLedger.setOptionalDebit( total );
		editLedger.setOptionalCredit( null );
		editLedger.setOptionalLookupConvertCcy( null );
		editLedger.setOptionalConvertedAmount( null );
		editLedger.setOptionalLookupXfrAccount( null );
		editLedger.setRequiredBalance( editAccount.getRequiredBalance() );
		ledger = editLedger.create();
		editObj.setOptionalLookupLedger( ledger );
		editObj.update();
		return( editObj.getPaymentBuff() );
</JavaMethodBody>
		<CPlusMethodBody>
		static const std::string S_ProcName( "finalizePayment" );
		throw cflib::CFLib::getDefaultExceptionFactory()-&gt;newNotImplementedYetException( CLASS_NAME, S_ProcName );
</CPlusMethodBody>
		</ServerObjFunc>
	</TableAddendum>

	<TableAddendum FromTable="PurchaseOrder">
		<ServerObjFunc Name="PlaceOrder"
				Description="Place the order"
				IsInstanceMethod="true"
				DefaultVisibility="true"
				ReturnTable="PurchaseOrder" >
<JavaMethodBody>		final String S_ProcName = &quot;placeOrder&quot;;
		if( schemaObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				1,
				"schemaObj" );
		}
		if( obj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				2,
				"obj" );
		}
		I$DefSchemaName$PurchaseOrderEditObj editObj = obj.beginEdit();
		if( editObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj" );
		}
		I$DefSchemaName$AccountEditObj editAccount = editObj.getRequiredContainerAccount().beginEdit();
		if( editAccount == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editAccount" );
		}
		if( obj.getOptionalOrderPlaced() != null ) {
			throw CFLib.getDefaultExceptionFactory().newUsageException( getClass(),
				S_ProcName,
				&quot;Order was already placed&quot; );
		}
		if( obj.getRequiredComponentsPOItem().size() &lt;= 0 ) {
			throw CFLib.getDefaultExceptionFactory().newUsageException( getClass(),
				S_ProcName,
				&quot;Cannot place empty order&quot; );
		}

		editObj.setOptionalOrderPlaced( Calendar.getInstance() );

		short purchaseOrderNumDigits = editAccount.getRequiredPurchaseOrderNumDigits();
		int maxPurchaseOrderNum;
		switch( purchaseOrderNumDigits ) {
			case 1: maxPurchaseOrderNum = 9; break;
			case 2: maxPurchaseOrderNum = 99; break;
			case 3: maxPurchaseOrderNum = 999; break;
			case 4: maxPurchaseOrderNum = 9999; break;
			case 5: maxPurchaseOrderNum = 99999; break;
			case 6: maxPurchaseOrderNum = 999999; break;
			case 7: maxPurchaseOrderNum = 9999999; break;
			case 8: maxPurchaseOrderNum = 99999999; break;
			case 9: maxPurchaseOrderNum = 999999999; break;
			default:
				if( purchaseOrderNumDigits &gt; 0 ) {
					throw CFLib.getDefaultExceptionFactory().newArgumentOverflowException( getClass(),
						S_ProcName,
						0,
						"Account.PurchaseOrderNumDigits",
						(int)purchaseOrderNumDigits,
						9 );
				}
				else {
					throw CFLib.getDefaultExceptionFactory().newArgumentUnderflowException( getClass(),
						S_ProcName,
						0,
						"Account.PurchaseOrderNumDigits",
						(int)purchaseOrderNumDigits,
						1 );
				}
		}

		int nextPurchaseOrderNum = editAccount.getRequiredNextPurchaseOrderNum();
		if( nextPurchaseOrderNum &gt; maxPurchaseOrderNum ) {
			nextPurchaseOrderNum = 1;
			editAccount.setRequiredNextPurchaseOrderNum( 2 );
		}
		else {
			editAccount.setRequiredNextPurchaseOrderNum( nextPurchaseOrderNum + 1 );
		}
			
		NumberFormat fmtPurchaseOrderNum = NumberFormat.getInstance();
		fmtPurchaseOrderNum.setMaximumFractionDigits( 0 );
		fmtPurchaseOrderNum.setMinimumFractionDigits( 0 );
		fmtPurchaseOrderNum.setMaximumIntegerDigits( purchaseOrderNumDigits );
		fmtPurchaseOrderNum.setMinimumIntegerDigits( purchaseOrderNumDigits );
		String formattedPurchaseOrderNum = fmtPurchaseOrderNum.format( (long)nextPurchaseOrderNum );
		editObj.setRequiredIdCode( formattedPurchaseOrderNum );

		editObj.update();
		editObj.endEdit();
		return( obj.getBuff() );
</JavaMethodBody>
		<CPlusMethodBody>
		static const std::string S_ProcName( "placeOrder" );
		throw cflib::CFLib::getDefaultExceptionFactory()-&gt;newNotImplementedYetException( CLASS_NAME, S_ProcName );
</CPlusMethodBody>
		</ServerObjFunc>
	</TableAddendum>

	<TableAddendum FromTable="Transfer">
		<ServerObjFunc Name="FinalizeTransfer"
				IsInstanceMethod="true"
				DefaultVisibility="true"
				ReturnTable="Transfer" >
<JavaMethodBody>		final String S_ProcName = "finalizeTransfer";
		if( schemaObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				1,
				"schemaObj" );
		}
		if( obj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				2,
				"obj" );
		}
		I$DefSchemaName$TransferEditObj editObj = obj.beginEdit();
		if( editObj == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj" );
		}
		I$DefSchemaName$AccountEditObj editAccount = editObj.getRequiredContainerAccount().beginEdit();
		if( editAccount == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editAccount" );
		}

		I$DefSchemaName$AccountObj toAccount = editObj.getRequiredParentToAccount();
		if( toAccount == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj.ToAccount" );
		}

		Calendar currentDate = Calendar.getInstance();
		currentDate.set( Calendar.HOUR_OF_DAY, 0 );
		currentDate.set( Calendar.MINUTE, 0 );
		currentDate.set( Calendar.SECOND, 0 );
		currentDate.set( Calendar.MILLISECOND, 0 );
		editObj.setRequiredTransferDate( currentDate );

		I$DefSchemaName$AccountObj objAccount = editAccount.getOrig();
		short transferNumDigits = objAccount.getRequiredTransferNumDigits();
		int maxTransferNum;
		switch( transferNumDigits ) {
			case 1: maxTransferNum = 9; break;
			case 2: maxTransferNum = 99; break;
			case 3: maxTransferNum = 999; break;
			case 4: maxTransferNum = 9999; break;
			case 5: maxTransferNum = 99999; break;
			case 6: maxTransferNum = 999999; break;
			case 7: maxTransferNum = 9999999; break;
			case 8: maxTransferNum = 99999999; break;
			case 9: maxTransferNum = 999999999; break;
			default:
				if( transferNumDigits &gt; 0 ) {
					throw CFLib.getDefaultExceptionFactory().newArgumentOverflowException( getClass(),
						S_ProcName,
						0,
						"Account.TransferNumDigits",
						(int)transferNumDigits,
						9 );
				}
				else {
					throw CFLib.getDefaultExceptionFactory().newArgumentUnderflowException( getClass(),
						S_ProcName,
						0,
						"Account.TransferNumDigits",
						(int)transferNumDigits,
						1 );
				}
		}

		int nextTransferNum = objAccount.getRequiredNextTransferNum();
		if( nextTransferNum &gt; maxTransferNum ) {
			nextTransferNum = 1;
			editAccount.setRequiredNextTransferNum( 2 );
		}
		else {
			editAccount.setRequiredNextTransferNum( nextTransferNum + 1 );
		}
			
		NumberFormat fmtTransferNum = NumberFormat.getInstance();
		fmtTransferNum.setMaximumFractionDigits( 0 );
		fmtTransferNum.setMinimumFractionDigits( 0 );
		fmtTransferNum.setMaximumIntegerDigits( transferNumDigits );
		fmtTransferNum.setMinimumIntegerDigits( transferNumDigits );
		String formattedTransferNum = fmtTransferNum.format( (long)nextTransferNum );
		editObj.setRequiredTransferNumber( formattedTransferNum );

		editObj.setRequiredDescription( "Transfer " + formattedTransferNum + " to Account " + toAccount.getRequiredAccountCode() + " " + toAccount.getRequiredDescription() );

		BigDecimal total = editObj.getOptionalAmount();
		if( total == null ) {
			throw CFLib.getDefaultExceptionFactory().newNullArgumentException( getClass(),
				S_ProcName,
				0,
				"editObj.getOptionalAmount" );
		}
		editAccount.setRequiredBalance( editAccount.getRequiredBalance().subtract( total ) );
		editAccount.update();
		editAccount.endEdit();

		I$DefSchemaName$LedgerObj ledger = schemaObj.getLedgerTableObj().newInstance();
		I$DefSchemaName$LedgerEditObj editLedger = ledger.beginEdit();
		editLedger.setRequiredContainerAccount( editObj.getRequiredContainerAccount() );
		editLedger.setRequiredEntryStamp( Calendar.getInstance() );
		editLedger.setRequiredDescription( editObj.getRequiredDescription() );
		editLedger.setOptionalDebit( total );
		editLedger.setOptionalCredit( null );
		editLedger.setOptionalLookupConvertCcy( null );
		editLedger.setOptionalConvertedAmount( null );
		editLedger.setOptionalLookupXfrAccount( null );
		editLedger.setRequiredBalance( editAccount.getRequiredBalance() );
		ledger = editLedger.create();
		editObj.setOptionalLookupLedger( ledger );
		editObj.update();
		editObj.endEdit();

		ledger = schemaObj.getLedgerTableObj().newInstance();
		editLedger = ledger.beginEdit();
		editLedger.setRequiredContainerAccount( toAccount );
		editLedger.setRequiredEntryStamp( Calendar.getInstance() );
		editLedger.setRequiredDescription( "Transfer " + formattedTransferNum + " from Account " + objAccount.getRequiredAccountCode() + " " + objAccount.getRequiredDescription() );
		editLedger.setOptionalDebit( null );
		editLedger.setOptionalCredit( total );
		editLedger.setOptionalLookupConvertCcy( null );
		editLedger.setOptionalConvertedAmount( null );
		editLedger.setOptionalLookupXfrAccount( null );
		editLedger.setRequiredBalance( editAccount.getOrig().getRequiredBalance() );
		ledger = editLedger.create();

		return( editObj.getOrig().getTransferBuff() );
</JavaMethodBody>
		<CPlusMethodBody>
		static const std::string S_ProcName( "finalizeTransfer" );
		throw cflib::CFLib::getDefaultExceptionFactory()-&gt;newNotImplementedYetException( CLASS_NAME, S_ProcName );
</CPlusMethodBody>
		</ServerObjFunc>
	</TableAddendum>
</SchemaDef>
						</MinorVersion>
					</MajorVersion>
				</SubProject>
			</TopProject>
		</TopDomain>
	</Tld>
</MSSBam>
