  
<?php $__env->startSection('content'); ?>
    <style>

        .form-check {
            display: inline-block;
            top: -15px;
            left: 13px;
        }
        .colorAmarillo{
            background-color: #ffc107!important;
            font-weight: 600;
        }
        .colorAmarillo .sorting_1{
            background-color: #ffc107!important;
            font-weight: 600;
        }
    </style>


        
        <div id="contenedor-dashboard" class="container-fluid">
            <div class="row ">
                <div class="col-md-12">
                    <h2>Reporte diario - Recibos de Caja</h2>
                </div>
            </div>
            <div class="col-md-12">
                <br>

                <table id="example2" class="display" style="width:100%">
                    <thead>
                        <tr>
                            <td>ID</td>
                            <td>Fecha</td>
                            <td>Cliente</td>
                            <td>Recibo de Caja #</td>
                            <td>Anticipo</td>
                            <td>Total</td>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $total=0;?>
                        <?php $__currentLoopData = $salidasAlmacen; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $op): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($op->id); ?></td>
                                <td><?php echo e(date('d/m/Y h:i:s', strtotime($op->created_at))); ?></td>
                                <td><?php echo e($op->cliente->nombre ?? ''); ?></td>
                                
                                <td><?php echo e($op->recibo_caja_numero ?? ''); ?></td>
                                <td>
                                    <?php if($op->saldo_favor>0): ?>
                                        -<?php echo e(number_format($op->saldo_favor, 2, '.', ',')); ?>

                                    <?php endif; ?>
                                    <?php if($op->nombre_imagen_recibo): ?>
                                    <a href="<?php echo e(asset('/recibo_caja/' . $op->nombre_imagen_recibo ?? '')); ?>"
                                        target='_blank'><i class="fas fa-camera"></i>
                                        <?php echo e($op->recibo_caja_numero ?? ''); ?></a>
                                    <?php else: ?>
                                        
                                    <?php endif; ?>
                                </td>
                                <td><?php echo e(number_format($op->id_total, 2, '.', ',')); ?></td>
                                <?php $total=$total+$op->id_total;?>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                    <tfoot>
                        <tr class="colorAmarillo">
                            <td>.TOTAL</td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td id="data1">
                                
                            </td>
                        </tr>
                    </tfoot>
                </table>
                <?php 
                        foreach ($totalhastahoy as $ophoy) {
                        ?>
                    <div class="alert alert-success"><b> Acumulado : Q &nbsp;
                        <?php
                            $total= $ophoy->total;
                            echo number_format($ophoy->total, 2, '.', ',');
                        }
                        ?>
                    </div>
    </div>
    </div>
    <script>
        jQuery.fn.dataTable.Api.register( 'sum()', function ( ) {
    return this.flatten().reduce( function ( a, b ) {
        if ( typeof a === 'string' ) {
            a = a.replace(/[^\d.-]/g, '') * 1;
        }
        if ( typeof b === 'string' ) {
            b = b.replace(/[^\d.-]/g, '') * 1;
        }
 
        return a + b;
    }, 0 );
  } );
         $('#example2').DataTable({
            "order":[[ 0, "desc" ]],
            "paging": false,
            "bFilter": false,
            dom: 'Bfrtip',
            buttons: [
                'excel', 'print'
            ],

            responsive:{
                breakpoints: [
                    { name: 'desktop', width: 920 },
                    { name: 'tablet',  width: 768 },
                    { name: 'fablet',  width: 668},
                    { name: 'phone',   width: 480 }
                ]
            },
            drawCallback: function () {
                var api = this.api();

                let dollarUSLocale = Intl.NumberFormat('en-IN');
                $( "#data1" ).html(
                    api.column( 5, {page:'current'} ).data().sum().toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')
                );
                
            }
            
        });
        $('.revertir_recibo').click(function(){
            var confirmar= confirm("Esta seguro de querer revertir la operación");
            if(confirmar){

            }else{
                return false;
            }
        })
        $("#fechaInicio").datepicker();
        $("#fechaFin").datepicker();



    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/devpwg5/laravelrp.com/resources/views/contabilidad/dashboard_recibos_dia.blade.php ENDPATH**/ ?>