resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
@@ -0,0 +1,37 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('finance.edit_social_security_rate') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('finance.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('finance.finance_home') }}</a></li>
<li class="active"><i class="fa fa-pencil"></i> {{ __('finance.edit_payroll_defaults') }}</li>
</ol>
</div>
</div>
<div class="white-box">
@include('flash::message')
{{ Form::model(1 ,['method' => 'POST', 'route' => ['payroll_defaults.save_nssf_rate', 1]]) }}
<div class="form-group col-sm-6">
{{ Form::label('nssf_rate', __('finance.social_security_rate')) }}
{{ Form::number('nssf_rate', $nssf_rate->nssf_rate, ['class' => 'form-control compulsory', 'required', 'step' => '0.01']) }}
<div class="help-block with-errors"></div>
</div>
{{ Form::button(__('finance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('finance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
@endpush
@@ -0,0 +1,100 @@
@extends('layouts.main')
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('finance.edit_tax_rate') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-home"></i> {{ __('finance.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('finance.finance_home') }}</a></li>
<li class="active"><i class="fa fa-pencil"></i> {{ __('finance.edit_payroll_defaults') }}</li>
</ol>
</div>
</div>
<div class="white-box">
@include('flash::message')
{{ Form::open(['route' => 'payroll_defaults.save_tax_rate', 'data-toggle' => 'validator']) }}
@php
$tax_from = json_decode($tax_rate_record->tax_from);
$tax_to = json_decode($tax_rate_record->tax_to);
$tax_rate = json_decode($tax_rate_record->tax_rate);
@endphp
<table class="table color-bordered-table success-bordered-table">
<thead>
<tr>
<th>From</th>
<th>To</th>
<th>Tax Percentage (0 - 100)</th>
<th></th>
</tr>
</thead>
<tbody class='input_fields_body'>
@if(!is_null($tax_from))
@for($i = 0; $i < count($tax_from); $i++)
<tr>
<td><input type='number' name='from[]' id='from_0' class='form-control compulsory' value='{{ $tax_from[$i] }}' required></td>
<td><input type='number' name='to[]' id='to_0' class='form-control compulsory' value='{{ $tax_to[$i] }}' required></td>
<td><input type='number' name='tax_rate[]' id='tax_rate_0' class='form-control compulsory' value='{{ $tax_rate[$i] }}' required></td>
<td style='width: 1%;'>
@if($i > 0)
<a class='remove_field btn btn-sm btn-rounded btn-danger' style='color: white;'><i class='fa fa-trash'></i></a>
@endif
</td>
</tr>
@endfor
@else
<tr>
<td><input type='number' name='from[]' id='from_0' class='form-control compulsory' required></td>
<td><input type='number' name='to[]' id='to_0' class='form-control compulsory' required></td>
<td><input type='number' name='tax_rate[]' id='tax_rate_0' class='form-control compulsory' required></td>
<td style='width: 1%;'></td>
</tr>
@endif
</tbody>
</table>
<a class="btn btn-success btn-xs" onclick="add_new_row()">{{ __('triage.add_row') }}</a>
<br><br>
{{ Form::button(__('finance.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('finance.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script>
let max_rows = 20;
let wrapper = $(".input_fields_body");
let x = 1;
$(wrapper).on("click", ".remove_field", function (e) {
e.preventDefault();
$(this).parent('td').parent('tr').remove();
x--;
});
function add_new_row() {
if (x < max_rows) {
$(wrapper).append("<tr>\
<td><input type='number' name='from[]' id='from_0' class='form-control compulsory' required></td>\
<td><input type='number' name='to[]' id='to_0' class='form-control compulsory' required></td>\
<td><input type='number' name='tax_rate[]' id='tax_rate_0' class='form-control compulsory' required></td>\
<td style='width: 1%;'><a class='remove_field btn btn-sm btn-rounded btn-danger' style='color: white;'><i class='fa fa-trash'></i></a></td></tr>");
x++;
}
}
</script>
@endpush