<?php $__env->startSection('title','Transaction Details'); ?>
<?php $__env->startSection('content'); ?>
<h3 align="center">Détails des transactions bancaires</h3>

<section class="content">
    <div class="container-fluid">
        <!-- Filter Form -->
        <form method="POST" action="<?php echo e(route('transaction.filter')); ?>">
            <?php echo csrf_field(); ?>
            <div class="row mb-4">
                <div class="col-md-4">
                    <label for="agence">Agence</label>
                    <select name="agence" class="form-control select2bs4"  id="">
                        <option value="">Selectionnez l'agence</option>
                        <?php $__currentLoopData = $serveurs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $serveur): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($serveur->code_agence); ?>" <?php echo e(request()->get('agence') == $serveur->code_agence ?'selected' : ''); ?>><?php echo e($serveur->libelle_agence); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>
                <div class="col-md-4">
                    <label for="type_mouvement">Type Mouvement</label>
                    <select class="form-control select2bs4" name="type_mouvement" id="type_mouvement">
                        <option value="">Select Type</option>
                        <option value="client" <?php echo e(request()->get('type_mouvement') == 'client' ? 'selected' : ''); ?>>Client</option>
                        <option value="comptable" <?php echo e(request()->get('type_mouvement') == 'comptable' ? 'selected' : ''); ?>>Comptable</option>
                    </select>
                </div>
                <!-- select B2W or W2B -->
                <div class="col-md-4">
                    <label for="type_ops">Type de ops</label>
                    <select class="form-control select2bs4" name="type_ops" id="type_ops">
                        <option value="all">Select B2W/W2B</option>
                        <option value="B2W" <?php echo e(request()->get('type_ops') == 'B2W' ? 'selected' : ''); ?>>B2W</option>
                        <option value="W2B" <?php echo e(request()->get('type_ops') == 'W2B' ? 'selected' : ''); ?>>W2B</option>
                    </select>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <label for="date1">Date de début</label>
                    <input type="datetime-local" class="form-control" name="date1" id="date1" value="<?php echo e(request()->get('date1')); ?>">
                </div>
                <div class="col-md-6">
                    <label for="date2">Date de fin</label>
                    <input type="datetime-local" class="form-control" name="date2" id="date2" value="<?php echo e(request()->get('date2')); ?>">
                </div>

            </div>
            <button type="submit" class="btn btn-primary">Filtre</button>
        </form>

        <!-- Table of Transactions -->
        <div class="row">

            <?php if(isset($type_mouvement) && $type_mouvement === 'client'): ?>
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">Liste des transactions mouvements clients</h3>
                    </div>
                    <div class="card-body">
                        <table id="example1" class="table table-bordered table-striped">
                            <thead class="thead-dark">
                                <tr>
                                    <th>#</th>
                                    <th>Code Entreprise</th>
                                    <th>Numéro Mouvement</th>
                                    <th>Numéro Compte</th>
                                    <th>Code Produit</th>
                                    <th>Type Transaction</th>
                                    <th>Sous-type Transaction</th>
                                    <th>Code Système</th>
                                    <th>Date Mouvement</th>
                                    <th>Numéro Document</th>
                                    <th>État Mouvement</th>
                                    <th>Indicateur Appliqué</th>
                                    <th>Montant Mouvement</th>
                                    <th>Description Mouvement</th>
                                    <th>Système Source</th>
                                    <th>Numéro Mouvement Source</th>
                                    <th>Code Agence</th>
                                    <th>Code Utilisateur</th>
                                    <th>Référence</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__empty_1 = true; $__currentLoopData = $transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transaction): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr>
                                        <td><input type="checkbox"></td>
                                        <td><?php echo e($transaction->COD_EMPRESA); ?></td>
                                        <td><?php echo e($transaction->NUM_MOVIMIENTO); ?></td>
                                        <td><?php echo e($transaction->NUM_CUENTA); ?></td>
                                        <td><?php echo e($transaction->COD_PRODUCTO); ?></td>
                                        <td><?php echo e($transaction->TIP_TRANSACCION); ?></td>
                                        <td><?php echo e($transaction->SUBTIP_TRANSAC); ?></td>
                                        <td><?php echo e($transaction->COD_SISTEMA); ?></td>
                                        <td><?php echo e($transaction->FEC_MOVIMIENTO); ?></td>
                                        <td><?php echo e($transaction->NUM_DOCUMENTO); ?></td>
                                        <td><?php echo e($transaction->EST_MOVIMIENTO); ?></td>
                                        <td><?php echo e($transaction->IND_APL_CARGO); ?></td>
                                        <td><?php echo e($transaction->MON_MOVIMIENTO); ?></td>
                                        <td><?php echo e($transaction->DES_MOVIMIENTO); ?></td>
                                        <td><?php echo e($transaction->SISTEMA_FUENTE); ?></td>
                                        <td><?php echo e($transaction->NUM_MOV_FUENTE); ?></td>
                                        <td><?php echo e($transaction->COD_AGENCIA); ?></td>
                                        <td><?php echo e($transaction->COD_USUARIO); ?></td>
                                        <td><?php echo e($transaction->DES_REFERENCIA); ?></td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="19" align="center">Aucune transaction trouvée.</td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <?php elseif(isset($type_mouvement) && $type_mouvement === 'comptable'): ?>
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">Liste des transactions mouvements comptables</h3>
                    </div>
                    <div class="card-body">
                        <table id="example1" class="table table-bordered table-striped">
                            <thead class="thead-dark">
                                <tr>
                                    <th>Code Entreprise</th>
                                    <th>Numéro Codification</th>
                                    <th>Code Système</th>
                                    <th>Code Produit</th>
                                    <th>Type Transaction</th>
                                    <th>Sous-type Transaction</th>
                                    <th>Description Codification</th>
                                    <th>Type Codification</th>
                                    <th>Date Enregistrement</th>
                                    <th>État Codification</th>
                                    <th>Fréquence</th>
                                    <th>Jour Asiento</th>
                                    <th>Code Unité (Résumé)</th>
                                    <th>Numéro Ligne</th>
                                    <th>Compte Comptable</th>
                                    <th>Type Mouvement</th>
                                    <th>Montant Mouvement</th>
                                    <th>Détail</th>
                                    <th>Code Unité (Détail)</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__empty_1 = true; $__currentLoopData = $transactions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transaction): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr>
                                        <td><?php echo e($transaction->COD_EMPRESA); ?></td>
                                        <td><?php echo e($transaction->NUM_CODIFICACION); ?></td>
                                        <td><?php echo e($transaction->COD_SISTEMA); ?></td>
                                        <td><?php echo e($transaction->COD_PRODUCTO); ?></td>
                                        <td><?php echo e($transaction->TIP_TRANSACCION); ?></td>
                                        <td><?php echo e($transaction->SUBTIP_TRANSAC); ?></td>
                                        <td><?php echo e($transaction->DES_CODIFICACION); ?></td>
                                        <td><?php echo e($transaction->TIP_CODIFICACION); ?></td>
                                        <td><?php echo e($transaction->FEC_REGISTRO); ?></td>
                                        <td><?php echo e($transaction->EST_CODIFICACION); ?></td>
                                        <td><?php echo e($transaction->FRECUENCIA); ?></td>
                                        <td><?php echo e($transaction->DIA_ASIENTO); ?></td>
                                        <td><?php echo e($transaction->COD_UNIDAD_RESUMEN); ?></td>
                                        <td><?php echo e($transaction->NUM_LINEA); ?></td>
                                        <td><?php echo e($transaction->CUENTA_CONTABLE); ?></td>
                                        <td><?php echo e($transaction->TIP_MOVIMIENTO); ?></td>
                                        <td><?php echo e($transaction->MON_MOVIMIENTO); ?></td>
                                        <td><?php echo e($transaction->DETALLE); ?></td>
                                        <td><?php echo e($transaction->COD_UNIDAD_DETALLE); ?></td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="19" class="text-center">Aucune transaction trouvée.</td>
                                    </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <?php endif; ?>



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

<?php echo $__env->make('admin.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\b2w_caece\b2w_caece\resources\views/status/bank_inquery.blade.php ENDPATH**/ ?>