Cash-Book Table

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

The id value is provided as by the system by means of auto increment. txtID is the ID, txtName the name or referrer of the voucher or expenditure provided by the user.

abcInOut specifies if it is an expense (out) or an income (in). txtCashBank defines the kind of cash flow – e.g. via bank or via cash. txtDistributor and txtTax define the usage and the tax category.

numAmount, numAmountDist, and numAmountTax hold the gross, the net, and the tax amount.

year, month, and day provide the voucher date.

template defines if the database entry should be used as templalte.

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="cashbook">
	<field name="id" type="I" size="8">
	  <KEY/>
	  <AUTOINCREMENT/>
	  <UNSIGNED/>
	</field>
	<field name="txtID" type="C" size="32">
	  <NOTNULL/>
	</field>
	<field name="txtName" type="C" size="255">
	  <NOTNULL/>
	</field>
	<field name="abcInOut" type="C" size="3">
	  <NOTNULL/>
	</field>
	<field name="txtCashBank" type="C" size="32">
	  <NOTNULL/>
	</field>
	<field name="numAmount" type="N" size="12.6">
	  <NOTNULL/>
	</field>
	<field name="txtDistributor" type="C" size="32">
	  <NOTNULL/>
	</field>
	<field name="numAmountDist" type="N" size="12.6">
	  <NOTNULL/>
	</field>
	<field name="txtTax" type="C" size="32">
	  <NOTNULL/>
	</field>
	<field name="numAmountTax" type="N" size="12.6">
	  <NOTNULL/>
	</field>
	<field name="year" type="C" size="32">
	  <NOTNULL/>
	</field>
	<field name="month" type="C" size="32">
	  <NOTNULL/>
	</field>
	<field name="day" type="C" size="32">
	  <NOTNULL/>
	</field>
	<field name="template" type="L">
	  <NOTNULL/>
	</field>
	<field name="who" type="C" size="255">
	  <NOTNULL/>
	</field>
	<field name="lastModified" type="T">
	  <NOTNULL/>
	</field>
	<index name="year">
	  <col>year</col>
	</index>
	<index name="month">
	  <col>month</col>
	</index>
	<index name="day">
	  <col>day</col>
	</index>
  </table>
</schema>