forked from science-ation/science-ation
- Add a new data field for counting the number of tshirts of each size
- Add a system report that lists the number of tshirts of each size
This commit is contained in:
parent
d89c756427
commit
fcd6eedc1d
@ -143,6 +143,14 @@ $report_students_fields = array(
|
||||
'table' => "DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(students.dateofbirth)), '%Y')+0",
|
||||
'table_sort' => 'students.dateofbirth'),
|
||||
|
||||
'tshirt' => array(
|
||||
'name' => 'Student -- T-Shirt Size',
|
||||
'header' => 'T-Shirt',
|
||||
'width' => 0.55,
|
||||
'table' => 'students.tshirt',
|
||||
'value_map' => array ('none' => '', 'small' => 'Small', 'medium' => 'Medium',
|
||||
'large' => 'Large', 'xlarge' => 'X-Large')),
|
||||
|
||||
'title' => array(
|
||||
'name' => 'Project -- Title',
|
||||
'header' => 'Project Title',
|
||||
@ -313,14 +321,6 @@ $report_students_fields = array(
|
||||
'table' => 'registrations.status',
|
||||
'value_map' => array ('complete' => '', 'paymentpending' => 'No')),
|
||||
|
||||
'tshirt' => array(
|
||||
'name' => 'T-Shirt Size',
|
||||
'header' => 'T-Shirt',
|
||||
'width' => 0.55,
|
||||
'table' => 'students.tshirt',
|
||||
'value_map' => array ('none' => '', 'small' => 'Small', 'medium' => 'Medium',
|
||||
'large' => 'Large', 'xlarge' => 'X-Large')),
|
||||
|
||||
'awards' => array(
|
||||
'name' => 'Award -- Type + Name (warning: duplicates student for multiple awards!)',
|
||||
'header' => 'Award Name',
|
||||
@ -513,6 +513,13 @@ $report_students_fields = array(
|
||||
'table' => "GROUP_CONCAT(students.lastname, ',', students.firstname ORDER BY students.lastname SEPARATOR ':')",
|
||||
'group_by' => array('students.registrations_id')),
|
||||
|
||||
'special_tshirt_count' => array(
|
||||
'name' => 'Special -- T-Shirt Size Count',
|
||||
'header' => 'Count',
|
||||
'width' => 0.5,
|
||||
'table' => 'COUNT(*)',
|
||||
'group_by' => array('students.tshirt')),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
@ -1 +1 @@
|
||||
94
|
||||
95
|
||||
|
14
db/db.update.95.sql
Normal file
14
db/db.update.95.sql
Normal file
@ -0,0 +1,14 @@
|
||||
INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES
|
||||
('', '43', 'T-Shirt Size Count', 'A list of tshirt sizes (the blank entry is those students who have selected \"none\"), and the number of tshirts of each size.', 'The Grant Brothers', 'student');
|
||||
|
||||
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', 'pdf', 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, 'tshirt', '', 0, 0, 0, 0, 1, '', ' '),
|
||||
('', LAST_INSERT_ID(), 'col', 1, 'special_tshirt_count', '', 0, 0, 0, 0, 1, '', ' '),
|
||||
('', LAST_INSERT_ID(), 'sort', 0, 'tshirt', '', 0, 0, 0, 0, 1, '', ' ');
|
Loading…
x
Reference in New Issue
Block a user