<?php
use Carbon\Carbon;
?>


<?php $__env->startSection('title', 'All Transactions'); ?>

<?php $__env->startPush('css'); ?>
    <!-- data tables -->
    <link href="<?php echo e(asset('admin/assets/plugins/datatables/plugins/bootstrap/dataTables.bootstrap4.min.css')); ?> " rel="stylesheet" type="text/css"/>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
    <div class="page-bar">
        <div class="page-title-breadcrumb">

        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card card-topline-red">
                <div class="card-head" style="text-align: center;">
                    <header>
                        All - Transactions
                    </header>
                </div>
                <div class="card-body ">
                    <div class="row p-b-20">
                        <div class="col-xl-4 col-md-6 col-12">
                            <div class="info-box bg-success">
                                <span class="info-box-icon push-bottom"><i class="material-icons">monetization_on</i></span>
                                <div class="info-box-content">
                                    <span class="info-box-text">Opening Balance</span>
                                    <span class="info-box-number"> <b><?php echo e(number_format($bank->sum('opening_balance'),2,'.',',')); ?> Tk</b></span>
                                </div>
                                <!-- /.info-box-content -->
                            </div>
                            <!-- /.info-box -->
                        </div>

                        <div class="col-xl-4 col-md-6 col-12">
                            <div class="info-box bg-purple">
                                <span class="info-box-icon push-bottom"><i class="material-icons">monetization_on</i></span>
                                <div class="info-box-content">
                                    <span class="info-box-text">Collections</span>
                                    <span class="info-box-number"> <b> <?php echo e(number_format($collections->sum('collection_amount'),2,'.',',')); ?> Tk</b></span>
                                </div>
                                <!-- /.info-box-content -->
                            </div>
                            <!-- /.info-box -->
                        </div>

                        <div class="col-xl-4 col-md-6 col-12">
                            <div class="info-box bg-b-black">
                                <span class="info-box-icon push-bottom"><i class="material-icons">monetization_on</i></span>
                                <div class="info-box-content">
                                    <span class="info-box-text">Current Balance</span>
                                    <span class="info-box-number"> <b> <?php echo e(number_format(($collections->sum('collection_amount') + $bank->sum('opening_balance')) - ($payments->sum('payment_amount') + $expenses->sum('amount')),2,'.',',')); ?> Tk</b></span>
                                </div>
                                <!-- /.info-box-content -->
                            </div>
                            <!-- /.info-box -->
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-xl-4 col-md-6 col-12">
                            <div class="info-box bg-orange">
                                <span class="info-box-icon push-bottom"><i class="material-icons">monetization_on</i></span>
                                <div class="info-box-content">
                                    <span class="info-box-text">Payments</span>
                                    <span class="info-box-number"> <b><?php echo e(number_format($payments->sum('payment_amount'),2,'.',',')); ?> Tk</b></span>
                                </div>
                                <!-- /.info-box-content -->
                            </div>
                            <!-- /.info-box -->
                        </div>
                        <div class="col-xl-4 col-md-6 col-12">
                            <div class="info-box bg-orange">
                                <span class="info-box-icon push-bottom"><i class="material-icons">monetization_on</i></span>
                                <div class="info-box-content">
                                    <span class="info-box-text">Expense</span>
                                    <span class="info-box-number"> <b><?php echo e(number_format($expenses->sum('amount'),2,'.',',')); ?> Tk</b></span>
                                </div>
                                <!-- /.info-box-content -->
                            </div>
                            <!-- /.info-box -->
                        </div>
                    </div>

                    <div class="row">
                        <?php echo $dataTable->table(); ?>

                    </div>

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

<?php $__env->startPush('js'); ?>
    <!-- data tables -->
    <script src="<?php echo e(asset('admin/assets/plugins/datatables/jquery.dataTables.min.js')); ?>" ></script>
    <script src="<?php echo e(asset('admin/assets/plugins/datatables/plugins/bootstrap/dataTables.bootstrap4.min.js')); ?>" ></script>
    <script src="<?php echo e(asset('admin/assets/js/buttons/dataTables.buttons.min.js')); ?>"></script>
    <script src="<?php echo e(asset('/vendor/datatables/buttons.server-side.js')); ?>"></script>
    <?php echo $dataTable->scripts(); ?>



    <!-- sweet aleart -->
    <script src="<?php echo e(asset('admin/assets/js/sweetalert.min.js')); ?>"></script>
<?php $__env->stopPush(); ?>


<?php echo $__env->make('template.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/forazitradersbd/public_html/resources/views/admin/bank/transactions.blade.php ENDPATH**/ ?>