- $user = $period->user
- $nowISO = DateHelper::formatISO9075DateTime()

- $this->setPageTitle("Cedolino #{$period->id} - {$user->fullName} - {$nowISO}")

%hr
#paySlip
  .page-header
    %h1 Rapporto di servizio
  .row

    %h2 Dati personali

    %table.table.table-striped
      %tbody
        %tr
          %td Nome:
          %td= $user->first_name
          %td Cognome:
          %td= $user->last_name
        %tr
          %td Matricola:
          %td= $user->matriculation_number
          %td Inizio sessione:
          %td= $period->login_at->format(DateHelper::ISO9075_DATETIME)
        %tr
          %td Fine sessione:
          %td= $period->last_action_at->format(DateHelper::ISO9075_DATETIME)
          %td Tempo di sessione:
          %td= $period->duration->format("%h ORE %i MIN %s SEC")
        %tr
          %td Data di generazione report:
          %td= $nowISO
          %td Ente:
          %td TORINO
%hr
- foreach($paySlip->services as $service)
  - $events = $paySlip->getEventsByService($service)
  - $this->renderPartial('_service', array('service' => $service, 'events' => $events))
