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,129 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@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">{{ __('chart_of_accounts.add_chart_of_account') }}</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> {{ __('chart_of_accounts.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('chart_of_accounts.finance_home') }}</a></li>
<li><a href="{{ route('chart_of_accounts.index') }}"><i class="fa fa-eye"></i> {{ __('chart_of_accounts.view_chart_of_accounts') }}</a></li>
<li class="active"><i class="fa fa-plus"></i> {{ __('chart_of_accounts.create') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('clinical_data::chart_of_accounts.menu')
@include('flash::message')
<div class="white-box">
{{ Form::open(['route' => 'chart_of_accounts.store', 'data-toggle' => 'validator']) }}
<div class="form-group">
{{ Form::label('name', __('chart_of_accounts.chart_of_account_name')) }}
{{ Form::text('name', '', ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('type', __('chart_of_accounts.type')) }}
{{ Form::select('type',$account_types,[],['class' => 'form-control', 'id'=>'account_types']) }}
</div>
<div class="row" id="opening_balance_div" style="display:none;">
<div class="col-md-8">
<div class="form-group">
{{ Form::label('opening_balance', __('chart_of_accounts.opening_balance')) }}
{{ Form::number('opening_balance', 0, ['class' => 'form-control', 'step' => 0.01, 'id' => 'opening_balance']) }}
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::label('opening_balance_date', __('chart_of_accounts.date')) }}
{{ Form::text('opening_balance_date', \Carbon\Carbon::today()->format('d-m-Y'), ['class' => 'form-control', 'readonly', 'id'=>'opening_balance_date']) }}
</div>
</div>
</div>
{{-- <div class="row" id="current_balance_div" style="display:none;">
<div class="col-md-8">
<div class="form-group">
{{ Form::label('current_balance', __('chart_of_accounts.current_balance')) }}
{{ Form::number('current_balance', 0, ['class' => 'form-control', 'step' => 0.01]) }}
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{{ Form::label('current_balance_date', __('chart_of_accounts.date')) }}
{{ Form::text('current_balance_date', \Carbon\Carbon::today()->format('d-m-Y'), ['class' => 'form-control', 'readonly', 'id'=>'current_balance_date']) }}
</div>
</div>
</div> --}}
<div class="form-group">
{{ Form::label('description', __('chart_of_accounts.description')) }}
{{ Form::text('description', '', ['class' => 'form-control']) }}
</div>
<div class="form-group">
{{ Form::label('sub_account_of',__('chart_of_accounts.sub_account_of')) }}
{{ Form::select('sub_account_of',$chart_of_accounts_list,'',['class' => 'form-control']) }}
</div>
@if(Auth::user()->can('create-core-chart-of-account'))
<div class="form-group">
{{ Form::label('core','System core chart of account') }}
<br>
{{ Form::radio('core', 1, false, ["required"]) }} Yes&nbsp;&nbsp;
{{ Form::radio('core', 0, false, ["required"]) }} No
<div class="help-block with-errors"></div>
</div>
@endif
@if(Auth::user()->can('add-chart-of-account-slug'))
<div class="form-group">
{{ Form::label('slug',__('chart_of_accounts.slug'). ' (Optional)') }}
{{ Form::select('slug',$slugs,'',['class' => 'form-control']) }}
</div>
@endif
{{ Form::button(__('chart_of_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('chart_of_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script>
$('#account_types').change(function () {
let type = this.value;
if(type === "4"){
$('#opening_balance_div').show();
}else{
$('#opening_balance_div').hide();
}
});
$('#opening_balance_date, #current_balance_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy'
});
</script>
@endpush
@@ -0,0 +1,94 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('elite/bower_components/select2/select2.min.css') }}" rel="stylesheet" />
@endpush
@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">{{ __('chart_of_accounts.edit_chart_of_account') }}</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> {{ __('chart_of_accounts.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('chart_of_accounts.finance_home') }}</a></li>
<li><a href="{{ route('chart_of_accounts.index') }}"><i class="fa fa-eye"></i> {{ __('chart_of_accounts.view_chart_of_accounts') }}</a></li>
<li class="active"><i class="fa fa-pencil"></i> {{ __('chart_of_accounts.edit') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('clinical_data::chart_of_accounts.menu')
@include('flash::message')
<div class="white-box">
{{ Form::model($chart_of_account, ['method' => 'PUT', 'route' => ['chart_of_accounts.update',$chart_of_account->id], 'data-toggle' => 'validator']) }}
<div class="form-group">
{{ Form::label('name', __('chart_of_accounts.chart_of_account_name')) }}
{{ Form::text('name', $chart_of_account->name, ['class' => 'form-control compulsory', 'required']) }}
<div class="help-block with-errors"></div>
</div>
@if($chart_of_account->core == 0)
<div class="form-group">
{{ Form::label('type', __('chart_of_accounts.type')) }}
{{ Form::select('type', $account_types, $chart_of_account->type, ['class' => 'form-control','id'=>'account_types']) }}
</div>
@endif
<div class="form-group">
{{ Form::label('description', __('chart_of_accounts.description')) }}
{{ Form::text('description', $chart_of_account->description, ['class' => 'form-control']) }}
</div>
@if($chart_of_account->core == 0)
<div class="form-group">
{{ Form::label('sub_account_of',__('chart_of_accounts.sub_account_of')) }}
{{ Form::select('sub_account_of', $chart_of_accounts_list, $chart_of_account->sub_account_of, ['class' => 'form-control']) }}
</div>
@endif
<div class="form-group">
{{ Form::label('balance', __('chart_of_accounts.opening_balance')) }}
@if($chart_of_account->core == 1)
{{ Form::number('balance', $chart_of_account->balance, ['class' => 'form-control', 'step' => 0.01, 'readonly']) }}
@else
{{ Form::number('balance', $chart_of_account->balance, ['class' => 'form-control', 'step' => 0.01]) }}
@endif
</div>
@if(Auth::user()->can('create-core-chart-of-account') && $chart_of_account->core == 0)
<div class="form-group">
{{ Form::label('core',__('chart_of_accounts.system_core_account')) }}
<br>
{{ Form::radio('core', '1', $chart_of_account->core == "1" ? 1 : 0) }} Yes &nbsp;&nbsp;
{{ Form::radio('core','0', $chart_of_account->core == "0" ? 1 : 0) }} No
<div class="help-block with-errors"></div>
</div>
@endif
@if(Auth::user()->can('add-chart-of-account-slug') && $chart_of_account->core == 0)
<div class="form-group">
{{ Form::label('slug',__('chart_of_accounts.slug'). ' (Optional)') }}
{{ Form::select('slug',$slugs,$chart_of_account->slug,['class' => 'form-control']) }}
</div>
@endif
{{ Form::button(__('chart_of_accounts.submit'),['type'=>'submit','class'=>'btn btn-success waves-effect waves-light m-r-10']) }}
{{ Form::button(__('chart_of_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default waves-effect waves-light']) }}
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/js/validator.js') }}"></script>
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
@endpush
@@ -0,0 +1,98 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@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">{{ __('chart_of_accounts.chart_of_accounts') }}</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> {{ __('chart_of_accounts.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('chart_of_accounts.finance_home') }}</a></li>
<li><a href="{{ route('chart_of_accounts.index') }}"><i class="fa fa-eye"></i> {{ __('chart_of_accounts.view_chart_of_accounts') }}</a></li>
<li class="active"><i class="fa fa-trash"></i>{{ __('chart_of_accounts.inactive') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('clinical_data::chart_of_accounts.menu')
@include('flash::message')
<div class="white-box">
<p class="text-muted m-b-30">{{ __('chart_of_accounts.export_data_to_copy_csv_pdf_print') }}</p>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{ __('chart_of_accounts.chart_of_account_name') }}</th>
<th>{{ __('chart_of_accounts.type') }}</th>
<th>{{ __('chart_of_accounts.description') }}</th>
<th>{{ __('chart_of_accounts.sub_account_of') }}</th>
<th>{{ __('chart_of_accounts.balance') }}</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>{{ __('chart_of_accounts.chart_of_account_name') }}</th>
<th>{{ __('chart_of_accounts.type') }}</th>
<th>{{ __('chart_of_accounts.description') }}</th>
<th>{{ __('chart_of_accounts.sub_account_of') }}</th>
<th>{{ __('chart_of_accounts.balance') }}</th>
<th></th>
</tr>
</tfoot>
<tbody>
@foreach($chart_of_accounts as $chart_of_account)
<tr>
<td>{{ $chart_of_account->name }}</td>
<td>{{ $account_types[$chart_of_account->type]}}</td>
<td>{{ $chart_of_account->description }}</td>
{{-- <td>{{ $chart_of_accounts_list[$chart_of_account->sub_account_of] }}</td>--}}
<td>{{ get_name($chart_of_account->sub_account_of, 'id', 'name', 'chart_of_accounts') }}</td>
<td>{{ ugandan_shillings($chart_of_account->balance) }}</td>
<td>
{{ Form::model($chart_of_account->id ,['method' => 'POST', 'route' => ['chart_of_accounts.activate', $chart_of_account->id]]) }}
<button type="submit" class="btn btn-warning" onclick="return confirm('<?php echo __('chart_of_accounts.are_you_sure')?>)"><i class="fa fa-check"></i> {{ __('chart_of_accounts.activate') }}</button>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
</script>
@endpush
@@ -0,0 +1,162 @@
@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@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">{{ __('chart_of_accounts.chart_of_accounts') }}</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> {{ __('chart_of_accounts.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('chart_of_accounts.finance_home') }}</a></li>
<li class="active"><i class="fa fa-eye"></i> {{ __('chart_of_accounts.view_chart_of_accounts') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<!--Flash messages at the top -->
@include('clinical_data::chart_of_accounts.menu')
@include('flash::message')
<div class="white-box">
<p class="text-muted m-b-30">{{ __('chart_of_accounts.export_data_to_copy_csv_pdf_print') }}</p>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{ __('chart_of_accounts.chart_of_account_name') }}</th>
<th>{{ __('chart_of_accounts.type') }}</th>
<th>{{ __('chart_of_accounts.description') }}</th>
<th>{{ __('chart_of_accounts.sub_account_of') }}</th>
<th>{{ __('chart_of_accounts.balance') }}</th>
<th>{{ __('chart_of_accounts.created_by') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>{{ __('chart_of_accounts.chart_of_account_name') }}</th>
<th>{{ __('chart_of_accounts.type') }}</th>
<th>{{ __('chart_of_accounts.description') }}</th>
<th>{{ __('chart_of_accounts.sub_account_of') }}</th>
<th>{{ __('chart_of_accounts.balance') }}</th>
<th>{{ __('chart_of_accounts.created_by') }}</th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
<tbody>
@if(count($chart_of_accounts)>0)
@foreach($chart_of_accounts as $chart_of_account)
<tr>
<td>{{ $chart_of_account->name }}</td>
<td>
@php
$types = explode(',',$chart_of_account->type);
for($i = 0; $i < count($types); $i++){
echo get_name($types[$i], 'id', 'name', 'account_types')."<br/>";
}
@endphp
</td>
{{--<td>{{ isset($account_types[$chart_of_account->type]) ? $account_types[$chart_of_account->type] : "" }}</td>--}}
<td>{{ $chart_of_account->description }}</td>
<td>{{ isset($chart_of_accounts_list[$chart_of_account->sub_account_of])? $chart_of_accounts_list[$chart_of_account->sub_account_of] : "" }}</td>
<td>
@if(!in_array($chart_of_account->type, [1, 2, 4, 7]))
{{ ugandan_shillings($chart_of_account->balance) }}
@endif
@if($chart_of_account->type == 4)
@php
$record = get_latest_banking_record($chart_of_account->id, getTodayCarbon()->toDateString());
@endphp
{{ ugandan_shillings(is_null($record) ? 0 : $record->account_balance) }}
@endif
</td>
<td>
{{ get_full_name($chart_of_account->created_by, "id", "first_name", "last_name", "users") }}
</td>
<td>
<a href="/chart_of_accounts/{{ $chart_of_account->id }}/edit/" class="btn btn-warning btn-sm btn-rounded"><i class="fa fa-pencil"></i> {{ __('chart_of_accounts.edit') }}</a>
</td>
<td>
@if($chart_of_account->core == 0)
{{ Form::model($chart_of_account->id ,['method' => 'DELETE', 'route' => ['chart_of_accounts.destroy', $chart_of_account->id]]) }}
<button type="submit" class="btn btn-danger btn-sm btn-rounded" onclick="return confirm('<?php echo __('chart_of_accounts.are_you_sure')?>')"><i class="fa fa-trash"></i> {{ __('chart_of_accounts.delete') }}</button>
{{ Form::close() }}
@endif
</td>
<td>
@if($chart_of_account->type == 1)
@php
$search_type = 'custom_date_range';
$end_of_month = \Carbon\Carbon::today()->endOfMonth()->toDateString();
$start_of_month = \Carbon\Carbon::today()->startOfMonth()->toDateString();
$string = $search_type.",".$start_of_month.",".$end_of_month.",".'incomes'.",".$chart_of_account->id.","."6";
@endphp
<a href="{{ route('finance_reports.income_detail', $string.","."accrual" ) }}" target="_blank" class="btn btn-sm btn-rounded btn-primary"><i class="fa fa-list"></i> {{ __('chart_of_accounts.report') }}</a>
@endif
@if($chart_of_account->type == 2)
@php
$search_type = 'custom_date_range';
$end_of_month = \Carbon\Carbon::today()->endOfMonth()->toDateString();
$start_of_month = \Carbon\Carbon::today()->startOfMonth()->toDateString();
$string = $search_type.",".$start_of_month.",".$end_of_month.",".'payments'.",".$chart_of_account->id;
@endphp
<a class="btn btn-sm btn-rounded btn-primary" target="_blank" href="{{ route('finance_reports.expense_detail', $string ) }}"><i class="fa fa-list"></i> {{ __('chart_of_accounts.report') }}</a>
@endif
@if($chart_of_account->type == 7)
@php
$search_type = 'custom_date_range';
$end_of_month = \Carbon\Carbon::today()->endOfMonth()->toDateString();
$start_of_month = \Carbon\Carbon::today()->startOfMonth()->toDateString();
$string = $search_type.",".$start_of_month.",".$end_of_month.",".'cog'.",".$chart_of_account->id;
@endphp
<a class="btn btn-sm btn-rounded btn-primary" target="_blank" href="{{ route('finance_reports.cost_of_sales_detail', $string ) }}"><i class="fa fa-list"></i>
{{ __('chart_of_accounts.report') }}</a>
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
pageLength : 50,
});
</script>
@endpush
@@ -0,0 +1,7 @@
<div class="panel panel-default" style="border-radius: 5px;">
<div class="panel-body">
<a href="{{ route('chart_of_accounts.create') }}" class="nav-item btn btn-success"><i class="fa fa-plus"></i> <span style="margin-left: 10px;">{{ __('chart_of_accounts.add_chart_of_account') }}</span></a>
<a href="{{ route('chart_of_accounts.index') }}" class="nav-item btn btn-info"><i class="fa fa-eye"></i> <span style="margin-left: 10px;">{{ __('chart_of_accounts.view_chart_of_accounts') }}</span></a>
<a href="{{ route('chart_of_accounts.inactive') }}" class="nav-item btn btn-danger"><i class="fa fa-trash"></i> <span style="margin-left: 10px;">{{ __('chart_of_accounts.activate_chart_of_accounts') }}</span></a>
</div>
</div>