forked from CiviWare/org.agbu.annualgrantbudgets
convert to using a civix-generated entity
This commit is contained in:
11
xml/schema/CRM/AnnualGrantBudgets/GrantBudget.entityType.php
Normal file
11
xml/schema/CRM/AnnualGrantBudgets/GrantBudget.entityType.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
// This file declares a new entity type. For more details, see "hook_civicrm_entityTypes" at:
|
||||
// http://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference
|
||||
return array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'GrantBudget',
|
||||
'class' => 'CRM_AnnualGrantBudgets_DAO_GrantBudget',
|
||||
'table' => 'civicrm_grant_budget',
|
||||
),
|
||||
);
|
77
xml/schema/CRM/AnnualGrantBudgets/GrantBudget.xml
Normal file
77
xml/schema/CRM/AnnualGrantBudgets/GrantBudget.xml
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
|
||||
<table>
|
||||
<base>CRM/AnnualGrantBudgets</base>
|
||||
<class>GrantBudget</class>
|
||||
<name>civicrm_grant_budget</name>
|
||||
<comment>FIXME</comment>
|
||||
<log>true</log>
|
||||
|
||||
<field>
|
||||
<name>id</name>
|
||||
<type>int unsigned</type>
|
||||
<required>true</required>
|
||||
<comment>Unique GrantBudget ID</comment>
|
||||
<localizable>true</localizable>
|
||||
</field>
|
||||
<primaryKey>
|
||||
<name>id</name>
|
||||
<autoincrement>true</autoincrement>
|
||||
</primaryKey>
|
||||
|
||||
<field>
|
||||
<name>financial_type_id</name>
|
||||
<title>Financial Type Id</title>
|
||||
<type>int unsigned</type>
|
||||
<comment>FK to Financial Type</comment>
|
||||
<required>true</required>
|
||||
<import>true</import>
|
||||
<export>false</export>
|
||||
<localizable>false</localizable>
|
||||
<pseudoconstant>
|
||||
<table>civicrm_financial_type</table>
|
||||
<keyColumn>id</keyColumn>
|
||||
<labelColumn>name</labelColumn>
|
||||
</pseudoconstant>
|
||||
<html>
|
||||
<type>Select</type>
|
||||
</html>
|
||||
</field>
|
||||
<foreignKey>
|
||||
<name>financial_type_id</name>
|
||||
<table>civicrm_financial_type</table>
|
||||
<key>id</key>
|
||||
</foreignKey>
|
||||
|
||||
<field>
|
||||
<name>fiscal_year</name>
|
||||
<title>Fiscal Year</title>
|
||||
<type>int unsigned</type>
|
||||
<comment>Fiscal year</comment>
|
||||
<required>true</required>
|
||||
<import>true</import>
|
||||
<export>false</export>
|
||||
<localizable>false</localizable>
|
||||
<pseudoconstant>
|
||||
<callback>CRM_Grant_BAO_GrantBudget::getFiscalyear</callback>
|
||||
</pseudoconstant>
|
||||
<html>
|
||||
<type>Select</type>
|
||||
</html>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
<name>budget</name>
|
||||
<title>Grant Annual Budget</title>
|
||||
<type>decimal</type>
|
||||
<comment>Grant Annual Budget</comment>
|
||||
<required>true</required>
|
||||
<import>true</import>
|
||||
<export>true</export>
|
||||
<localizable>false</localizable>
|
||||
<default>0.00</default>
|
||||
<html>
|
||||
<type>Text</type>
|
||||
</html>
|
||||
</field>
|
||||
</table>
|
Reference in New Issue
Block a user