<?php $__env->startSection('page_title', __('app.config')); ?>
<?php $__env->startSection('content'); ?>
<form method="POST" action="<?php echo e(route('settings.update')); ?>"><?php echo csrf_field(); ?>
<div class="top-card p-3 mb-3"><h5 class="fw-bold"><i class="fa-solid fa-building"></i> <?php echo e(__('app.company_config')); ?></h5><div class="row g-3"><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.company_name')); ?></label><input name="company_name" value="<?php echo e(\App\Models\Setting::getValue('company_name')); ?>" class="form-control"></div><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.phone')); ?></label><input name="company_phone" value="<?php echo e(\App\Models\Setting::getValue('company_phone')); ?>" class="form-control"></div><div class="col-md-12"><label class="easy-label"><?php echo e(__('app.address')); ?></label><input name="company_address" value="<?php echo e(\App\Models\Setting::getValue('company_address')); ?>" class="form-control"></div><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.default_language')); ?></label><select name="default_language" class="form-select"><option value="ps" <?php if(\App\Models\Setting::getValue('default_language')==='ps'): echo 'selected'; endif; ?>>پښتو</option><option value="fa" <?php if(\App\Models\Setting::getValue('default_language')==='fa'): echo 'selected'; endif; ?>>دری</option><option value="en" <?php if(\App\Models\Setting::getValue('default_language')==='en'): echo 'selected'; endif; ?>>English</option></select></div><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.base_currency')); ?></label><input name="base_currency" value="<?php echo e(\App\Models\Setting::getValue('base_currency','AFN')); ?>" class="form-control"></div></div></div>
<div class="top-card p-3 mb-3"><h5 class="fw-bold"><i class="fa-solid fa-receipt"></i> <?php echo e(__('app.invoice_config')); ?></h5><div class="row g-3"><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.invoice_header')); ?></label><input name="invoice_header" value="<?php echo e(\App\Models\Setting::getValue('invoice_header')); ?>" class="form-control"></div><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.print_size')); ?></label><select name="print_size" class="form-select"><option value="small" <?php if(\App\Models\Setting::getValue('print_size')==='small'): echo 'selected'; endif; ?>>Small Printer</option><option value="a4" <?php if(\App\Models\Setting::getValue('print_size')==='a4'): echo 'selected'; endif; ?>>A4</option></select></div><div class="col-md-12"><label class="easy-label"><?php echo e(__('app.invoice_footer')); ?></label><input name="invoice_footer" value="<?php echo e(\App\Models\Setting::getValue('invoice_footer')); ?>" class="form-control"></div><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.sale_help_text')); ?></label><input name="sale_help_text" value="<?php echo e(\App\Models\Setting::getValue('sale_help_text')); ?>" class="form-control"></div><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.purchase_help_text')); ?></label><input name="purchase_help_text" value="<?php echo e(\App\Models\Setting::getValue('purchase_help_text')); ?>" class="form-control"></div></div></div>
<div class="top-card p-3 mb-3"><h5 class="fw-bold"><i class="fa-solid fa-gas-pump"></i> <?php echo e(__('app.fuel_price_config')); ?></h5><div class="table-responsive"><table class="table"><thead><tr><th><?php echo e(__('app.fuel')); ?></th><th><?php echo e(__('app.purchase_price')); ?></th><th><?php echo e(__('app.sale_price')); ?></th><th><?php echo e(__('app.low_stock_alert')); ?></th><th><?php echo e(__('app.active')); ?></th></tr></thead><tbody><?php $__currentLoopData = $fuelTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $fuel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><tr><td><?php echo e($fuel->name_en); ?></td><td><input name="fuel_prices[<?php echo e($fuel->id); ?>][purchase_price]" value="<?php echo e($fuel->purchase_price); ?>" class="form-control"></td><td><input name="fuel_prices[<?php echo e($fuel->id); ?>][sale_price]" value="<?php echo e($fuel->sale_price); ?>" class="form-control"></td><td><input name="fuel_prices[<?php echo e($fuel->id); ?>][min_stock_alert]" value="<?php echo e($fuel->min_stock_alert); ?>" class="form-control"></td><td><input type="checkbox" name="fuel_prices[<?php echo e($fuel->id); ?>][is_active]" value="1" <?php if($fuel->is_active): echo 'checked'; endif; ?>></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></tbody></table></div></div>
<div class="top-card p-3 mb-3"><h5 class="fw-bold"><i class="fa-solid fa-money-bill"></i> <?php echo e(__('app.currency_config')); ?></h5><div class="table-responsive"><table class="table"><thead><tr><th><?php echo e(__('app.currency')); ?></th><th><?php echo e(__('app.rate')); ?></th><th><?php echo e(__('app.active')); ?></th></tr></thead><tbody><?php $__currentLoopData = $currencies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $currency): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><tr><td><?php echo e($currency->code); ?> - <?php echo e($currency->name); ?></td><td><input name="currencies[<?php echo e($currency->id); ?>][rate_to_base]" value="<?php echo e($currency->rate_to_base); ?>" class="form-control"></td><td><input type="checkbox" name="currencies[<?php echo e($currency->id); ?>][is_active]" value="1" <?php if($currency->is_active): echo 'checked'; endif; ?>></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></tbody></table></div></div>
<div class="top-card p-3 mb-3"><h5 class="fw-bold"><i class="fa-solid fa-person-cane"></i> <?php echo e(__('app.easy_mode')); ?></h5><div class="row g-3"><div class="col-md-4"><label><input type="checkbox" name="pos_easy_mode" value="1" <?php if(\App\Models\Setting::getValue('pos_easy_mode','1')==='1'): echo 'checked'; endif; ?>> <?php echo e(__('app.pos_easy_mode')); ?></label></div><div class="col-md-4"><label><input type="checkbox" name="allow_negative_stock" value="1" <?php if(\App\Models\Setting::getValue('allow_negative_stock')==='1'): echo 'checked'; endif; ?>> <?php echo e(__('app.allow_negative_stock')); ?></label></div><div class="col-md-4"><label><input type="checkbox" name="low_stock_sms" value="1" <?php if(\App\Models\Setting::getValue('low_stock_sms')==='1'): echo 'checked'; endif; ?>> <?php echo e(__('app.low_stock_sms')); ?></label></div></div></div>
<div class="text-end"><button class="btn btn-success btn-lg"><i class="fa-solid fa-floppy-disk"></i> <?php echo e(__('app.save_config')); ?></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\petrolmump\resources\views/settings/edit.blade.php ENDPATH**/ ?>