- Add sponsor information to the report generator awards report.

- Add a system report that dumps all sponsor info to a csv.
This commit is contained in:
dave 2007-12-13 19:56:44 +00:00
parent 2da2753758
commit 4c9d23e513
3 changed files with 83 additions and 2 deletions

View File

@ -59,6 +59,61 @@ $report_awards_fields = array(
'width' => 1.0,
'table' => 'award_types.type' ),
'sponsor_organization' => array(
'name' => 'Sponsor -- Organization',
'header' => 'Sponsor Organization',
'width' => 2.0,
'table' => 'award_sponsors.organization' ),
'sponsor_phone' => array(
'name' => 'Sponsor -- Phone',
'header' => 'Sp. Phone',
'width' => 1,
'table' => 'award_sponsors.phone' ),
'sponsor_fax' => array(
'name' => 'Sponsor -- Fax',
'header' => 'Sp. Fax',
'width' => 1,
'table' => 'award_sponsors.fax' ),
'sponsor_address' => array(
'name' => 'Sponsor -- Street Address',
'header' => 'Sponsor Address',
'width' => 2.0,
'table' => 'award_sponsors.address'),
'sponsor_city' => array(
'name' => 'Sponsor -- City',
'header' => 'Sp. City',
'width' => 1.5,
'table' => 'award_sponsors.city' ),
'sponsor_province' => array(
'name' => 'Sponsor -- Province',
'header' => 'Sp. Province',
'width' => 0.75,
'table' => 'award_sponsors.province_code' ),
'sponsor_postal' => array(
'name' => 'Sponsor -- Postal Code',
'header' => 'Sp. Postal',
'width' => 0.75,
'table' => 'award_sponsors.postalcode' ),
'sponsor_notes' => array(
'name' => 'Sponsor -- Notes',
'header' => 'Sponsor Notes',
'width' => 3,
'table' => 'award_sponsors.notes' ),
'sponsor_confirmed' => array(
'name' => 'Sponsor -- Confirmed',
'header' => 'Sp. Confirmed',
'width' => .5,
'table' => 'award_sponsors.confirmed',
'value_map' => array ('no' => 'No', 'yes' => 'Yes')),
'judgeteamname' => array(
'name' => 'Judging Team -- Name',
'header' => 'Judging Team',
@ -100,7 +155,11 @@ $report_awards_fields = array(
}
$q = " FROM
award_awards, judges_teams_awards_link, judges_teams,
award_awards
LEFT JOIN award_sponsors ON (
award_sponsors.id=award_awards.award_sponsors_id
AND award_sponsors.year='$year'),
judges_teams_awards_link, judges_teams,
award_types
$judges_join
WHERE

View File

@ -1 +1 @@
80
81

22
db/db.update.81.sql Normal file
View File

@ -0,0 +1,22 @@
INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES
('', '37', 'Awards -- Award Sponsor Information', 'Sponsor information for each award. This is a large report so the default format is CSV.', 'The Grant Brothers', 'award');
INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES
('', LAST_INSERT_ID(), 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''),
('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''),
('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''),
('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''),
('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''),
('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''),
('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''),
('', LAST_INSERT_ID(), 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 1, 'sponsor_organization', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 2, 'sponsor_phone', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 3, 'sponsor_fax', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 4, 'sponsor_address', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 5, 'sponsor_city', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 6, 'sponsor_province', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 7, 'sponsor_postal', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 8, 'sponsor_notes', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'col', 9, 'sponsor_confirmed', '', 0, 0, 0, 0, 0, '', ' '),
('', LAST_INSERT_ID(), 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', ' ');