<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Balance de comprobación</title>
</head>
<body>

    <table style="text-align: center">
      <tbody>
          <tr style="text-align: center">
              <th style="text-align: center" colspan="5">BALANCE DE COMPROBACIÓN <?php echo e(Help::date($fechai)); ?> AL <?php echo e(Help::date($fechaf)); ?></th>
          </tr>
      </tbody>
  </table>

    <table class="table">
        <thead>
          <tr>
            <th scope="col" width="14"> <strong>Codigo</strong></th>
            <th scope="col" width="35"> <strong>Cuenta</strong></th>
            <th scope="col" width="14"><strong>Debe</strong></th>
            <th scope="col" width="14"><strong>Haber</strong></th>
            <th scope="col" width="14"><strong>Saldo</strong></th>
          </tr>
        </thead>
        <tbody>
            <?php
                $debeTotal = 0;
                $haberTotal = 0;
            ?>
          <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $dt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          <tr>
             <td><?php echo e($dt['codigo_cuenta']); ?></td>

             <?php
             $debe = 0;
             $haber = 0;
             ?>
             <?php $__currentLoopData = $dt['groupeddata']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key2 => $t): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 <?php
                     $debe +=$t['debe'];
                     $haber +=$t['haber'];
                 ?>
             <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <td><?php echo e($t['cuenta_contable']['nombre_cuenta']); ?></td>

            <td style="text-align: right">
                <?php echo e(number_format($debe,2)); ?>

            </td>

            <td style="text-align: right">
              <?php echo e(number_format($haber,2)); ?>

            </td>

            <td style="text-align: right">
                <?php echo e(number_format($contabilidadHelp::saldoAcreedorDeudor($debe, $haber, 0, $t['cuenta_contable']['tipo_cuenta']),2)); ?>

              </td>
          </tr>
          <?php
              $debeTotal += $debe;
             $haberTotal += $haber;
          ?>
          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

          <tr>
            <td></td>
            <td></td>

            <td style="text-align: right">
                <strong><?php echo e(number_format($debeTotal ,2)); ?></strong>
            </td>
            <td style="text-align: right">
              <strong> <?php echo e(number_format($haberTotal,2)); ?></strong>
            </td>
            <td></td>
          </tr>
        </tbody>
      </table>

</body>
</html>
<?php /**PATH C:\laragon\www\sistema-contable-laravel\resources\views/contabilidad/reportes/BalanceComprobacionExcelRpt.blade.php ENDPATH**/ ?>