<?php $__env->startSection('title','Units'); ?>
<?php $__env->startSection('content'); ?>
<div class="page-head"><div><h1>Units of measure</h1><p>Base, purchase, and sales units with decimal controls.</p></div></div><div class="row g-2"><div class="col-lg-4"><form method="POST" action="<?php echo e(route('units.store')); ?>" class="card-erp"><?php echo csrf_field(); ?><div class="card-erp-header">New unit</div><div class="card-erp-body"><label class="form-label">Code</label><input name="code" class="form-control mb-2" required><label class="form-label">English name</label><input name="name_en" class="form-control mb-2" required><label class="form-label">Arabic name</label><input name="name_ar" class="form-control mb-2" dir="rtl" required><div class="row g-2"><div class="col"><label class="form-label">Short</label><input name="short_name_en" class="form-control"></div><div class="col"><label class="form-label">Arabic short</label><input name="short_name_ar" dir="rtl" class="form-control"></div></div><input type="hidden" name="allow_decimal" value="0"><div class="form-check mt-3"><input class="form-check-input" type="checkbox" name="allow_decimal" value="1" checked><label class="form-check-label">Allow decimal quantity</label></div><button class="btn btn-primary w-100 mt-3">Create unit</button></div></form></div><div class="col-lg-8"><div class="card-erp"><div class="table-responsive"><table class="table table-dense"><thead><tr><th>Code</th><th>English</th><th>Arabic</th><th>Decimal</th><th></th></tr></thead><tbody><?php $__currentLoopData = $units; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $u): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><tr><form method="POST" action="<?php echo e(route('units.update',$u)); ?>"><?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?><td><input name="code" class="form-control" value="<?php echo e($u->code); ?>"></td><td><input name="name_en" class="form-control" value="<?php echo e($u->name_en); ?>"><input type="hidden" name="short_name_en" value="<?php echo e($u->short_name_en); ?>"></td><td><input name="name_ar" dir="rtl" class="form-control" value="<?php echo e($u->name_ar); ?>"><input type="hidden" name="short_name_ar" value="<?php echo e($u->short_name_ar); ?>"></td><td><select name="allow_decimal" class="form-select"><option value="1" <?php if($u->allow_decimal): echo 'selected'; endif; ?>>Yes</option><option value="0" <?php if(!$u->allow_decimal): echo 'selected'; endif; ?>>No</option></select></td><td><button class="btn btn-light border btn-dense">Save</button></td></form></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></tbody></table></div></div></div></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\saudi\resources\views\units\index.blade.php ENDPATH**/ ?>