diff --git a/booking.reports.inc b/booking.reports.inc index 996b5d9..4ef5af7 100644 --- a/booking.reports.inc +++ b/booking.reports.inc @@ -440,7 +440,7 @@ function booking_report_travel() { $header = array(); $header[] = array('data' => t('Edit'), 'field' => 'nid', 'sort' => 'asc'); $header[] = array('data' => t('Name'), 'field' => 'booking_lastname'); - $header[] = array('data' => t('Booking Status'), 'field' => 'booking_status'); + $header[] = array('data' => t('State'), 'field' => 'booking_state'); $header[] = array('data' => t('Transport Type'), 'field' => 'booking_transport_type'); $header[] = array('data' => t('Catching train from airport?'), 'field' => 'booking_transport_from_morriset_reqd'); $header[] = array('data' => t('Inbound Flight'), 'field' => 'booking_flightnum_inbound'); @@ -469,15 +469,16 @@ function booking_report_travel() { $this_row = array(); //define the row for this person - $this_row[] = $travel_link = l(t('Travel'), t('node/!id/edit', array('!id' => $person->tid))); + $this_row[] = $travel_link = l(t('Travel'), t('node/!id', array('!id' => $person->tid))); //$this_row[] = l(t('Edit !id', array('!id' => $person->nid)), t('node/!id/edit', array('!id' => $person->nid))); $this_row[] = l(t('!first !last', array('!first' => ucwords($person->booking_firstname), '!last' => ucwords($person->booking_lastname))), t('node/!id', array('!id' => $person->nid)) ); - $this_row[] = _booking_status_generate($person->booking_status); + $this_row[] = t('!state', array('!state' => $person->booking_state)); + //$this_row[] = _booking_status_generate($person->booking_status); //calculate the travel link - //if ($person->tid > 0) { + if ($person->tid > 0) { //$travel_link = l(t('Travel'), t('node/!id/edit', array('!id' => $person->tid))); $this_row[] = t('!transport', array('!transport' => $person->booking_transport_type)); $this_row[] = t('!train', array('!train' => $person->booking_transport_from_morriset_reqd == 1 ? 'Yes' : 'No')); @@ -489,8 +490,12 @@ function booking_report_travel() { $person->booking_flight_datetime_outbound == 0 ? '' : format_date($person->booking_flight_datetime_outbound, 'custom', 'd/m/Y H:i'))); $this_row[] = t('!beforeaccom', array('!beforeaccom' => $person->booking_accom_before_reqd == 1 ? 'Yes' : 'No')); $this_row[] = t('!afteraccom', array('!afteraccom' => $person->booking_accom_after_reqd == 1 ? 'Yes' : 'No')); - //} - + } + else { + for ($i = 0; $i < 8; $i++) { + $rows[] = "N/A"; + } + } $rows[] = $this_row; }