<!DOCTYPE html>
<html lang="fr" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="<?=base_url();?>/assets/css/bootstrap.min.css">
  </head>
  <body>
    Tournée du <?=$date;?>
    <table class="">
      <?php foreach ($rdvs as $key_rdv => $rdv): ?>
        <tr>
          <td>
            <?php if ($rdv['petit_matin']>0): ?>
              <span class="text-dark p-0 px-1 m-3">Petit matin</span>
            <?php endif; ?>
            <?php if ($rdv['matin']>0): ?>
              <span class="text-dark p-0 px-1 m-3">Matin</span>
            <?php endif; ?>
            <?php if ($rdv['midi']>0): ?>
              <span class="text-dark p-0 px-1 m-3">Midi</span>
            <?php endif; ?>
            <?php if ($rdv['soir']>0): ?>
              <span class="text-dark p-0 px-1 m-3">Soir</span>
            <?php endif; ?>
          </td>
          <td>
            <?php if ($rdv['patient']['prescription']['acte']): ?>
             <span class="text-dark p-0 px-1 m-3"><?=$rdv['patient']['prescription']['acte']['abrev'];?></span>
            <?php endif; ?>
          </td>
          <td>
            <?=$rdv['patient']['nom'];?> <?=$rdv['patient']['prenom'];?>
          </td>
        </tr>
      <?php endforeach; ?>
    </table>
    <script type="text/javascript">
      window.print() ;
      window.close() ;
    </script>
  </body>
</html>
