<?php
  // ini_set('display_errors',1);
  // ini_set('display_startup_erros',1);
  // error_reporting(E_ALL);
  require '../../inc/conexao.php';
  require '../../inc/functions.php';
  require '../../api/api.php';
  require '../../api/pages/caixa.php';
?>
<div class="page">
  <div class="navbar">
    <div class="navbar-inner sliding">
      <div class="left">
        <a href="#" class="link back">
          <i class="icon icon-back"></i>
          <span class="ios-only">Voltar</span>
        </a>
      </div>
      <div class="title">Caixa</div>
      <div class="right">
        <a href="" style=" font-size: 11px; margin-right: 10px; "><?php echo $_SESSION["usuario"]["nome"]; ?></a>
      </div>
    </div>
  </div>
  <div class="page-content">
    <form action="" method="GET">
      <div class="list no-hairlines-md" style=" margin: 5px 0; ">
        <ul>
          <li>
            <div class="item-content item-input">
              <div class="item-inner">
                <div class="item-input-wrap">
                  <input type="text" name="date" placeholder="Selecione a data de início" id="cashierDate" class="calendario" value="<?php echo $_GET['date']; ?>" readonly="">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content item-input">
              <div class="item-inner">
                <div class="item-input-wrap">
                  <input type="text" name="enddate" placeholder="Selecione a data de fim" id="cashierEnddate" class="calendario2" value="<?php echo $_GET['enddate']; ?>" readonly="">
                </div>
              </div>
            </div>
          </li>
        </ul>
      </div>
      <a class="col button button-fill color-orange" onClick="filterCashierCoupons('caixa');">Filtrar</a>
    </form>

    <div class="block-title"><?php echo $api['dates']; ?></div>
    <div class="list">
      <ul>
        <li>
          <div class="item-content">
            <div class="item-inner">
              <div class="item-title">Entradas em aberto</div>
              <div class="item-after">R$<?php echo $api["open_entries"]; ?></div>
            </div>
          </div>
        </li>
        <li>
          <div class="item-content">
            <div class="item-inner">
              <div class="item-title">Entradas</div>
              <div class="item-after">R$<?php echo $api["entries"]; ?></div>
            </div>
          </div>
        </li>
        <li>
          <div class="item-content">
            <div class="item-inner">
              <div class="item-title">Saídas</div>
              <div class="item-after">R$<?php echo $api["rewards"]; ?></div>
            </div>
          </div>
        </li>
        <li>
          <div class="item-content">
            <div class="item-inner">
              <div class="item-title">Comissões</div>
              <div class="item-after">R$<?php echo $api["comissions"]; ?></div>
            </div>
          </div>
        </li>
        <li>
          <div class="item-content">
            <div class="item-inner">
              <div class="item-title">Lançamentos</div>
              <div class="item-after">R$<?php echo $api["lanc"]; ?></div>
            </div>
          </div>
        </li>
        <li>
          <div class="item-content">
            <div class="item-inner">
              <div class="item-title">Total</div>
              <div class="item-after">R$<?php echo $api["total"]; ?></div>
            </div>
          </div>
        </li>
      </ul>
    </div>
  </div>
</div>
