mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
resolved conflicts
This commit is contained in:
+343
@@ -0,0 +1,343 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@push('styles')
|
||||
<link href="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css') }}" rel="stylesheet" type="text/css" />
|
||||
<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" />
|
||||
<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">{{ __('banking.bank_register_report') }}</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> {{ __('banking.home') }}</a></li>
|
||||
<li><a href="{{ route('finance') }}"><i class="fa fa-money"></i> {{ __('banking.finance_home') }}</a></li>
|
||||
<li class="active"><i class="fa fa-bank"></i>{{ __('banking.bank_register_report') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
{{ Form::open(['method'=>'post','route' => 'banking.register']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-3 b-r">
|
||||
<div class="form-group">
|
||||
<label>{{ __('banking.staff_in_charge') }}</label>
|
||||
<select class="form-control compulsory required" name="staff_member" id="staff_member" required>
|
||||
<option value="">{{ __('banking.select') }}</option>
|
||||
<option value="ALL STAFF">{{ __('banking.all_staff') }}</option>
|
||||
@foreach($staff_members as $item)
|
||||
<option value="{{ $item->id }}">{{ $item->username }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label>{{ __('banking.bank') }} :</label>
|
||||
<select class="form-control compulsory required" name="bank" id="bank" required>
|
||||
<option value="">{{ __('banking.select') }}</option>
|
||||
{{-- <option value="ALL BANKS">ALL BANKS</option> --}}
|
||||
@foreach($banks as $item)
|
||||
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label>{{ __('banking.select_date') }}</label>
|
||||
<select class="form-control compulsory required" name="dates" id="dates" required>
|
||||
<option value="">{{ __('banking.select') }}</option>
|
||||
<option value="today">{{ __('banking.today') }}</option>
|
||||
<option value="yesterday">{{ __('banking.yesterday') }}</option>
|
||||
<option value="custom_date">{{ __('banking.custom_date') }}</option>
|
||||
<option value="custom_date_range">{{ __('banking.date_range') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div id="sDate" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label>{{ __('banking.date_on') }}</label>
|
||||
<div class="input-group">
|
||||
{{ Form::text('start_date', '', ['class'=>'form-control required compulsory', 'readonly', 'id'=>'start_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div id="eDate" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label for="end_date">{{ __('banking.end_date') }}</label>
|
||||
<div class="input-group">
|
||||
{{ Form::text('end_date', '', ['class'=>'form-control required compulsory', 'readonly', 'id'=>'end_date']) }}
|
||||
<span class="input-group-addon"><i class="icon-calender"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<div class="form-group" style="margin-top: 25px;">
|
||||
{{ Form::submit('Submit', ['class'=>'btn btn-success btn-rounded btn-block pull-right']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
<hr style="height: 2px"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
@if(isset($display))
|
||||
<h3 class="label label-info label-rounded"> {!! isset($display) ? $display : '' !!}</h3>
|
||||
@endif
|
||||
<br/><br/>
|
||||
|
||||
@php
|
||||
$sum_balance = 0;
|
||||
$sum_credit = 0;
|
||||
$sum_debit = 0;
|
||||
@endphp
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="table" class="table color-bordered-table success-bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Transaction ID</th>
|
||||
<th>{{ __('banking.transaction_date') }}</th>
|
||||
<th>{{ __('banking.record_date') }}</th>
|
||||
<th>{{ __('banking.staff_in_charge') }}</th>
|
||||
<th>{{ __('banking.type') }}</th>
|
||||
<th>{{ __('banking.account') }}</th>
|
||||
<th>{{ __('banking.memo') }}</th>
|
||||
<th>{{ __('banking.decrease') }}</th>
|
||||
<th>{{ __('banking.increase') }}</th>
|
||||
<th>{{ __('banking.balance') }}</th>
|
||||
{{--
|
||||
@if(Auth::user()->can('banking-reverse'))
|
||||
<th>{{ __('banking.action') }}</th>
|
||||
@endif
|
||||
--}}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@if(count($records) > 0)
|
||||
@foreach($records as $record)
|
||||
@php
|
||||
$sum_credit += $record->credit;
|
||||
$sum_debit += $record->debit;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $record->trans_id }}</td>
|
||||
<td>{{ streamline_date($record->trans_date) }}</td>
|
||||
<td>{{ streamline_date_time_short($record->created_at) }}</td>
|
||||
<td>{{ get_full_name($record->created_by, 'id', 'first_name', 'last_name', 'users') }}</td>
|
||||
<td>{{ $record->trans_type }}</td>
|
||||
@php
|
||||
$banks = explode(',',$record->bank);
|
||||
$other_accounts = explode(',',$record->other_accounts);
|
||||
@endphp
|
||||
|
||||
<td>
|
||||
@for($x = 0; $x < count($other_accounts); $x++)
|
||||
{{ get_name($other_accounts[$x], 'id', 'name', 'chart_of_accounts') }} <br/>
|
||||
@endfor
|
||||
</td>
|
||||
<td>{{ $record->memo }}</td>
|
||||
@if($record->debit != 0) <td>{{ ugandan_shillings($record->debit) }}</td> @else <td> - </td> @endif
|
||||
@if($record->credit != 0) <td>{{ ugandan_shillings($record->credit) }}</td> @else <td> - </td> @endif
|
||||
<td>{{ ugandan_shillings($record->account_balance) }}</td>
|
||||
|
||||
@if($loop->last)
|
||||
@php $sum_balance = $record->account_balance; @endphp
|
||||
@endif
|
||||
|
||||
{{--
|
||||
@if(Auth::user()->can('banking-reverse'))
|
||||
<td>
|
||||
<a class="btn-sm btn btn-danger btn-rounded"
|
||||
onclick="return confirm('Are you sure you want to reverse this transaction ?')"
|
||||
href="{{ route('banking.reverse', $record->trans_id) }}">
|
||||
<i class="fa fa-trash"></i>
|
||||
Reverse
|
||||
</a>
|
||||
</td>
|
||||
@endif
|
||||
--}}
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
|
||||
@if(count($records) > 0)
|
||||
<tr>
|
||||
<td colspan="8"></td>
|
||||
<td>
|
||||
<strong>{{ __('banking.current_running_balance') }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ ugandan_shillings($sum_balance) }}
|
||||
</td>
|
||||
{{--
|
||||
@if(Auth::user()->can('banking-reverse'))
|
||||
<td></td>
|
||||
@endif
|
||||
--}}
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<!-- Date Picker Plugin JavaScript -->
|
||||
<script src="{{ asset('elite/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$('#dates').change(function (e) {
|
||||
|
||||
if($(this).val() === "custom_date"){
|
||||
|
||||
$("#eDate").hide();
|
||||
$("#sDate").show();
|
||||
|
||||
}else if($(this).val() === "custom_date_range"){
|
||||
|
||||
$("#sDate").show();
|
||||
$("#eDate").show();
|
||||
}else{
|
||||
|
||||
$("#eDate").hide();
|
||||
$("#sDate").hide();
|
||||
}
|
||||
});
|
||||
|
||||
function bank_deposit(cashier_income_id, amount) {
|
||||
$('#deposit_amount').val(amount);
|
||||
$('#cashier_income_id').val(cashier_income_id);
|
||||
$('#banking_modal').modal('show');
|
||||
}
|
||||
|
||||
$('#confirm_deposit').click(function () {
|
||||
|
||||
var cashier_income_id = $('#cashier_income_id').val();
|
||||
var deposit_amount = $('#deposit_amount').val();
|
||||
var deposit_account = $('#deposit_account').val();
|
||||
var deposit_date = $('#deposit_date').val();
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '/banking/quick_bank_deposit',
|
||||
data: {
|
||||
'cashier_income_id' : cashier_income_id,
|
||||
'deposit_amount' : deposit_amount,
|
||||
'deposit_account' : deposit_account,
|
||||
'deposit_date' : deposit_date,
|
||||
},
|
||||
|
||||
success: function(response){
|
||||
console.log(response);
|
||||
$('#banking_modal').modal('hide');
|
||||
$('#bank_' + cashier_income_id).hide();
|
||||
$('#div_' + cashier_income_id).append("<label class='label label-success'>BANKED</label>");
|
||||
},
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function get_acc_bal(bank_id) {
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '/banking/get_current_account_balance',
|
||||
data: {'bank_id' : bank_id},
|
||||
|
||||
success: function(response){
|
||||
var acc_bal = response[0].balance;
|
||||
var amount = $('#deposit_amount').val();
|
||||
$('#current_account_balance').val(acc_bal);
|
||||
$('#new_account_balance').val(acc_bal + parseInt(amount));
|
||||
},
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<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 type="text/javascript">
|
||||
|
||||
jQuery('#end_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('#start_date ,#deposit_date').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('.table').DataTable({
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print'
|
||||
],
|
||||
"aoColumnDefs": [{
|
||||
"aTargets": [2,3],
|
||||
"defaultContent": "",
|
||||
}],
|
||||
ordering: false,
|
||||
pageLength : 100,
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('elite/bower_components/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$('#staff_member').select2({
|
||||
placeholder: "-- select --"
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user