<?php $__env->startSection('title','Edit Customer'); ?>
<?php $__env->startSection('content'); ?>
<form method="POST" action="<?php echo e(route('customers.update',$customer)); ?>"><?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?><div class="page-head"><div><h1>Edit customer</h1><p><?php echo e($customer->customer_code); ?> · Current outstanding SAR <?php echo e(number_format((float)$customer->outstanding_balance,2)); ?></p></div><a href="<?php echo e(route('customers.statement',$customer)); ?>" class="btn btn-light border btn-dense">View statement</a></div><div class="card-erp"><div class="card-erp-body"><div class="row g-2"><div class="col-md-5"><label class="form-label">English name</label><input name="name_en" class="form-control" value="<?php echo e(old('name_en',$customer->name_en)); ?>" required></div><div class="col-md-5"><label class="form-label">Arabic name</label><input name="name_ar" dir="rtl" class="form-control" value="<?php echo e(old('name_ar',$customer->name_ar)); ?>"></div><div class="col-md-2"><label class="form-label">Type</label><select name="customer_type" class="form-select"><?php $__currentLoopData = ['business','retail','cash']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $x): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option <?php if($customer->customer_type===$x): echo 'selected'; endif; ?>><?php echo e($x); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div class="col-md-2"><label class="form-label">VAT registered</label><select name="vat_registered" class="form-select"><option value="1" <?php if($customer->vat_registered): echo 'selected'; endif; ?>>Yes</option><option value="0" <?php if(!$customer->vat_registered): echo 'selected'; endif; ?>>No</option></select></div><div class="col-md-3"><label class="form-label">VAT number</label><input name="vat_number" class="form-control" value="<?php echo e($customer->vat_number); ?>" maxlength="15"></div><div class="col-md-2"><label class="form-label">Mobile</label><input name="mobile" class="form-control" value="<?php echo e($customer->mobile); ?>"></div><div class="col-md-3"><label class="form-label">Email</label><input name="email" class="form-control" value="<?php echo e($customer->email); ?>"></div><div class="col-md-2"><label class="form-label">City</label><input name="city_en" class="form-control" value="<?php echo e($customer->city_en); ?>"></div><div class="col-md-2"><label class="form-label">Credit allowed</label><select name="credit_allowed" class="form-select"><option value="1" <?php if($customer->credit_allowed): echo 'selected'; endif; ?>>Yes</option><option value="0" <?php if(!$customer->credit_allowed): echo 'selected'; endif; ?>>No</option></select></div><div class="col-md-2"><label class="form-label">Credit limit</label><input type="number" name="credit_limit" class="form-control" value="<?php echo e($customer->credit_limit); ?>" min="0" step=".01"></div><div class="col-md-2"><label class="form-label">Credit days</label><input type="number" name="credit_days" class="form-control" value="<?php echo e($customer->credit_days); ?>" min="0"></div><div class="col-md-3"><label class="form-label">Price level</label><select name="price_level" class="form-select"><?php $__currentLoopData = ['retail','wholesale','special']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $x): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option <?php if($customer->price_level===$x): echo 'selected'; endif; ?>><?php echo e($x); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div class="col-md-3"><label class="form-label">Status</label><select name="status" class="form-select"><option <?php if($customer->status==='active'): echo 'selected'; endif; ?>>active</option><option <?php if($customer->status==='inactive'): echo 'selected'; endif; ?>>inactive</option></select></div></div></div></div><div class="sticky-actions d-flex justify-content-end gap-2"><a href="<?php echo e(route('customers.index')); ?>" class="btn btn-light border">Cancel</a><button class="btn btn-primary">Update customer</button></div></form>
<?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\customers\edit.blade.php ENDPATH**/ ?>