
<?php Fun::lang() ?>
<?php
    $fwarehouse = findWarehouse($tran->from_warehouse_id);
    $tailor = findTailor($tran->tailor_id);
    $cur = findCurrency($tran->currency_id);
?>
<div class="page-purchases">
    <div class="container-fluid">
        <div class="top-content">
            <div class="row1">
                <div class="col-sm-12 col-xs-12">
                    
                    <img src="<?php echo e(headerlogo()); ?>" alt="">
                    <hr>
                </div>
            </div>
        </div>
        <hr>
        <hr>
        <div class="summary-header">
            <table>
                <tr>
                    <td>
                        <table class="text-left">
                            <tr>
                                <td><?php echo e(__('administrator.invoice_number')); ?></td>
                                <td> : <?php echo e($tran->invoice_number); ?> </td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('administrator.from_warehouse')); ?></td>
                                <td> :  <?php echo e($fwarehouse->warehouse_name); ?></td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('administrator.tailor')); ?></td>
                                <td> :  <?php echo e($tailor->name); ?></td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('administrator.created_at')); ?></td>
                                <td> : <?php echo e(date('d-m-Y',strtotime($tran['date']))); ?> </td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('administrator.description')); ?></td>
                                <td> : <?php echo e($tran->note); ?> </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <div class="wrapper-table">
            <table class="table table-striped table-hover ">
                <thead>
                <tr>
                    <th>#</th>
                    <th><?php echo e(__('administrator.barcode')); ?></th>
                    <th><?php echo e(__('administrator.material')); ?></th>
                    <th><?php echo e(__('administrator.qty')); ?></th>
                    <th><?php echo e(__('administrator.price')); ?></th>
                    <th><?php echo e(__('administrator.total')); ?></th>
                </tr>
                </thead>
                <tbody>
                <?php $grand_total = 0; ?>
                    <?php $__currentLoopData = $tran_detail; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php
                            $product = getProductById($value->product_id);
                            $unit = findUnit($value->unit_id);
                            $total = $value->price*$value->qty;
                            $grand_total += $total;
                        ?>
                        <tr>
                            <td><?php echo e($key+=1); ?></td>
                            <td><?php echo e($product->barcode); ?> </td>
                            <td><?php echo e($product->product_name); ?> </td>
                            <td><?php echo e($value->qty); ?> <?php echo e($unit->unit); ?></td>
                            <td><?php echo e($cur->symbol??''); ?><?php echo e($value->price); ?></td>
                            <td><?php echo e($cur->symbol??''); ?><?php echo e($total); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php
                        $total_row = 8;
                        $total_data = count($tran_detail);
                        $left_row = $total_row-$total_data;
                    ?>
                    <?php for($i=0;$i<$left_row;$i++): ?>
                        <tr>
                            <td><?php echo e($key ++); ?></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    <?php endfor; ?>
                </tbody>
                <?php
                    $symbol = findCurrency($tran->currency_id);
                ?>
                <tfoot>
                <tr>
                    <td colspan="5" class="text-right no-border"><?php echo e(__('administrator.total_amount')); ?></td>
                    <td><?php echo e($grand_total.' '.($symbol->symbol??'')); ?></td>
                </tr>
                <tr>
                    <td colspan="5" class="text-right no-border"><?php echo e(__('administrator.account_receivable')); ?></td>
                    <td><?php echo e($tran->account_receivable.' '.($symbol->symbol??'')); ?></td>
                </tr>
                </tfoot>
            </table>
        </div>
    </div>
</div>
<?php /**PATH /home/nsowos/public_html/shr-brand/resources/views/stock-inventory/transfer/transfer-stock-material/show.blade.php ENDPATH**/ ?>