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

<?php $__env->startPush('css'); ?>

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

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

    </div>

    <div class="row">
        <div class="col-12">
            <div class="white-box">
                <h3><b>Farmer Return</b> <span class="pull-right">#<?php echo e($farmerReturnInvoice->invoice_no); ?></span></h3>
                <hr>
                <div class="row">
                    <div class="col-md-12">
                        <div class="pull-left">
                            <address>
                                <img src="<?php echo e(asset(Config::get('app.company.logo'))); ?>" width="100px" height="auto" style="margin: 0">
                                
                                
                                
                                <p class="text-muted m-l-5">
                                    <?php echo e(Config::get('app.address.house')); ?> , <?php echo e(Config::get('app.address.road')); ?> , <?php echo e(Config::get('app.address.sector')); ?>

                                    <br>
                                    <?php echo e(Config::get('app.address.area')); ?> , <?php echo e(Config::get('app.address.city')); ?>

                                    <br>
                                    <?php echo e(Config::get('app.address.post')); ?>

                                </p>
                            </address>
                        </div>
                        <div class="pull-right text-right">
                            <address>
                                <p class="addr-font-h3">From,</p>
                                <p class="font-bold addr-font-h4"><?php echo e($farmerReturnInvoice->farmer->name); ?></p>
                                <?php if(!empty($farmerReturnInvoice->farmer->address)): ?>
                                    <p class="text-muted m-l-30">
                                        <?php echo e($farmerReturnInvoice->farmer->address ?? 'N/A'); ?>

                                    </p>
                                <?php endif; ?>
                                <p class="m-t-30">
                                    <b>Return Date :</b> <i class="fa fa-calendar"></i> <?php echo e(\Carbon\Carbon::parse($farmerReturnInvoice->date)->format('D-M-Y')); ?>

                                </p>
                                <p>
                                    <b>Phone  :</b> <?php echo e($farmerReturnInvoice->farmer->phone1 ?? $farmerReturnInvoice->farmer->phone2); ?>

                                </p>
                            </address>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="table-responsive m-t-40">
                            <table class="table table-hover">
                                <thead>
                                <tr>
                                    <th class="text-center">#</th>
                                    <th class="text-right">Product Name</th>
                                    <th class="text-right">Category</th>
                                    <th class="text-right">Price</th>
                                    <th class="text-right">Quantity</th>
                                    <th class="text-right">Amount</th>
                                </tr>
                                </thead>
                                <?php
                                    $i = 1;
                                ?>
                                <tbody>
                                <?php $__currentLoopData = $farmerReturnInvoice->farmerReturnInvoiceItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                    <tr>
                                        <td class="text-center"><?php echo e($i++); ?></td>
                                        <td class="text-right"><?php echo e($item->product->product_name); ?></td>
                                        <td class="text-right"><?php echo e($item->product->subcategory->category->name); ?></td>
                                        <td class="text-right"><?php echo e($item->unit_price); ?></td>
                                        <td class="text-right"><?php echo e($item->qty); ?></td>
                                        <td class="text-right"><?php echo e($item->total); ?></td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="pull-right m-t-30 text-right">
                            <p>Sub - Total amount: <?php echo e($farmerReturnInvoice->total); ?> BDT</p>
                            <p>Discount : 0 BDT </p>
                            <hr>
                            <h3><b>Total :</b> <?php echo e($farmerReturnInvoice->total); ?> BDT</h3> </div>
                        <div class="clearfix"></div>
                        <hr>
                        <div class="text-right">
                            <button onclick="javascript:window.print();" class="btn btn-default btn-outline" type="button"> <span><i class="fa fa-print"></i> Print</span> </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('js'); ?>


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

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