<?php $__env->startSection('title','New GRN'); ?>
<?php $__env->startSection('crumbs', '<a href="'.route('goods-receipts.index').'">GRNs</a> · <b>New</b>'); ?>
<?php $__env->startSection('content'); ?>
<div class="card"><div class="card-h"><h2>New goods received note</h2><div class="sp"><span class="bdg b-info"><?php echo e($docNo); ?></span></div></div>
<div class="card-b"><form method="POST" action="<?php echo e(route('goods-receipts.store')); ?>" data-doc><?php echo csrf_field(); ?>
<div class="frow">
<div class="fld c4"><label>Supplier *</label><select name="supplier_id" required><option value="">—</option><?php $__currentLoopData = $suppliers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($s->id); ?>" data-defcur="<?php echo e($s->default_currency); ?>" <?php echo e($record->supplier_id==$s->id?'selected':''); ?>><?php echo e($s->display_name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div>
<div class="fld c2"><label>Date *</label><input type="date" name="grn_date" value="<?php echo e(date('Y-m-d')); ?>" required></div>
<?php echo $__env->make('docs._fxfields', ['record' => $record, 'fx' => $fx, 'isNew' => $isNew], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<div class="fld c3"><label>Into store *</label><select name="warehouse_id" required><option value="">—</option><?php $__currentLoopData = $warehouses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $w): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($w->id); ?>"><?php echo e($w->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div>
<div class="fld c3"><label>Weighbridge ticket</label><select name="weighbridge_ticket_id"><option value="">—</option><?php $__currentLoopData = $tickets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $t): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($t->id); ?>"><?php echo e($t->ticket_no); ?> (<?php echo e(qty($t->net_weight)); ?>t)</option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div>
<div class="fld c12"><label>Remarks</label><input type="text" name="remarks"></div>
</div>
<?php if($record->purchase_order_id): ?><input type="hidden" name="purchase_order_id" value="<?php echo e($record->purchase_order_id); ?>"><?php endif; ?>
<?php echo $__env->make('docs._lines', ['id'=>'grnLines', 'rows'=>$prefill, 'cols'=>[
  ['f'=>'item_id','l'=>'Stock item','t'=>'select','o'=>$items->pluck('display_name','id')->all()],
  ['f'=>'product_id','l'=>'Product','t'=>'select','o'=>$products->pluck('display_name','id')->all()],
  ['f'=>'qty_received','l'=>'Received *','t'=>'number','req'=>1,'w'=>'100px'],
  ['f'=>'qty_accepted','l'=>'Accepted *','t'=>'number','req'=>1,'w'=>'100px'],
  ['f'=>'qty_rejected','l'=>'Rejected','t'=>'number','w'=>'90px'],
  ['f'=>'rate','l'=>'Rate *','t'=>'number','req'=>1,'w'=>'110px'],
  ['f'=>'batch_no','l'=>'Batch','t'=>'text','w'=>'100px'],
]], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<div style="margin-top:12px"><button class="btn btn-pri">Save draft GRN</button> <a class="btn btn-ghost" href="<?php echo e(route('goods-receipts.index')); ?>">Cancel</a></div>
</form></div></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/user/nowills-sqc-erp/resources/views/docs/goods-receipt/form.blade.php ENDPATH**/ ?>