- Add more fields to the committee report type

- Sort the report by the first field if no sort field is given
This commit is contained in:
dave 2007-12-24 19:20:01 +00:00
parent b47ac24ed1
commit 7ff0b4b104
2 changed files with 50 additions and 9 deletions

View File

@ -551,8 +551,8 @@ foreach($report_stock as $n=>$v) {
}
$x++;
}
/* We also want to select any column groupings, but we won't display them */
/* We also want to select any column groupings, but we won't display them */
foreach($report['group'] as $o=>$d) {
$f = $d['field'];
if(!isset($fieldname[$f])) {
@ -571,6 +571,10 @@ foreach($report_stock as $n=>$v) {
}
}
/* If no sort order is specified, make the first field the order */
if(count($report['sort']) == 0)
$report['sort'] = array(0 => array('field' => $report['col'][0]['field']));
foreach($report['sort'] as $o=>$d) {
$f = $d['field'];
if(!isset($fieldname[$f])) {

View File

@ -23,37 +23,74 @@
$report_committees_fields = array(
'name' => array(
'name' => 'Committee -- Full Name ',
'name' => 'Committee Member -- Full Name ',
'header' => 'Name',
'width' => 1.75,
'table' => "CONCAT(users.firstname, ' ', users.lastname)"),
'table' => "CONCAT(users.firstname, ' ', users.lastname)",
'table_sort' => 'users.lastname'),
'last_name' => array(
'name' => 'Committee Member -- Last Name',
'header' => 'Last Name',
'width' => 1.0,
'table' => 'users.lastname' ),
'first_name' => array(
'name' => 'Committee Member -- First Name',
'header' => 'First Name',
'width' => 1.0,
'table' => 'users.firstname' ),
'email' => array(
'name' => 'Committee -- Email',
'name' => 'Committee Member -- Email',
'header' => 'Email',
'width' => 2.0,
'table' => 'users.email'),
'phone_home' => array(
'name' => 'Committees -- Phone (Home)',
'name' => 'Committee Member -- Phone (Home)',
'header' => 'Phone(Home)',
'width' => 1,
'table' => 'users.phonehome'),
'phone_work' => array(
'name' => 'Committees -- Phone (Work)',
'name' => 'Committee Member -- Phone (Work)',
'header' => 'Phone(Work)',
'width' => 1.25,
'table' => 'users.phonework'),
'phone_cel' => array(
'name' => 'Committees -- Phone (Cel)',
'name' => 'Committee Member -- Phone (Cel)',
'header' => 'Phone(Cel)',
'width' => 1,
'table' => 'users.phonecell'),
'address' => array(
'name' => 'Committee Member -- Address Street',
'header' => 'Address',
'width' => 2.0,
'table' => "CONCAT(users.address, ' ', users.address2)"),
'city' => array(
'name' => 'Committee Member -- Address City',
'header' => 'City',
'width' => 1.5,
'table' => 'users.city' ),
'province' => array(
'name' => 'Committee Member -- Address Province',
'header' => 'Province',
'width' => 0.75,
'table' => 'users.province' ),
'postal' => array(
'name' => 'Committee Member -- Address Postal Code',
'header' => 'Postal',
'width' => 0.75,
'table' => 'users.postalcode' ),
'organization' => array(
'name' => 'Committees -- Organization',
'name' => 'Committee Member -- Organization',
'header' => 'Organization',
'width' => 2,
'table' => 'users.organization'),