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,181 @@
@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">{{ __('family_accounts.edit_family_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> {{ __('family_accounts.home') }}</a></li>
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('family_accounts.finance_home') }}</a></li>
<li class="active"><i class="fa fa-eye"></i> {{ __('family_accounts.edit_family_account') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('patient_discounts::family_accounts.menu')
</div>
</div>
<div class="white-box">
@include('flash::message')
<div class="row">
<div class="col-md-6">
{{ Form::model($family_account, ['method' => 'PUT', 'route' => ['family_accounts.update',$family_account], 'data-toggle' => 'validator']) }}
<div class="form-group">
{{ Form::label('family_head',__('family_accounts.family_head')) }}
<select class="patient_name form-control" name="family_head" id="family_head_name">
<option value="{{ $family_head_id }}">{{ $family_head_name }}</option>
</select>
</div>
<div class="form-group">
{{ Form::label('family_members',__('family_accounts.family_members')) }}
<select class="patient_name form-control" name="family_members[]" multiple="true">
@foreach($family_members_array as $family_member)
<option value="{{ $family_member }}" selected>{{ get_full_name($family_member, 'id', 'first_name', 'last_name', 'patients') }}</option>
@endforeach
</select>
</div>
<div class="form-group">
{{ Form::label('current_balance',__('family_accounts.current_balance')) }}
{{ Form::number('current_balance', $current_balance,['class' => 'form-control', 'readonly' => 'true']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
{{ Form::label('opening_amount',__('family_accounts.opening_amount')) }}
{{ Form::number('opening_amount', $family_account->opening_amount,['class' => 'form-control','id' => 'opening_amount']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group" id="initial_div" @if(is_null($family_account->opening_account_id)) style="display: none;" @endif>
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">×</button>
<span>
Select affected <b>equity account</b> if the opening amount is the opening balance of this family on Stre@mline
</span>
</div>
{{ Form::label('is_it_opening_family_amount', 'Is opening amount the opening balance on Stre@mline for this family') }}
{{ Form::select('is_it_opening_family_amount', [1 => 'Yes', 0 => 'No'], is_null($family_account->opening_account_id) ? null : 1, ['class' => 'form-control compulsory','required', 'id' => 'is_it_opening_amt']) }}
<br>
<div class="form-group" id="opening_account_div" @if(is_null($family_account->opening_account_id)) style="display: none;" @endif>
{{ Form::label('opening_account_id', 'Opening Account') }}
{{ Form::select('opening_account_id', $chart_of_accounts, $family_account->opening_account_id, ['class' => 'form-control opening_account_id']) }}
<div class="help-block with-errors"></div>
</div>
<div class="form-group" @if(is_null($family_account->opening_account_id)) style="display: none;" @endif>
{{ Form::label('opening_account_date', 'Opening Amount Date') }}
<div class="input-group" id="opening_date_div" @if(is_null($family_account->opening_account_id)) style="display: none;" @endif>
<input type="text" name="opening_amount_date" value="{{ $family_account->opening_amount_date}}" placeholder="Opening amount deposit date" class="form-control col-sm-12" id="opening_amount_date">
<span class="input-group-addon"><i class="icon-calender"></i></span>
</div>
<br>
</div>
<div class="form-group">
{{ Form::label('deposited_by', __('family_accounts.deposited_by')) }}
{{ Form::text('deposited_by', $opening_deposit_record ? $opening_deposit_record->deposited_by : '', ['class'=>'form-control', 'id'=>'deposit_by']) }}
</div>
</div>
@if (Auth::user()->can('add-family-account-credit-limit'))
<div class="form-group">
{{ Form::label('credit_limit', __('family_accounts.credit_limit')) }}
{{ Form::number('credit_limit',$family_account->credit_limit,['class' => 'form-control']) }}
<div class="help-block with-errors"></div>
</div>
@endif
<div>
{{ Form::submit(__('family_accounts.save'),['class'=>'btn btn-success'])}}
{{ Form::reset(__('family_accounts.cancel'),['type'=>'reset','class'=>'btn btn-default'])}}
</div>
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.family_dropdown').select2({
placeholder: "Select member"
});
$('.select2-selection.select2-selection--single').css('height','calc(3.85rem)');
$('.select2-selection.select2-selection--single').css('padding-top','5px');
$('.select2-selection.select2-selection--single').css('border-left', '3px solid #F08080');/*add compulsory class*/
$('.select2-selection.select2-selection--single.sec_d').css('border-left', '3px solid #aaa');
$('.select2-selection__arrow').css('top','3px');
$('#opening_amount').change(function(e) {
if ($('#opening_amount').val() > 0) {
$('#initial_div').show();
$('#opening_account_div').show();
$('#opening_date_div').show();
$('#opening_account_id').attr("required", "true");
}
});
$('#is_it_opening_amt').click(function(e){
var outcome = $("#is_it_opening_amt :selected").val();
if (outcome == 1) { //1=yes
$('#opening_account_div').show();
$('#opening_date_div').show();
$('#opening_account_id').attr("required", "true");
}
else{
$('#opening_account_div').hide();
$('#opening_date_div').hide();
$('#opening_account_id').removeAttr("required");
}
});
$('.patient_name').select2({
placeholder: "Search name",
ajax: {
url: '/search_family_account_name',
dataType: 'json',
delay: 250,
processResults: function (data) {
return {
results: $.map(data, function (item) {
return {
text: item.first_name + " " + item.last_name+ " - " + item.number+ " (" + item.phone + ")",
id: item.id
}
})
};
},
cache: true
}
});
$('#opening_amount_date').datepicker({
autoclose: true,
todayHighlight: true,
format: 'yyyy-mm-dd',
});
});
</script>
@endpush