Assets-Book Table

The assets-book tables hold the assets data of each client. Each client has its own assets-book table named “assets” prefixed with the client ID.

The id value is provided as by the system by means of auto increment. txtName is the description of the asset. txtVendor holds the data (name & address) of the vendor, numAmount the net price and purchaseDate the date of purchase of the asset.

numLifeTime and txtDeprMethod define the calculation method for the depreciation of the asset. The actual data e.g. the yearly depreciation or value of the asset is stored in data.

firstYear and lastYear is additional information derived from the depreciation data for faster database access.

who and lastModified provide a minimal log holding the email address and date of the last change.

<?xml version="1.0"?>
<schema version="0.3">
  <table name="assets">
	<field name="id" type="I" size="8">
	  <KEY/>
	  <AUTOINCREMENT/>
	  <UNSIGNED/>
	</field>
	<field name="txtName" type="C" size="255">
	  <NOTNULL/>
	</field>
	<field name="txtVendor" type="C" size="255">
	  <NOTNULL/>
	</field>
	<field name="numAmount" type="N" size="12.6">
	  <NOTNULL/>
	</field>
	<field name="numLifeTime" type="I1" size="3">
	  <UNSIGNED/>
	</field>
	<field name="txtDeprMethod" type="C" size="16">
	  <NOTNULL/>
	</field>
	<field name="firstYear" type="C" size="4">
	  <NOTNULL/>
	</field>
	<field name="lastYear" type="C" size="4">
	  <NOTNULL/>
	</field>
	<field name="purchaseDate" type="C" size="10">
	  <NOTNULL/>
	</field>	
	<field name="who" type="C" size="255">
	  <NOTNULL/>
	</field>
	<field name="data" type="X">
	  <NOTNULL/>
	</field>
	<field name="lastModified" type="T">
	  <NOTNULL/>
	</field>
	<index name="firstYear">
	  <col>firstYear</col>
	</index>
	<index name="lastYear">
	  <col>lastYear</col>
	</index>
  </table>
</schema>