<?php $__env->startSection("content"); ?>
<?php $__env->startSection("title","Update Salary Structures"); ?>

<div class="row">
    <div class="col-xl-12 col-lg-12">
        <div class="alert alert-success my-3" style="display:none;" id="success"></div>
        
        <div class="card">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h4 class="card-title mb-0">Update Salary structures</h4>
                <a href="javascript:history.back()" class="btn btn-sm btn-light">
                    <i class="ri-arrow-left-line"></i> Back
                </a>
            </div>
            
            <div class="card-body">
                <form accept-charset="utf-8" name="update-form" id="update-form" >
                    <?php echo csrf_field(); ?>
                    <div class="row">

<div class="mt-2 col-xs-12 col-sm-12 col-md-4 col-lg-4">        
<label class='form-label'><?php echo e($dbs_salary_structures['employee_id_req']); ?><?php echo e($dbs_salary_structures['employee_id_title']); ?>: </label>
 <select name="employee_id" id="update-employee_id"  class="chosen-select form-control form-select">
    <option value=""><?php echo e($dbs_salary_structures['employee_id_req']); ?>Select <?php echo e($dbs_salary_structures['employee_id_title']); ?> </option>
    <?php $__currentLoopData = $employee_id; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $name): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php
    $selected = ($id == $row->employee_id) ? 'selected="selected"' : '';
?>
        <option value="<?php echo e($id); ?>"  <?php echo e($selected); ?>><?php echo e($name); ?></option>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<script>
    $(function() {
        $('#update-employee_id').chosen({
              width: '100%',
              search_contains: true
            });
        });
</script>
<span class='text-danger' id='update-employee_idError'></span>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['basic_salary_req']); ?><?php echo e($dbs_salary_structures['basic_salary_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['basic_salary_html5_type']); ?>' name = "basic_salary" id = "update-basic_salary" data-maxlen='<?php echo e($dbs_salary_structures['basic_salary_max']); ?>' data-scale='<?php echo e($dbs_salary_structures['basic_salary_scale'] ?? ''); ?>' autocomplete = 'off'   value='<?php echo e($row->basic_salary); ?>' <?php if($dbs_salary_structures['basic_salary_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['basic_salary_html5_req']); ?> = <?php echo e($dbs_salary_structures['basic_salary_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateFloatInput(event)'  oninput='validateInput(this,<?php echo e($dbs_salary_structures['basic_salary_max']); ?>)' />
        <span class='text-danger' id='update-basic_salaryError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['house_allowance_req']); ?><?php echo e($dbs_salary_structures['house_allowance_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['house_allowance_html5_type']); ?>' name = "house_allowance" id = "update-house_allowance" data-maxlen='<?php echo e($dbs_salary_structures['house_allowance_max']); ?>' data-scale='<?php echo e($dbs_salary_structures['house_allowance_scale'] ?? ''); ?>' autocomplete = 'off'   value='<?php echo e($row->house_allowance); ?>' <?php if($dbs_salary_structures['house_allowance_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['house_allowance_html5_req']); ?> = <?php echo e($dbs_salary_structures['house_allowance_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateFloatInput(event)'  oninput='validateInput(this,<?php echo e($dbs_salary_structures['house_allowance_max']); ?>)' />
        <span class='text-danger' id='update-house_allowanceError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['medical_allowance_req']); ?><?php echo e($dbs_salary_structures['medical_allowance_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['medical_allowance_html5_type']); ?>' name = "medical_allowance" id = "update-medical_allowance" data-maxlen='<?php echo e($dbs_salary_structures['medical_allowance_max']); ?>' data-scale='<?php echo e($dbs_salary_structures['medical_allowance_scale'] ?? ''); ?>' autocomplete = 'off'   value='<?php echo e($row->medical_allowance); ?>' <?php if($dbs_salary_structures['medical_allowance_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['medical_allowance_html5_req']); ?> = <?php echo e($dbs_salary_structures['medical_allowance_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateFloatInput(event)'  oninput='validateInput(this,<?php echo e($dbs_salary_structures['medical_allowance_max']); ?>)' />
        <span class='text-danger' id='update-medical_allowanceError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['transport_allowance_req']); ?><?php echo e($dbs_salary_structures['transport_allowance_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['transport_allowance_html5_type']); ?>' name = "transport_allowance" id = "update-transport_allowance" data-maxlen='<?php echo e($dbs_salary_structures['transport_allowance_max']); ?>' data-scale='<?php echo e($dbs_salary_structures['transport_allowance_scale'] ?? ''); ?>' autocomplete = 'off'   value='<?php echo e($row->transport_allowance); ?>' <?php if($dbs_salary_structures['transport_allowance_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['transport_allowance_html5_req']); ?> = <?php echo e($dbs_salary_structures['transport_allowance_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateFloatInput(event)'  oninput='validateInput(this,<?php echo e($dbs_salary_structures['transport_allowance_max']); ?>)' />
        <span class='text-danger' id='update-transport_allowanceError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['bonus_req']); ?><?php echo e($dbs_salary_structures['bonus_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['bonus_html5_type']); ?>' name = "bonus" id = "update-bonus" data-maxlen='<?php echo e($dbs_salary_structures['bonus_max']); ?>' data-scale='<?php echo e($dbs_salary_structures['bonus_scale'] ?? ''); ?>' autocomplete = 'off'   value='<?php echo e($row->bonus); ?>' <?php if($dbs_salary_structures['bonus_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['bonus_html5_req']); ?> = <?php echo e($dbs_salary_structures['bonus_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateFloatInput(event)'  oninput='validateInput(this,<?php echo e($dbs_salary_structures['bonus_max']); ?>)' />
        <span class='text-danger' id='update-bonusError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['tax_req']); ?><?php echo e($dbs_salary_structures['tax_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['tax_html5_type']); ?>' name = "tax" id = "update-tax" data-maxlen='<?php echo e($dbs_salary_structures['tax_max']); ?>' data-scale='<?php echo e($dbs_salary_structures['tax_scale'] ?? ''); ?>' autocomplete = 'off'   value='<?php echo e($row->tax); ?>' <?php if($dbs_salary_structures['tax_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['tax_html5_req']); ?> = <?php echo e($dbs_salary_structures['tax_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateFloatInput(event)'  oninput='validateInput(this,<?php echo e($dbs_salary_structures['tax_max']); ?>)' />
        <span class='text-danger' id='update-taxError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['provident_fund_req']); ?><?php echo e($dbs_salary_structures['provident_fund_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['provident_fund_html5_type']); ?>' name = "provident_fund" id = "update-provident_fund" data-maxlen='<?php echo e($dbs_salary_structures['provident_fund_max']); ?>' data-scale='<?php echo e($dbs_salary_structures['provident_fund_scale'] ?? ''); ?>' autocomplete = 'off'   value='<?php echo e($row->provident_fund); ?>' <?php if($dbs_salary_structures['provident_fund_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['provident_fund_html5_req']); ?> = <?php echo e($dbs_salary_structures['provident_fund_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateFloatInput(event)'  oninput='validateInput(this,<?php echo e($dbs_salary_structures['provident_fund_max']); ?>)' />
        <span class='text-danger' id='update-provident_fundError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['other_deductions_req']); ?><?php echo e($dbs_salary_structures['other_deductions_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['other_deductions_html5_type']); ?>' name = "other_deductions" id = "update-other_deductions" data-maxlen='<?php echo e($dbs_salary_structures['other_deductions_max']); ?>' data-scale='<?php echo e($dbs_salary_structures['other_deductions_scale'] ?? ''); ?>' autocomplete = 'off'   value='<?php echo e($row->other_deductions); ?>' <?php if($dbs_salary_structures['other_deductions_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['other_deductions_html5_req']); ?> = <?php echo e($dbs_salary_structures['other_deductions_html5_req']); ?> <?php endif; ?> class= 'form-control'   onkeydown='validateFloatInput(event)'  oninput='validateInput(this,<?php echo e($dbs_salary_structures['other_deductions_max']); ?>)' />
        <span class='text-danger' id='update-other_deductionsError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['effective_from_req']); ?><?php echo e($dbs_salary_structures['effective_from_title']); ?>:</label>
        <input type = '<?php echo e($dbs_salary_structures['effective_from_html5_type']); ?>' name = "effective_from" id = "update-effective_from" autocomplete = 'off' <?php if($dbs_salary_structures['effective_from_html5_req']!=''): ?> <?php echo e($dbs_salary_structures['effective_from_html5_req']); ?> = <?php echo e($dbs_salary_structures['effective_from_html5_req']); ?> <?php endif; ?> class= 'form-control dateBox' >
        <span class='text-danger' id='update-effective_fromError'></span>
        
        <script>
            $(function() {
                $( '#update-effective_from' ).datepicker({
                    changeMonth: true,
                    changeYear: true
                });
                $( '#update-effective_from' ).datepicker( 'option', 'yearRange', 'c-100:c+10' );
                $( '#update-effective_from' ).datepicker( 'option', 'dateFormat', 'yy-mm-dd' );
                $('#update-effective_from').datepicker('setDate', '<?php echo e($row->effective_from); ?>' );                
            });
        </script>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_salary_structures['status_req']); ?><?php echo e($dbs_salary_structures['status_title']); ?>:</label><br/>
        <div class="mt-2">
            <?php
            $options = $dbs_salary_structures['status_array'];
            ?>

            <?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                $checked = ($key == $row->status) ? 'checked="checked"' : '';
                ?>

                <label class="btn btn-outline-primary">
                    <input type="radio" name="status" value="<?php echo e($key); ?>" id="update-status" <?php echo e($checked); ?>/> <?php echo e($value); ?>

                </label>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
</div>

    
                    </div>
                    

                    <div class="p-3 mb-3 rounded">
                        <div class="row justify-content-end g-2">
                            <div class="col-lg-3">
                                <div id="edit-mode">
                                    <button type='submit' name='update-submit' id='update-submit' class='btn btn-outline-secondary w-100' data-args1='<?php echo e(route("salary-structures.update", $row->id)); ?>' data-args2='admin/salary-structures' onclick='addUpdate(event,"update")'>
                                        <i class="ri-save-line"></i> Save 
                                    </button>
                                </div>
                            </div>
                            <div class="col-lg-2">
                                <a href="<?php echo e(route('salary-structures.index')); ?>" class="btn btn-primary w-100">
                                    <i class="ri-close-circle-line"></i> Cancel
                                </a>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>


<?php echo $__env->make("layouts.metor.admin", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/payroll/resources/views/salary-structures/edit.blade.php ENDPATH**/ ?>