<!DOCTYPE html>
<html lang="<?php echo e(app()->getLocale()); ?>">
<head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <meta name="description" content="Sistema Integrado">
    <meta name="description" content="Sistema Contable">
    <link media="all" rel="stylesheet" type="text/css" href="css/bootstrap.css">
    <title>Recaudo Diario Detallado</title>
</head>
<body>
    <table style="width: 100%; border-collapse: collapse; font-family: 'Arial', sans-serif;">
        <thead>
            <tr>
                <th style="text-align: center" colspan="3"><?php echo e($compania->razonsocial); ?></th>
            </tr>

            <tr>
                <th style="text-align: center" colspan="3"><?php echo e($compania->tipodoc." : ".$compania->numeroi); ?></th>
            </tr>
              <tr>
                <th style="text-align: center" colspan="3">Listado De Facturas Sin Recaudo</th>
            </tr>
            <tr style="font-size: 12px;">
                <th style="border: 1px solid #000">Numero Factura</th>
                <th style="border: 1px solid #000">Fecha Factura</th>
                <th style="border: 1px solid #000">Código Catastral</th>

            </tr>
        </thead>
        <tbody>
            <?php
            
          if ($checkCon==true) {
            $dataPredio = DB::table('gr_factura_predial as f')
                ->select(
                    'f.numero',
                    'f.fechafactura',
                    'pr.codigo_catastral'
                )
                ->leftJoin('gr_detalle_factura_predial as df', 'df.factura', '=', 'f.id_unico')
                ->leftJoin('gr_detalle_pago_predial as dp', 'dp.detallefactura', '=', 'df.id_unico')
                ->leftJoin('gr_pago_predial as p', 'p.id_unico', '=', 'dp.pago')
                ->leftJoin('gp_predio1 as pr', 'pr.id_unico', '=', 'f.predio')
                ->whereBetween('f.fechafactura', [$fechaI, $fechaF])
                ->groupBy('f.id_unico')
                ->get();
          }else{
             $dataPredio = DB::table('gr_factura_predial as f')
                ->select(
                    'f.numero',
                    'f.fechafactura',
                    'pr.codigo_catastral'
                )
                ->leftJoin('gr_detalle_factura_predial as df', 'df.factura', '=', 'f.id_unico')
                ->leftJoin('gr_detalle_pago_predial as dp', 'dp.detallefactura', '=', 'df.id_unico')
                ->leftJoin('gr_pago_predial as p', 'p.id_unico', '=', 'dp.pago')
                ->leftJoin('gp_predio1 as pr', 'pr.id_unico', '=', 'f.predio')
                ->whereBetween('f.fechafactura', [$fechaI, $fechaF])
                ->whereNull('dp.detallefactura')
                ->groupBy('f.id_unico')
                ->get();
          }
               
                ?>
                <?php $__currentLoopData = $dataPredio; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td style="font-size: 13px; border: 1px solid #000"><?php echo e($row->numero); ?></td>
                        <td style="font-size: 13px; border: 1px solid #000"><?php echo e($row->fechafactura); ?></td>
                        <td style="font-size: 13px; border: 1px solid #000"><?php echo e("'".$row->codigo_catastral."'"); ?></td>
                    </tr>

                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

            <tfoot>
            </tfoot>
        </tbody>
    </table>
</body>
</html>