<?php
    use Carbon\Carbon;
?>


<?php $__env->startSection('title', 'Company - details'); ?>

<?php $__env->startPush('css'); ?>
    <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="btn-group">
        <a style="color:white; font-size:15px; padding: 3px 7px 5px 0;" href="<?php echo e(route('admin.company.index')); ?>" id="addRow1" class="btn deepPink-bgcolor">
            <i style="color:white; font-size:12px; padding: 3px;" class="fa fa-arrow-left"></i>BACK 
        </a>
    </div>
    <div class="card">
        <div class="card-topline-aqua">
            <header></header>
        </div>
        <div class="white-box">
            <div class="row">
                <div class="col-xl-3 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">Total paid Invoice</span>
                            <span class="info-box-number"><?php echo e($company->paidInvoices()); ?></span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="info-box bg-warning">
                        <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">Total Due Invoice</span>
                            <span class="info-box-number"><?php echo e($company->dueInvoices()); ?></span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>
                <div class="col-xl-3 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">Total Due</span>
                            <span class="info-box-number"><?php echo e($company->totalDue()); ?></span>
                            <?php if( $company->totalDue() > 0 ): ?>
                                <br>
                                <u><a style="color:#fff;" href="<?php echo e(route('admin.company.due.pay.view',[$company->slug])); ?>">Pay</a></u>
                            <?php endif; ?>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="info-box bg-blue">
                        <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">Total Purchase</span>
                            <span class="info-box-number"><?php echo e($company->totalPurchase()); ?></span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>
            </div>
            <!-- Nav tabs -->
            <div class="p-rl-20">
                <ul class="nav customtab nav-tabs" role="tablist">
                    <li class="nav-item"><a href="#tab1" class="nav-link active"  data-toggle="tab" >Product Details</a></li>
                </ul>
            </div>
            <!-- Tab panes -->
            <div class="tab-content">
                <div class="tab-pane active fontawesome-demo" id="tab1">
                    <div id="biography" >
                        <div class="row">
                            <div class="col-md-3 col-6 b-r"> <strong>Company Name</strong>
                                <br>
                                <p class="text-muted"><?php echo e($company->name); ?></p>
                            </div>
                            <div class="col-md-3 col-6 b-r"> <strong>Representative Name</strong>
                                <br>
                                <p class="text-muted"><?php echo e($company->representative_name ?? 'N/A'); ?></p>
                            </div>
                            <div class="col-md-3 col-6 b-r"> <strong>Phone</strong>
                                <br>
                                <p class="text-muted"><?php echo e($company->phone1 ?? 'N/A'); ?></p>
                            </div>
                            <div class="col-md-3 col-6"> <strong>Alternative Phone</strong>
                                <br>
                                <p class="text-muted"><?php echo e($company->phone2 ?? 'N/A'); ?></p>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col-md-3 col-6 b-r"> <strong>Email</strong>
                                <br>
                                <p class="text-muted"><?php echo e($company->email ?? 'N/A'); ?></p>
                            </div>
                            <div class="col-md-3 col-6 b-r"> <strong>Opening Balance</strong>
                                <br>
                                <p class="text-muted"><?php echo e($company->opening_balance); ?></p>
                            </div>
                            <div class="col-md-3 col-6 b-r"> <strong>Starting Date</strong>
                                <br>
                                <p class="text-muted"><?php echo e($company->created_at->toDayDaTeTimeString()); ?></p>
                            </div>
                            <div class="col-md-3 col-6 b-r"> <strong>Status</strong>
                                <br>
                                <p class="text-muted"><?php echo e($company->status); ?></p>
                            </div>
                            
                        </div>
                        <hr>
                        
                        <h4 class="font-bold">Address</h4>
                        <hr>
                        <ul>
                            <?php echo e($company->address); ?>

                        </ul>
                        <br>
                        
                        <br>
                    </div>
                </div>
            </div>
            <form class="row" method="post" action="<?php echo e(route('admin.company.due.pay.view',[$company->slug])); ?>">
                <?php echo csrf_field(); ?>
                <div class="bulk-actions mb-3 d-flex align-items-center">
                    <select name="action" class="form-control form-control-sm">
                        <option value="pay">Pay</option>
                    </select>
                    <button class="btn btn-sm btn-primary mx-2">Apply</button>
                </div>
                <?php echo $dataTable->table(); ?>

            </form>
        </div>
        </div>
    </div>

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

<?php $__env->startPush('js'); ?>
    <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(); ?>

<?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/company/show.blade.php ENDPATH**/ ?>